From: Florian Fainelli Date: Wed, 6 Jun 2007 12:58:37 +0200 Subject: [U-Boot-Users] U-boot runtime detection In-Reply-To: <20070530231724.19159353B27@atlas.denx.de> References: <20070530231724.19159353B27@atlas.denx.de> Message-ID: <200706061258.37801.florian.fainelli@telecomint.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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@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