- 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 <s...@chromium.org> Cc: Kim Phillips <kim.phill...@freescale.com> Cc: Wolfgang Denk <w...@denx.de> Cc: Tom Rini <tr...@ti.com> Cc: Michael Conrad <michael.con...@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@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@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 | 9 +++++++-- common/image-fdt.c | 10 ++++++++-- common/image.c | 25 ++++++++++++++++++------- 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 | 38 ++++++++++++++++++++++++++++++++++++++ tools/fdtdec.c | 1 + 19 files changed, 140 insertions(+), 48 deletions(-) create mode 100644 lib/fdtdec_common.c -- 1.8.3.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot