[OE-core] [PATCH] image_types: use compress framework to produce checksums for images

Denys Dmytriyenko denis at denix.org
Sun Apr 10 18:49:53 UTC 2016


On Thu, Mar 24, 2016 at 02:14:36PM -0700, Andre McCurdy wrote:
> On Thu, Mar 24, 2016 at 1:45 PM, Alexander Kanevskiy <kad at kad.name> wrote:
> > On Thu, Mar 24, 2016 at 10:32 PM, Andre McCurdy <armccurdy at gmail.com> wrote:
> >>
> >> On Thu, Mar 24, 2016 at 1:16 PM, Alexander D. Kanevskiy <kad at kad.name>
> >> wrote:
> >> > Existing compress framework for producing various compressed versions
> >> > of images is powerfull enough to be extended for other uses, e.g. to
> >> > convert types of images.
> >> >
> >> > It is possible to use it also to produce image checksums at the time
> >> > of image generation. This commit adds support for all supported
> >> > at the moment coreutils hashing algorithms: md5, sha1, sha224,
> >> > sha256, sha384 and sha512
> >> >
> >> > Usage:
> >> > IMAGE_FSTYPES_append = " hddimg.sha256sum"
> >>
> >> I guess a common requirement is for hashes of the compressed images,
> >> not only the uncompressed image.
> >
> > you can easily chain them.
> > " hddimg.sha256sum hddimg.xz hddimg.xz.sha256sum"
> 
> OK. Great. Didn't realise that was going to work!

Well, unless something has been changed/fixed recently (and I believe it was 
Richard's do_rootfs fixes), it didn't use to work as easy as you'd expect and 
it would break in do_rootfs, when trying to nest image types directly, hence 
the implementations like these:

http://cgit.openembedded.org/openembedded-core/tree/meta/classes/image_types_uboot.bbclass
http://arago-project.org/git/?p=meta-arago.git;a=blob;f=meta-arago-distro/classes/image_types_md5.bbclass;hb=HEAD

BTW, at least for md5sum (not sure about sha*), isn't the de-facto standard 
extension .md5 and not .md5sum? Can we change it?

-- 
Denys



More information about the Openembedded-core mailing list