From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] commands/crc32: add compare 2 files crc
Date: Thu, 23 Sep 2010 13:25:48 +0200 [thread overview]
Message-ID: <20100923112548.GC32018@game.jcrosoft.org> (raw)
In-Reply-To: <20100922165422.GI23406@pengutronix.de>
On 18:54 Wed 22 Sep , Sascha Hauer wrote:
> On Wed, Sep 22, 2010 at 06:12:18PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 18:08 Wed 22 Sep , Sascha Hauer wrote:
> > > On Wed, Sep 22, 2010 at 05:25:49PM +0200, Peter Korsgaard wrote:
> > > > >>>>> "Sascha" == Sascha Hauer <s.hauer@pengutronix.de> writes:
> > > >
> > > > Sascha> On Wed, Sep 22, 2010 at 12:36:25PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > >> add -F options to compare to file crc
> > > > >>
> > > > >> it's usefull to compare what you flash in a partition
> > > >
> > > > Sascha> Why don't you use memcmp?
> > > >
> > > > Sascha> memcmp -s uImage -d /dev/nand0.kernel.bb 0 0
> > > >
> > > > It's sometimes interesting to be able to compare a checksum with a file
> > > > on the host (E.G. output of cksum/md5sum/sha1sum/..)
> > >
> > > crc32 can output the crc checksum of a file using the -f option. What
> > > Jean-Christophe added is an option to calculate the checksum of two
> > > files (one given with -f and the other with -F). I just fail to see why
> > > this must be done in a single step instead of using a crc32 followed by
> > > a memcmp.
> > it's faster btw
>
> Yes, that's the remaining argument, so this should be the selling point
> for this patch?
yes
>
> btw, does the patch handle the case when the partition is bigger than
> the image file?
yes
>
> I would also write the image file directly to the flash instead of
> transfering it to RAM and then copy it to flash. That should be even
> faster.
here we just do a crc32 but we could integrate it in the tftp & co to as check
in a second step
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-09-23 11:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 10:36 Jean-Christophe PLAGNIOL-VILLARD
2010-09-22 12:36 ` Sascha Hauer
2010-09-22 13:12 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-22 15:25 ` Peter Korsgaard
2010-09-22 16:08 ` Sascha Hauer
2010-09-22 16:12 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-22 16:54 ` Sascha Hauer
2010-09-23 11:25 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-09-22 19:09 ` Peter Korsgaard
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=20100923112548.GC32018@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.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