public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: David Wagner <david.wagner@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv2] new tool mkenvimage: generates an env image from an arbitrary config file
Date: Mon, 08 Aug 2011 10:16:53 +0200	[thread overview]
Message-ID: <4E3F9B75.7030100@free-electrons.com> (raw)
In-Reply-To: <CAJaTeTrT_n+AYgMheycY5frB5MT=bCjyp3kcFZWvZu=S74rc0Q@mail.gmail.com>

	Hi,

On 08/06/2011 01:18 PM, Mike Frysinger wrote:
> On Fri, Aug 5, 2011 at 09:23, David Wagner wrote:
>> +#include <endian.h>
>
> this is not portable.  include compiler.h and use the already existing
> uswap/cpu_to/to_cpu/etc... helpers.
>
>> +static void usage(void)
>> +{
>> +       printf("envcrc [-h] [-r] [-b] -s <envrionnment partition
size> -o <output> "
>
> funny, "envcrc" isnt what the filename actually is ...

ah, yes, it began as an attempt to extend envcrc but ended up fairly
different.

> seems like this should also take a padding byte so people can use a
> more sensible 0xff rather than 0x00

Thomas told me that when padding with 0xff, his environment image
wouldn't be taken into account anymore.
I'll add the option anyway, but do you know what could be happening ?

Also, I guess this makes necessary making sure there is a \0 after the
last configuration line.

>> +       if (fwrite(dataptr, 1, datasize, bin_file) != datasize) {
>
> funny enough, you got the size/nemb args in the right order here ;)
> -mike

I wasn't sure whether the proper way of doing it was "read/write 1 byte,
N times" or "read/write the size of the file, 1 time".  I probably
changed my mine in between.


	Thanks for reviewing ;
	David.

-- 
David Wagner, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2011-08-08  8:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05 14:49 [U-Boot] [PATCH] new tool mkenvimage: generates an env image from an arbitrary config file David Wagner
2011-08-05 15:23 ` Thomas Petazzoni
2011-08-05 16:23 ` [U-Boot] [PATCHv2] " David Wagner
2011-08-06 11:18   ` Mike Frysinger
2011-08-08  8:16     ` David Wagner [this message]
2011-08-08  8:46       ` Albert ARIBAUD
2011-08-08  8:56         ` David Wagner
2011-08-08 18:53       ` Mike Frysinger
2011-08-09 10:31 ` [U-Boot] [PATCH] " David Wagner
2011-08-22  1:09   ` Mike Frysinger
2011-08-24 22:12   ` Wolfgang Denk
2011-08-29 12:06 ` [U-Boot] [PATCHv4] " David Wagner
2011-08-30 19:12   ` Mike Frysinger
2011-08-30 19:34   ` Wolfgang Denk
2011-09-01 15:57 ` [U-Boot] [PATCHv5] " David Wagner
2011-09-01 17:47   ` Mike Frysinger
2011-09-02  8:47 ` [U-Boot] [PATCH] " David Wagner
2011-09-02  8:48   ` David Wagner
2011-09-02  8:48 ` [U-Boot] [PATCHv6] " David Wagner
2011-09-02 14:35   ` Mike Frysinger
2011-09-26 12:10   ` Thomas Petazzoni
2011-09-26 13:26 ` [U-Boot] [PATCHv7] " David Wagner
2011-09-30  7:31 ` [U-Boot] [PATCHv8] " David Wagner
2011-10-06 21:17   ` Wolfgang Denk
2011-10-13 18:45 ` [U-Boot] [PATCHv9] " David Wagner
2011-10-14  8:21   ` Detlev Zundel
2011-10-14 17:16 ` [U-Boot] [PATCHv10] " David Wagner
2011-10-19  8:22   ` Thomas Petazzoni
2011-10-23 20:44   ` Wolfgang Denk
2011-10-31  0:49     ` Mike Frysinger
2011-11-22  8:48   ` Stefano Babic

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=4E3F9B75.7030100@free-electrons.com \
    --to=david.wagner@free-electrons.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