public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alessio Sangalli <alesan@manoweb.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Environment "image" tool
Date: Mon, 18 Jul 2011 12:52:30 -0700	[thread overview]
Message-ID: <4E248EFE.1070804@manoweb.com> (raw)
In-Reply-To: <CAJaTeTrMPN+sMuh1pP7pPyHbnUAwZdeOr9AGozm=f=CrzOt78w@mail.gmail.com>

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

  reply	other threads:[~2011-07-18 19:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-16 23:18 [U-Boot] Environment "image" tool Alessio Sangalli
2011-07-16 23:31 ` Wolfgang Denk
2011-07-17  5:19   ` Alessio Sangalli
2011-07-18 16:22     ` Alessio Sangalli
2011-07-18 17:38 ` Mike Frysinger
2011-07-18 17:47   ` Alessio Sangalli
2011-07-18 17:59     ` Mike Frysinger
2011-07-18 19:52       ` Alessio Sangalli [this message]
2011-07-18 19:56         ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E248EFE.1070804@manoweb.com \
    --to=alesan@manoweb.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox