public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v5 0/4] mpc8313: ids8313 board updates
@ 2014-05-28  9:33 Heiko Schocher
  2014-05-28  9:33 ` [U-Boot] [PATCH v5 1/4] bootm: make use of legacy image format configurable Heiko Schocher
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Heiko Schocher @ 2014-05-28  9:33 UTC (permalink / raw)
  To: u-boot

- 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@chromium.org>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Michael Conrad <Michael.Conrad@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             |  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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-06-11 15:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28  9:33 [U-Boot] [PATCH v5 0/4] mpc8313: ids8313 board updates Heiko Schocher
2014-05-28  9:33 ` [U-Boot] [PATCH v5 1/4] bootm: make use of legacy image format configurable Heiko Schocher
2014-05-30 22:44   ` Simon Glass
2014-06-05 22:47   ` [U-Boot] [U-Boot, v5, " Tom Rini
2014-05-28  9:33 ` [U-Boot] [PATCH v5 2/4] mpc8313, signed fit: enable legacy image format on ids8313 board Heiko Schocher
2014-05-30 22:45   ` Simon Glass
2014-05-30 22:46     ` Simon Glass
2014-06-05 22:47   ` [U-Boot] [U-Boot, v5, " Tom Rini
2014-05-28  9:33 ` [U-Boot] [PATCH v5 3/4] lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c Heiko Schocher
2014-05-30 23:55   ` Simon Glass
2014-06-05 19:15   ` [U-Boot] [U-Boot, v5, " Tom Rini
2014-06-10  7:35     ` Heiko Schocher
2014-06-11 15:49       ` Tom Rini
2014-05-28  9:33 ` [U-Boot] [PATCH v5 4/4] mpc8313: add CONFIG_SYS_GENERIC_BOARD to ids8313 board Heiko Schocher
2014-05-30 22:45   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox