[U-Boot-Users] U-boot runtime detection

Florian Fainelli florian.fainelli at telecomint.eu
Wed Jun 6 12:58:37 CEST 2007


Hello Wolfgang,

Thank you very much for your answer. Looks like reading linux_env in fw_arg2 
and 0 in fw_arg3 should be pretty efficient in saying it is U-boot we were 
booted from.

Any reasons why fw_arg3 receives 0 instead of a magic number ? Broadcom's CFE 
passes the string "CFE1" in here, why not passing "UBOO" for instance ?

Le jeudi 31 mai 2007, Wolfgang Denk a écrit :
> In message <200705301902.50186.florian.fainelli at telecomint.eu> you wrote:
> > I am currently working on the adm5120 target under Linux and this board
> > is available with at least 4 bootloaders, including U-boot.
>
> 4 different boot loaderss on one board? What a waste of effort...
>
> > We manage getting runtime bootloader detection working using the
> > fw_arg0-3 values for CFE, RouterBoot, Bootbase. Now I would like to do so
> > for U-boot and I could not find any informations if U-boot fills the
> > fw_arg0-3 with some specific values that could let us identify it at
> > runtime. Can you indicate me if such identification is possible ? If not,
> > would another method (like reading the first flash block) work ?
>
> You may want to check "lib_mips/mips_linux.c" to see which arguments
> get passed to a Linux kernel by U-Boot. Search for "theKernel()" call.
>
> Best regards,
>
> Wolfgang Denk



-- 
Cordialement, Florian Fainelli
---------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070606/5744a6d6/attachment.pgp 


More information about the U-Boot mailing list