From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alessio Sangalli Date: Mon, 18 Jul 2011 10:47:51 -0700 Subject: [U-Boot] Environment "image" tool In-Reply-To: References: <4E221C41.1080900@manoweb.com> Message-ID: <4E2471C7.4050401@manoweb.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/18/2011 10:38 AM, Mike Frysinger wrote: > On Sat, Jul 16, 2011 at 19:18, Alessio Sangalli wrote: >> Hi, is there a tool to create an "environemnt image" that I can flash to >> my NAND? > > tools/envcrc will output the binary env blob if you give it the > --binary option. but it does not take arbitrary env inputs. > ./tools/envcrc --binary > env.bin In the meanwhile I've written my own utility, but I do not understand the "it does not take arbitrary env inputs". > sounds like it might be a useful addition to tools/envcrc I could not find it so I rewrote such functionality. If you want, I could extract the relevant part of the code and send it to you. It's quite trivial once I figured out how the U-Boot environment works. >> Alternatively, is there a description of how the environment is read, my >> U-Boot, so that I can write my own program to create such image? > > <4 byte crc>\0[\0]...\0 Yes, and the environment has a size specified by ENV_SIZE bye as