[U-Boot] return value from do_ext2load

the do_ext2load procedure returns the file length if it succeeds... which means you can't do
#define CONFIG_BOOTCOMMAND "mmcinit && ext2load mmc 0:1 0x10400000 /boot/uImage && bootm 0x10400000"
Is this part of some vast eternal plan and/or can anyone see a way to make it function as desired anyway?
David Collier
www.dexdyne.com

OK - I'll throw myself on the mercy of the community :-)
I have installed hush in my u-boot.
I want to fix the following command sequence so that the board only boots if an image was actually loaded from the mmc card
bootcmd="mmcinit ; ext2load mmc 0:1 0x10400000 /boot/uImage ; bootm 0x10400000"
I've tried using && but that doesn't seem to work as expected... for instance if I use
bootcmd="mmcinit && ext2load mmc 0:1 0x10400000 /boot/uImage && bootm 0x10400000"
the sequence stops if the mmc isn't found, but always stops after the ext2load, even if it's successful.
I have tried
bootcmd="mmcinit ; mw 0x10400000 66 12345 ; ext2load mmc 0:1 0x10400000 /boot/uImage ; bootm 0x10400000"
but the bootm still runs even if no card is inserted and I turn the power off for 1 second. So I'm missing something there!!!
Can anyone help?
TVM
David
In article <memo.20091021172317.4412B@postmaster+dexdyne.com.cix.co.uk>, from_denx_uboot@dexdyne.com (David Collier) wrote:
*From:* "David Collier" from_denx_uboot@dexdyne.com *To:* u-boot@lists.denx.de *Date:* Wed, 21 Oct 2009 17:23 +0100 (BST)
the do_ext2load procedure returns the file length if it succeeds... which means you can't do
#define CONFIG_BOOTCOMMAND "mmcinit && ext2load mmc 0:1 0x10400000 /boot/uImage && bootm 0x10400000"
Is this part of some vast eternal plan and/or can anyone see a way to make it function as desired anyway?
David Collier
www.dexdyne.com _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
David Collier
www.dexdyne.com

Dear "David Collier",
In message <memo.20091021190618.4412D@postmaster+dexdyne.com.cix.co.uk> you wrote:
OK - I'll throw myself on the mercy of the community :-)
I have installed hush in my u-boot.
Which exact version (commit ID) are you running?
And which platform / board is this?
Best regards,
Wolfgang Denk

I'm running a home-brew based on 2008-10
I started with NGW100 version, and went on from there :-(
D
In article 20091021184858.4410819F73@gemini.denx.de, wd@denx.de (Wolfgang Denk) wrote:
*From:* Wolfgang Denk wd@denx.de *To:* from_denx_uboot@dexdyne.com *CC:* u-boot@lists.denx.de *Date:* Wed, 21 Oct 2009 20:48:58 +0200
Dear "David Collier",
In message <memo.20091021190618.4412D@postmaster+dexdyne.com.cix.co.uk> you wrote:
OK - I'll throw myself on the mercy of the community :-)
I have installed hush in my u-boot.
Which exact version (commit ID) are you running?
And which platform / board is this?
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@denx.de Committee, n.: A group of men who individually can do nothing but as a group decide that nothing can be done. - Fred Allen
David Collier
www.dexdyne.com

Dear "David Collier",
In message <memo.20091021172317.4412B@postmaster+dexdyne.com.cix.co.uk> you wrote:
the do_ext2load procedure returns the file length if it succeeds... which means you can't do
You make a pretty definitive statement here. What makes you so sure?
Let me tell you that you are wrong.
Is this part of some vast eternal plan and/or can anyone see a way to make it function as desired anyway?
It is working perfectly fine for me.
Of course I don't use old, buggy code as you seem to be doing.
My code contains this commit:
commit 4b7511478b62a539e5b066d19a986b75e5d9a527 Author: Wolfgang Denk wd@denx.de Date: Tue Jul 28 22:07:37 2009 +0200
Fix ext2load return code
Make the ext2load command return 0 on success (instead of the file length). ...
Best regards,
Wolfgang Denk

Of course I don't use old, buggy code as you seem to be doing.
My code contains this commit:
commit 4b7511478b62a539e5b066d19a986b75e5d9a527 Author: Wolfgang Denk wd@denx.de Date: Tue Jul 28 22:07:37 2009 +0200
Fix ext2load return code Make the ext2load command return 0 on success (instead of the
file length). ...
Well that would improve things :-)
I'm only using old code because when I last worked on u-boot the latest code couldn't write the AVR32 flash, so I had to back up to the most recent one that could.
I don't have time today to do a complete update, but I'll try applying that patch in isolation.
Thank you.
D
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@denx.de In the beginning there was nothing. And the Lord said "Let There Be Light!" And still there was nothing, but at least now you could see it.
David Collier
www.dexdyne.com
participants (2)
-
David Collier
-
Wolfgang Denk