mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: crc32 command
Date: Sat, 14 May 2011 23:50:07 +0200	[thread overview]
Message-ID: <874o4xj6k0.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20110514171607.GA30963@pengutronix.de> (Sascha Hauer's message of "Sat, 14 May 2011 19:16:07 +0200")

>>>>> "Sascha" == Sascha Hauer <s.hauer@pengutronix.de> writes:

Hi,

 >> The crc32 command is largely legacy from u-boot. Would there be interest
 >> in a cksum command (it's afaik just like the normal crc32 except it also
 >> uses the length) or md5/sha1/sha256sum? We have all the infrastructure,
 >> so it should be easy to add.

 Sascha> md5sum would be very useful. Would it add much to the binary space?

I don't think so. I did a quick little proof of concept implementation
(which would work for any algorithm supported by the digest stuff) and
it ended up like:

 size lib/md5.o common/digest.o commands/md5.o
   text	   data	    bss	    dec	    hex	filename
   2841	    152	      0	   2993	    bb1	lib/md5.o
    339	     16	      0	    355	    163	common/digest.o
    969	      0	      0	    969	    3c9	commands/md5.o

So less than 1K if you already use md5/digest for something else,
otherwise ~4K.

I'll clean up the code a bit more and send a patch.

-- 
Bye, Peter Korsgaard

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-05-14 21:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-13 15:54 Benoît Burnichon
2011-05-13 17:22 ` Sascha Hauer
2011-05-14  7:09   ` Peter Korsgaard
2011-05-14 17:16     ` Sascha Hauer
2011-05-14 21:50       ` Peter Korsgaard [this message]
2011-05-15  8:50         ` Alexey Galakhov

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=874o4xj6k0.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --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