[U-Boot] modifying u-boot image to distinguish between primary and secondary
Wolfgang Denk
wd at denx.de
Mon Jan 25 09:23:41 CET 2010
Dear Ravi Shekhar,
In message <OFFE8B8C82.0B75DDB4-ON652576B6.001CDB45-652576B6.001D0D2F at lntemsys.com> you wrote:
>
> My board has two boot-loaders namely, primary bootloader and secondary
> bootloader. however the image file name for both the bootloaders are same,
> u-boot.bin. Now, I want to make a check before loading u-boot to flash
> whether its a primary bootloader or secondary bootloader. What i thought
> is, why not to append primary or secondary string after the version in the
> uboot..bin but I am not sure how it works. Can anyone please give me some
> Ideas on this.
You have to be more specific.
Why do both your images have the same file name? Wouldit not besimple
enough to rename at least one of them?
I understand the images are different (otherwise changing the version
string would not work).
You write "check before loading u-boot to flash" - in this case, how
does modifying the version string inside the image help you? You
would need a tool to "look inside" the images so it can locate and
extract this string.
Assuming you are using U-Boot to load the images and write these to
flash, you might create U-Bot images (using mkimage with "-T firmware"
and "-O u-boot") and use these. Here it is trivial to assign names to
the images, which can easily be extrated (using "mkimage -l" on the
command line or "iminfo" in U-Boot).
Or, with a little more effort, but a lot additional flexibility, you
could create a single FIT image which holds both your primary and
secondary image, so these can be installed in one go.
If I were you I would try the FIT image approach.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The faster I go, the behinder I get. -- Lewis Carroll
More information about the U-Boot
mailing list