From: Wolfgang Denk Date: Thu, 31 May 2007 01:17:24 +0200 Subject: [U-Boot-Users] U-boot runtime detection In-Reply-To: Your message of "Wed, 30 May 2007 19:02:49 +0200." <200705301902.50186.florian.fainelli@telecomint.eu> Message-ID: <20070530231724.19159353B27@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -- 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 "Nobody will ever need more than 640k RAM!" -- Bill Gates, 1981 "Windows 95 needs at least 8 MB RAM." -- Bill Gates, 1996 "Nobody will ever need Windows 95." -- logical conclusion