[U-Boot] ARM relocation, probably trivial mistake - back to original problem

Heiko Schocher
2010-10-02T08:49:19Z

Hello Wolfgang, Reinhard,

Wolfgang Denk wrote:
> Dear Reinhard Meyer,
>
> In message <4CA5D857.5010009@emk-elektronik.de> you wrote:
>> The environment issues still persist. I am at a loss
>> there now.
>>
>> Observation: the old style commands "setenv", "printenv", etc.
>> work, but any "env" command except for "env" alone crashes.
>
> OK. If "printenv" works and "env print" fails then it has nothing to
> do with the environment code itself, as both call the same function.
>
> It must have something to do with the implementation of subcommands
> then. See do_env() in "common/cmd_nvedit.c"; check if the command
> table address for find_cmd_tbl() is OK.
>
> Eventually other commands with subcommands fail as well (i2c ?) ?

Yep, I think thats the direction. i2c should work, because the
subcommands get fixed in board_init_r() through i2c_reloc()

For fixing commandtable (and subcommands) I made a common
function fixup_cmdtable() in common/command.c see also
commit 620f1f6a64095ed558e68d37f1965d015cd49b02

Note: For powerpc this fixups are not needed, so
CONFIG_RELOC_FIXUP_WORKS is defined for powerpc ... don;t
sure, how exactly this work on powerpc ...

bye,
Heiko

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany