* [U-Boot-Users] bootcmd
@ 2007-05-30 21:08 Matt Gessner
2007-05-30 21:14 ` Timur Tabi
0 siblings, 1 reply; 7+ messages in thread
From: Matt Gessner @ 2007-05-30 21:08 UTC (permalink / raw)
To: u-boot
Hi,
I'm trying to figure out how to make my software field update process
robust. Currently, my bootcmd is 'fsload 20000000 uImage; bootm
20000000'
Is there anyway for u-boot to determine, in one of these commands, that
some command failed, and to do something else instead?
For example, if I failed to load uImage, could I check for its
existence, and boot that instead?
My update process will copy the new image into the same partition as
uImage, as uImage.new, and then rename uImage to uImage.old, rename
uImage.new to uImage, and then delete uImage.old.
If something untoward should happen (like the idiot turns off the power
in the middle of the update), I'm wondering how I can have u-boot get
around this.
Thanks,
Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] bootcmd
2007-05-30 21:08 [U-Boot-Users] bootcmd Matt Gessner
@ 2007-05-30 21:14 ` Timur Tabi
2007-05-30 23:23 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Timur Tabi @ 2007-05-30 21:14 UTC (permalink / raw)
To: u-boot
Matt Gessner wrote:
> Hi,
>
> I'm trying to figure out how to make my software field update process
> robust. Currently, my bootcmd is 'fsload 20000000 uImage; bootm
> 20000000'
> Is there anyway for u-boot to determine, in one of these commands, that
> some command failed, and to do something else instead?
fsload 20000000 uImage && bootm 20000000
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] bootcmd
2007-05-30 21:14 ` Timur Tabi
@ 2007-05-30 23:23 ` Wolfgang Denk
2007-05-31 13:14 ` Matt Gessner
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2007-05-30 23:23 UTC (permalink / raw)
To: u-boot
In message <465DE93D.1010907@freescale.com> you wrote:
> Matt Gessner wrote:
> > Hi,
> >
> > I'm trying to figure out how to make my software field update process
> > robust. Currently, my bootcmd is 'fsload 20000000 uImage; bootm
> > 20000000'
>
> > Is there anyway for u-boot to determine, in one of these commands, that
> > some command failed, and to do something else instead?
>
> fsload 20000000 uImage && bootm 20000000
Or, without using the hush shell:
=> sete kaddr 20000000
=> sete kload 'fsload ${kaddr} uImage'
=> sete kboot 'bootm ${kaddr}'
=> save
followed by "run kload kboot"
See http://www.denx.de/wiki/view/DULG/CommandLineParsing for details.
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
Es sind ?berhaupt nur die Dummk?pfe, die sich den Befehlen der M?ch-
tigen widersetzen. Um sie zu ruinieren ist es genug, ihre Befehle
treu zu erf?llen. - Peter Hacks: "Die sch?ne Helena"
^ permalink raw reply [flat|nested] 7+ messages in thread* [U-Boot-Users] bootcmd
2007-05-30 23:23 ` Wolfgang Denk
@ 2007-05-31 13:14 ` Matt Gessner
2007-05-31 14:02 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Matt Gessner @ 2007-05-31 13:14 UTC (permalink / raw)
To: u-boot
Thanks Wolfgang & Timur,
I think I want something like this:
setenv addr 20000000
fsload $addr uImage || fsload $addr uImage.new && bootm $addr
If the bootloader can't find uImage, try to find uImage.new.
Does that make sense? I'm using u-boot 1.2.0.
Matt
> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sent: Wednesday, May 30, 2007 7:23 PM
> To: Timur Tabi
> Cc: Matt Gessner; u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] bootcmd
>
> In message <465DE93D.1010907@freescale.com> you wrote:
> > Matt Gessner wrote:
> > > Hi,
> > >
> > > I'm trying to figure out how to make my software field update process
> > > robust. Currently, my bootcmd is 'fsload 20000000 uImage; bootm
> > > 20000000'
> >
> > > Is there anyway for u-boot to determine, in one of these commands,
> that
> > > some command failed, and to do something else instead?
> >
> > fsload 20000000 uImage && bootm 20000000
>
> Or, without using the hush shell:
>
> => sete kaddr 20000000
> => sete kload 'fsload ${kaddr} uImage'
> => sete kboot 'bootm ${kaddr}'
> => save
>
> followed by "run kload kboot"
>
> See http://www.denx.de/wiki/view/DULG/CommandLineParsing for details.
>
> 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
> Es sind ?berhaupt nur die Dummk?pfe, die sich den Befehlen der M?ch-
> tigen widersetzen. Um sie zu ruinieren ist es genug, ihre Befehle
> treu zu erf?llen. - Peter Hacks: "Die sch?ne Helena"
>
^ permalink raw reply [flat|nested] 7+ messages in thread* [U-Boot-Users] bootcmd
2007-05-31 13:14 ` Matt Gessner
@ 2007-05-31 14:02 ` Wolfgang Denk
2007-05-31 15:04 ` Matt Gessner
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2007-05-31 14:02 UTC (permalink / raw)
To: u-boot
In message <131AF8573CF31945B5B11E4201D3F1E142BC78@mail3.Avidyne.com> you wrote:
>
> setenv addr 20000000
> fsload $addr uImage || fsload $addr uImage.new && bootm $addr
>
> If the bootloader can't find uImage, try to find uImage.new.
>
> Does that make sense? I'm using u-boot 1.2.0.
Sure, why not? Just enable the hush shell in your board config file.
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
"There are three principal ways to lose money: wine, women, and en-
gineers. While the first two are more pleasant, the third is by far
the more certain." -- Baron Rothschild, ca. 1800
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] bootcmd
2007-05-31 14:02 ` Wolfgang Denk
@ 2007-05-31 15:04 ` Matt Gessner
2007-05-31 16:15 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Matt Gessner @ 2007-05-31 15:04 UTC (permalink / raw)
To: u-boot
OK, I tried something slightly different but it doesn't boot.
fsload $addr uImage || chpart nand0,1 || fsload $addr uImage && bootm
$addr
I can tell it didn't find uImage in the first partition and that it
switched over to the second partition (b/c mtddevnum changes). Then it
loaded uImage from the second partition, but then I get a prompt back.
Any suggestions??
Thanks,
Matt
> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sent: Thursday, May 31, 2007 10:02 AM
> To: Matt Gessner
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] bootcmd
>
> In message <131AF8573CF31945B5B11E4201D3F1E142BC78@mail3.Avidyne.com>
you
> wrote:
> >
> > setenv addr 20000000
> > fsload $addr uImage || fsload $addr uImage.new && bootm $addr
> >
> > If the bootloader can't find uImage, try to find uImage.new.
> >
> > Does that make sense? I'm using u-boot 1.2.0.
>
> Sure, why not? Just enable the hush shell in your board config file.
>
> 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
> "There are three principal ways to lose money: wine, women, and en-
> gineers. While the first two are more pleasant, the third is by far
> the more certain." -- Baron Rothschild, ca. 1800
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] bootcmd
2007-05-31 15:04 ` Matt Gessner
@ 2007-05-31 16:15 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2007-05-31 16:15 UTC (permalink / raw)
To: u-boot
In message <131AF8573CF31945B5B11E4201D3F1E142BC7A@mail3.Avidyne.com> you wrote:
> OK, I tried something slightly different but it doesn't boot.
>
> fsload $addr uImage || chpart nand0,1 || fsload $addr uImage && bootm
> $addr
Try:
=> sete load_alt 'chpart nand0,1 && fsload $addr uImage'
=> sete load_img 'fsload $addr uImage || run load_alt'
=> run load_img && bootm
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
A little suffering is good for the soul.
-- Kirk, "The Corbomite Maneuver", stardate 1514.0
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-05-31 16:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-30 21:08 [U-Boot-Users] bootcmd Matt Gessner
2007-05-30 21:14 ` Timur Tabi
2007-05-30 23:23 ` Wolfgang Denk
2007-05-31 13:14 ` Matt Gessner
2007-05-31 14:02 ` Wolfgang Denk
2007-05-31 15:04 ` Matt Gessner
2007-05-31 16:15 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.