[U-Boot] [PATCH v4 0/4] mpc8313: ids8313 board updates

Heiko Schocher hs at denx.de
Tue May 20 08:49:03 CEST 2014


- introduce CONFIG_IMAGE_FORMAT_LEGACY for enabling
  booting legacy image format. Disable this per default if
  CONFIG_FIT_SIGNATURE is defined.
  As the ids8313 board needs legacy image format and uses
  CONFIG_FIT_SIGNATURE, enable legacy image format for the
  ids8313 board

- add CONFIG_SYS_GENERIC_BOARD to the ids8313 board,
  therefore fdtdec_get_int() is moved out of lib/fdtdec.c
  as lib/fdtdec.c is only compiled if CONFIG_OF_CONTROL
  is defined, but defining this for the ids8313 board
  leads in conjunction with CONFIG_SYS_GENERIC_BOARD
  in booting error:

No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>

  So move the common used function fdtdec_get_int()
  out of lib/fdtdec.c into lib/fdtdec_common.c

Cc: Simon Glass <sjg at chromium.org>
Cc: Kim Phillips <kim.phillips at freescale.com>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Tom Rini <trini at ti.com>
Cc: Michael Conrad <Michael.Conrad at ids.de>

Tested this patchset on the ids8313 board, MAKEALL for powerpc
and arm adds no compiler errors/warnings.

While testing this patchset on the ids8313 board, I found, that
current U-Boot compiles fine with eldk 5.5, but if erasing the
sectors where U-Boot resists in the NOR flash, u-boot commands
are not longer working :-(

$ powerpc-linux-gcc -v
Using built-in specs.
COLLECT_GCC=powerpc-linux-gcc
COLLECT_LTO_WRAPPER=/opt/eldk-5.5/powerpc/sysroots/i686-eldk-linux/usr/libexec/powerpc-linux/gcc/powerpc-linux/4.8.1/lto-wrapper
Target: powerpc-linux
[...]
Thread model: posix
gcc version 4.8.1 (GCC) 
$

This problem does not pop up with eldk 5.4 or 5.3 !

Digged a little bit in it, and found that some (not all!) fmt
strings are loaded from flash addresses not from ram addresses ...

gdb shows:
Program received signal SIGTRAP, Trace/breakpoint trap.
printf (fmt=0xfff5ad34 '\377' <repeats 200 times>..., fmt at entry=0x7fdad34 "parse_stream, end_trigger=%d\n") at /home/hs/ids/u-boot/common/console.c:479
            ^^^^^^^^^^
            addr in nor flash not in ram
479     {
(gdb) bt
#0  printf (fmt=0xfff5ad34 '\377' <repeats 200 times>..., fmt at entry=0x7fdad34 "parse_stream, end_trigger=%d\n") at /home/hs/ids/u-boot/common/console.c:479
#1  0x07f88c4c in parse_stream (end_trigger=10, input=0x775fe00, ctx=0x775fd60, dest=0x775fd7c) at /home/hs/ids/u-boot/common/hush.c:2942
 
this leads, if flash is erased, in a crash ... try to find out
more ...

This problem seems a toolchain problem, as I tried older
U-Boot versions with eldk 5.5 on this board, and all versions
break ... I have no other mpc83xx board handy ... can somebody
try this scenario on a mpc83xx based board? Kim?

Current U-Boot does work fine on a mpc52xx based board compiled
with eldk 5.5, so it seems a mpc83xx specific problem?

Heiko Schocher (4):
  bootm: make use of legacy image format configurable
  mpc8313, signed fit: enable legacy image format on ids8313 board
  lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c
  mpc8313: add CONFIG_SYS_GENERIC_BOARD to ids8313 board

 README                        | 18 ++++++++++++++++++
 common/cmd_bootm.c            | 14 ++++++++++++++
 common/cmd_disk.c             |  4 ++++
 common/cmd_fdc.c              |  4 ++++
 common/cmd_fpga.c             |  2 ++
 common/cmd_nand.c             |  4 ++++
 common/cmd_source.c           |  4 ++++
 common/cmd_ximg.c             |  7 ++++++-
 common/image-fdt.c            | 10 ++++++++--
 common/image.c                | 23 ++++++++++++++++-------
 doc/uImage.FIT/signature.txt  |  3 +++
 include/config_fallbacks.h    |  8 ++++++++
 include/configs/ids8313.h     |  4 +++-
 include/configs/zynq-common.h |  1 +
 include/image.h               |  2 ++
 lib/Makefile                  |  1 +
 lib/fdtdec.c                  | 36 ------------------------------------
 lib/fdtdec_common.c           | 33 +++++++++++++++++++++++++++++++++
 tools/fdtdec.c                |  1 +
 19 files changed, 132 insertions(+), 47 deletions(-)
 create mode 100644 lib/fdtdec_common.c

-- 
1.8.3.1



More information about the U-Boot mailing list