public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Integity validation (checksum) of a squashfs root file system
Date: Mon, 6 Feb 2012 19:41:20 +0100	[thread overview]
Message-ID: <201202061941.20781.marek.vasut@gmail.com> (raw)
In-Reply-To: <SNT129-DS22380D89FACBB7D7D8C8AAD740@phx.gbl>

> Hi M,
> 
> sha1sum does provide a console output but nothing that could be used for an
> automated check like crc32 -v...

Make it export an env. variable?

M

> 
> Pascal
> 
> -----Original Message-----
> From: Marek Vasut
> Sent: Monday, February 06, 2012 11:34 AM
> To: u-boot at lists.denx.de
> Cc: Pascal Levesque
> Subject: Re: [U-Boot] Integity validation (checksum) of a squashfs root
> file system
> 
> > Hi,
> > 
> > I would like to validate the integrity (checksum) of a squashfs root file
> > system before starting Linux.
> > 
> > Current strategy I am using is:
> > - Wrap squashfs rootfs inside a u-boot image
> > - TFTP download on the target
> > - Download validation using iminfo
> > - Save squashfs rootfs in flash without the image header (Linux failed to
> > load squashfs rootfs if u-boot image is present)
> > 
> > Problems:
> > - I need to hardcode squashfs rootfs offset in u-boot image in order to
> > be able to flash it - U-Boot image header information (size, crc, ...)
> > is lost after a reboot. It is not possible to check the integrity of the
> > flash content.
> > 
> > I would like to save some fields of u-boot image header (size, crc, ...)
> > in u-boot environment variables. And then do an integrity check at boot
> > time.
> > 
> > I have not find a way to extract those fields and save them without
> > changing u-boot code. I have added some code to ?iminfo? command to set
> > environment variables for CRC, size, payload offset, timestamp.
> > 
> > Is it an acceptable way of doing it?
> > Is there a better way of doing it?
> > 
> > Thanks in advance,
> > 
> > Pascal
> 
> Use sha1sum integrated into uboot and stick it at the end?
> 
> M

  reply	other threads:[~2012-02-06 18:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 16:06 [U-Boot] Integity validation (checksum) of a squashfs root file system Pascal Levesque
2012-02-06 16:34 ` Marek Vasut
2012-02-06 17:58   ` Pascal Levesque
2012-02-06 18:41     ` Marek Vasut [this message]
2012-02-07 14:24       ` Pascal Levesque
2012-03-03 13:59     ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2012-02-06 16:03 Pascal Levesque

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=201202061941.20781.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.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