mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* md5sum arguments
@ 2014-07-01 17:14 Antony Pavlov
  2014-07-02  5:42 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2014-07-01 17:14 UTC (permalink / raw)
  To: barebox

Hi All!

Current 'md5sum' command gets FILE|AREA argument, e.g.


  barebox:/ help md5sum 

  md5sum - calculate MD5 checksum

  Usage: md5sum FILE|AREA...

  Calculate a MD5 digest over a FILE or a memory area.

The *nix 'md5sum' gets [FILE]... argument.
This behavour can be misleading. E.g. today I have tryed this command sequence on
my qemu-malta machine:

  barebox:/ memcpy -s /dev/zero -d 1M 0 0 0x100000
  barebox:/ md5sum 1M

md5sum just hangs!


But this command sequence works fine:

  barebox:/ memcpy -s /dev/zero -d zeros 0 0 0x100000
  barebox:/ md5sum zeros                             
  b6d81b360a5672d80c27430f39153e2c  zeros 0x00000000 ... 0xffffffffffffffff


Do we really need this?

We can use 'addpart' on /dev/memory for creating partial memory device and run md5sum on it.

-- 
Best regards,
  Antony Pavlov

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: md5sum arguments
  2014-07-01 17:14 md5sum arguments Antony Pavlov
@ 2014-07-02  5:42 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2014-07-02  5:42 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Tue, Jul 01, 2014 at 09:14:47PM +0400, Antony Pavlov wrote:
> Hi All!
> 
> Current 'md5sum' command gets FILE|AREA argument, e.g.
> 
> 
>   barebox:/ help md5sum 
> 
>   md5sum - calculate MD5 checksum
> 
>   Usage: md5sum FILE|AREA...
> 
>   Calculate a MD5 digest over a FILE or a memory area.
> 
> The *nix 'md5sum' gets [FILE]... argument.
> This behavour can be misleading. E.g. today I have tryed this command sequence on
> my qemu-malta machine:
> 
>   barebox:/ memcpy -s /dev/zero -d 1M 0 0 0x100000
>   barebox:/ md5sum 1M
> 
> md5sum just hangs!

This is beacuse size is initialized with ~0 and thus the command will
create a md5sum over the whole memory space.

This works:

md5sum 1M+0x100000

> But this command sequence works fine:
> 
>   barebox:/ memcpy -s /dev/zero -d zeros 0 0 0x100000
>   barebox:/ md5sum zeros                             
>   b6d81b360a5672d80c27430f39153e2c  zeros 0x00000000 ... 0xffffffffffffffff
> 
> 
> Do we really need this?

Personally I don't need this, but since we have this feature and it's
not really expensive, why should we remove it?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-02  5:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-01 17:14 md5sum arguments Antony Pavlov
2014-07-02  5:42 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox