
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).