[U-Boot-Users] Changing u-boot relocation scheme

Jerry Van Baren gerald.vanbaren at ge.com
Fri Jul 25 19:02:33 CEST 2008


kenneth johansson wrote:
> On Fri, 2008-07-25 at 17:23 +0200, Haavard Skinnemoen wrote:

[snip]

>> There will obviously be a fair amount of arch-specific code required to
>> make the actual relocation work though.
> 
> So the gain of using dynamic relocation is that we have fever relocation
> types to implement and objcopy is not going to strip away the relocation
> section as it do for non dynamic relocs. 
> 
> still the code to actually do the relocation is architecture dependent
> and non existing. At least for powerpc we have a much easier option of
> having gcc generate a fixup table. 

EVERYTHING *already* exists, we just aren't using it right.  That is 
what the elf loader does in a "normal" system.  Grant did it on the 
PowerPC architecture - look at the archives, he didn't write new code 
for this, it's already in there.

Here is the reversion back to the old way:
   <http://article.gmane.org/gmane.comp.boot-loaders.u-boot/33297>
If you un-revert it (re-revert it?), you will have what Grant did.  For 
some set of PowerPC platforms, it Just Works[tm].  For other 
architectures and platforms, start from this and make it work.

Note the list of changed files - no source file changes in it:
  board/cogent/u-boot.lds             |    1 +
  board/hymod/u-boot.lds              |    1 +
  board/mousse/u-boot.lds             |    1 +
  board/rsdproto/u-boot.lds           |    1 +
  cpu/mpc512x/config.mk               |    2 +-
  cpu/mpc5xx/config.mk                |    2 +-
  cpu/mpc5xx/u-boot.lds               |    1 +
  cpu/mpc5xxx/config.mk               |    2 +-
  cpu/mpc5xxx/u-boot-customlayout.lds |    1 +
  cpu/mpc5xxx/u-boot.lds              |    1 +
  cpu/mpc8220/config.mk               |    2 +-
  cpu/mpc8220/u-boot.lds              |    1 +
  cpu/mpc824x/config.mk               |    2 +-
  cpu/mpc824x/u-boot.lds              |    1 +
  cpu/mpc8260/config.mk               |    2 +-
  cpu/mpc8260/u-boot.lds              |    1 +
  cpu/mpc83xx/config.mk               |    2 +-
  cpu/mpc83xx/u-boot.lds              |    1 +
  include/common.h                    |    8 --------
  19 files changed, 18 insertions(+), 15 deletions(-)

Best regards,
gvb




More information about the U-Boot mailing list