[U-Boot-Users] Relocatable U-Boot

Hi All,
My apologies if this has been discussed before, but I could not find it in the archives I have. I'm wondering if anyone has spent time on making u-boot relocatable.
A handful of projects I have worked on use multiple copies of u-boot stored in different locations of flash and a small assembly stub determines which to boot. Currently, to do that u-boot has to be compiled two different times with different settings to accommodate the different base addresses.
Is there a way to use a single build of u-boot which can be placed at two different addresses in flash? That seems to me that it would be a useful general feature.
josh

A handful of projects I have worked on use multiple copies of u-boot stored in different locations of flash and a small assembly stub determines which to boot. Currently, to do that u-boot has to be compiled two different times with different settings to accommodate the different base addresses.
Is there a way to use a single build of u-boot which can be placed at two different addresses in flash? That seems to me that it would be a useful general feature.
If you copy your U-Boot to RAM, you can have multiple U-Boots each linked to the same location. You need a small utility which runs before U-Boot which determines which version to use.
josh

On 5/29/07, Ulf Samuelsson ulf@atmel.com wrote:
A handful of projects I have worked on use multiple copies of u-boot stored in different locations of flash and a small assembly stub determines which to boot. Currently, to do that u-boot has to be compiled two different times with different settings to accommodate the different base addresses.
Is there a way to use a single build of u-boot which can be placed at two different addresses in flash? That seems to me that it would be a useful general feature.
If you copy your U-Boot to RAM, you can have multiple U-Boots each linked to the same location. You need a small utility which runs before U-Boot which determines which version to use.
Hm... yes. Though I think that is more of a workaround than a truly relocatable u-boot.
josh

Hi Josh,
On Wednesday 30 May 2007, Josh Boyer wrote:
On 5/29/07, Ulf Samuelsson ulf@atmel.com wrote:
A handful of projects I have worked on use multiple copies of u-boot stored in different locations of flash and a small assembly stub determines which to boot. Currently, to do that u-boot has to be compiled two different times with different settings to accommodate the different base addresses.
Is there a way to use a single build of u-boot which can be placed at two different addresses in flash? That seems to me that it would be a useful general feature.
If you copy your U-Boot to RAM, you can have multiple U-Boots each linked to the same location. You need a small utility which runs before U-Boot which determines which version to use.
Hm... yes. Though I think that is more of a workaround than a truly relocatable u-boot.
Yes, the relocation in U-Boot still is a big problem. There was a series of mails some time ago that at least described how it could be done correctly. Unfortunately no real acceptable patch till now.
IIRC, Grant Likely had some relocation fixes in his patch queue too. But he is most likely busy with other high priority stuff too (as we all are, right? ;)).
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================

A handful of projects I have worked on use multiple copies of u-boot stored in different locations of flash and a small assembly stub determines which to boot. Currently, to do that u-boot has to be compiled two different times with different settings to accommodate the different base addresses.
Is there a way to use a single build of u-boot which can be placed at two different addresses in flash? That seems to me that it would be a useful general feature.
If you copy your U-Boot to RAM, you can have multiple U-Boots each linked to the same location. You need a small utility which runs before U-Boot which determines which version to use.
Hm... yes. Though I think that is more of a workaround than a truly relocatable u-boot.
I don't think having relocatable U-Boot is a good goal. Having the possiblility to choose between several different U-boot image is... Copying the image to SDRAM is one method to do this. If you don't want to copy to SDRAM, then you can enable a MMU (when this is available) as an alternative.
Best Regards Ulf Samuelsson

A handful of projects I have worked on use multiple copies of u-boot stored in different locations of flash and a small assembly stub determines which to boot. Currently, to do that u-boot has to be compiled two different times with different settings to accommodate the different base addresses.
Is there a way to use a single build of u-boot which can be placed at two different addresses in flash? That seems to me that it would be a useful general feature.
If you copy your U-Boot to RAM, you can have multiple U-Boots each linked to the same location. You need a small utility which runs before U-Boot which determines which version to use.
Hm... yes. Though I think that is more of a workaround than a truly relocatable u-boot.
I don't think having relocatable U-Boot is a good goal. Having the possiblility to choose between several different U-boot image is... Copying the image to SDRAM is one method to do this. If you don't want to copy to SDRAM, then you can enable a MMU (when this is available) as an alternative.
Best Regards Ulf Samuelsson
participants (3)
-
Josh Boyer
-
Stefan Roese
-
Ulf Samuelsson