From: Wolfgang Denk Date: Mon, 05 Jan 2009 15:13:57 +0100 Subject: [U-Boot] Copy environment variables to another board In-Reply-To: <4961D3D6.22933.3E9CEE@g.modugno.elettronika.it> References: <495A0644.29557.A6846B@g.modugno.elettronika.it>, <495A0CE8.31716.C0772D@g.modugno.elettronika.it>, <20081230214236.73FE0833DBB7@gemini.denx.de> <4961D3D6.22933.3E9CEE@g.modugno.elettronika.it> Message-ID: <20090105141357.B091A8387CDB@gemini.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 Dear Giuseppe, in message <4961D3D6.22933.3E9CEE@g.modugno.elettronika.it> you wrote: > > I think the best solution is to use Linux on the source board to copy > the good U-Boot environment in a image file. On the destination > board, I can download (by tftp) the image and store it on the Flash > at the correct address. In this way, I'll use only U-Boot on the > destination board to retrieve the good environment. From that, I can > install kernel and root filesystem. No, that is not a good idea, as this way you would also copy board-specific settings lime serial number, MAC address etc. > > > You could (and probaly should) put the constant part of your > > definitions into the default environment, and use a script image for > > the rest. > > Just now I'm reading about the scripting capabilities of U-Boot. It's > interesting. Starting from which U-Boot version they are available? They have been present forever in U-Boot. They were added in pretty early stages of the PPCBoot project, many, many years ago. > Just another question. I have two redundant U-Boot environments. > Should I copy both of them in two different images, or are they the > same and I can copy the first into the second? These are the same except for the valid flag (one byte at offset 4). 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 If programming was easy, they wouldn't need something as complicated as a human being to do it, now would they? - L. Wall & R. L. Schwartz, _Programming Perl_