[U-Boot] [PATCH 0/2] [RFC] DEBUG: relocate to fixed address

Tetsuyuki Kobayashi koba at kmckk.co.jp
Wed Nov 21 06:44:18 CET 2012


Hello,

U-Boot from NOR flash relocates itself to RAM erea. The relocation address is
calaculated at runtime to get maxium contiguous space to load kernel. So it may
vary after code changed. In the early debug phase it would be easier to handle
if the relocation address does not change per build.

My idea is define fixed address as CONFIG_DEBUG_RELOC_FIX_ADDR in config file
and relocate to the address. Then you don't need to execute 'bdinfo' command to
get actual relocated address. It is done by the first patch.

The second patch is for u-boot_r, which is linked for fixed relocation address.
When you want to symbolic debug after relocation, flash 'u-boot.bin' and
load symbol from 'u-boot_r' to debugger.
(CF. When you want to symblic debug before relocation, load symbol from 'u-boot'
 to debugger.)

This patch set is based on v2013.01-rc1. (Tell me if I should rebase.)
This is for ARM, but similar change could apply for other arch.


Tetsuyuki Kobayashi (2):
  DEBUG: fix relocation address
  DEBUG: make u-boot_r which is linked for fixed relocation address

 Makefile                |    7 +++++--
 arch/arm/lib/board.c    |    9 ++++++++-
 config.mk               |    5 +++++
 include/configs/kzm9g.h |    4 ++++
 4 files changed, 22 insertions(+), 3 deletions(-)

-- 
1.7.9.5



More information about the U-Boot mailing list