[U-Boot] [RFC] skip area in flash/memory commands (cp, cmp, ...)

Andreas Pretzsch apr at cn-eng.de
Tue Apr 12 15:28:46 CEST 2011


Am Montag, den 11.04.2011, 23:08 +0200 schrieb Wolfgang Denk:
> > > But if you really want to keep the existing embedded environment when 
> > > flashing a new U-Boot, then after you have loaded the new U-Boot in RAM 
> > > as usual, all you need is to overwrite its environment with the one 
> > > already in Flash with a single, standard, cp.b instruction. After that 
> > > you can erase Flash and copy from RAM to Flash as usual.
> > 
> > ACK. The most obvious and simple approach for this scenario. And
> 
> No. It may be obvious, but there are far easier ways.
> 
> The most simple way is a sequence of tftp, protect off, erase, cp,
> and finally saveenv.

True, but it would pollute the env with transient variables like
fileaddr, filesize and serveraddr. Nothing serious, of course.
But in case of bootlimit enabled, it would also save "bootcount", which
might be a bad idea...

BTW, not sure if it's worth the effort (or a good idea at all), but one
might think about a concept of transient variables (in standard parser,
not checked hush parser).

-- 

carpe noctem engineering
Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch          Tel. +49-(0)731-5521572
Hahnengasse 3                             Fax: +49-(0)731-5521573
89073 Ulm, Germany                        email: apr at cn-eng.de



More information about the U-Boot mailing list