[U-Boot] Environment "image" tool
Alessio Sangalli
alesan at manoweb.com
Mon Jul 18 21:52:30 CEST 2011
On 07/18/2011 10:59 AM, Mike Frysinger wrote:
> although thinking about it a bit more, you probably could do it in shell.
> (cat <env file> | tr '\n' '\0' ; dd if=/dev/zero count=1 ibs=1) > env.bin
> env_size=8192
> pad_size=$(( env_size - $(set -- $(du -b env.bin); echo $1) - 4))
> dd if=/dev/zero ibs=$pad_size count=1 | tr '\0' '\377' >> env.bin
>
> and then you get the crc and prepend the 4 bytes
> crc env.bin
Hi! I am not sure here how you would calculate the crc in the shell
script. Are you suggesting there is a command "crc(1)"?
> extending tools/envcrc to take a --file option and use that rather
> than the linked in default would be cool imo.
I will have a look at that prgram.
bye!!!
as
More information about the U-Boot
mailing list