[yocto] The build issue of ext2.gz and ext2.gz.u-boot rootfs

Zhenhua Luo zhenhua.luo at nxp.com
Mon Jun 13 05:08:51 PDT 2016


I have submitted a patch, please review.

http://patchwork.openembedded.org/patch/124761/.


Best Regards,

Zhenhua

From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of Zhenhua Luo
Sent: Monday, June 13, 2016 5:53 PM
To: yocto at yoctoproject.org
Subject: [yocto] The build issue of ext2.gz and ext2.gz.u-boot rootfs

Hi all,

I try to use the master branch of poky to build ext2.gz and ext2.gz.u-boot rootfs at the same time, the following error will appear. The same issue can be reproduced for other machines as well.
[...snip...]
| Image Name:   core-image-minimal-b4860qds-2016
| Created:      Sun Jun 12 23:18:26 2016
| Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
| Data Size:    50613518 Bytes = 49427.26 kB = 48.27 MB
| Load Address: 00000000
| Entry Point:  00000000
| mkimage: Can't open /home/yocto/poky/b4860qds/tmp/deploy/images/b4860qds/core-image-minimal-b4860qds-20160613041724.rootfs.ext2.gz: No such file or directory

The following is the definition of do_image_ext2, the ext2.gz file is cleaned by the first "oe_mkimage  ... gzip clean" before the second oe_mkimage execution.
do_image_ext2() {
                oe_mkext234fs ext2 -i 4096
                cd /home/yocto/poky/b4860qds/tmp/deploy/images/b4860qds
                gzip -f -9 -c core-image-minimal-b4860qds-20160613042048.rootfs.ext2 > core-image-minimal-b4860qds-20160613042048.rootfs.ext2.gz
                gzip -f -9 -c core-image-minimal-b4860qds-20160613042048.rootfs.ext2 > core-image-minimal-b4860qds-20160613042048.rootfs.ext2.gz; oe_mkimage core-image-minimal-b4860qds-20160613042048.rootfs.ext2.gz gzip clean
                oe_mkimage core-image-minimal-b4860qds-20160613042048.rootfs.ext2.gz none
                rm core-image-minimal-b4860qds-20160613042048.rootfs.ext2
}

If change[1] is made for poky/meta/classes/image.bbclass, the isuse can be reproduced every time, if change[2] is made for poky/meta/classes/image.bbclass, the isuse can't be reproduced. Without change, the sequence of ctypes is random, accordingly the build issue apprears randomly.
Change[1]:
-    ctypes = set(d.getVar('COMPRESSIONTYPES', True).split())
+    ctypes = sorted(set(d.getVar('COMPRESSIONTYPES', True).split()))
Change[2]:
-    ctypes = set(d.getVar('COMPRESSIONTYPES', True).split())
+    ctypes = sorted(set(d.getVar('COMPRESSIONTYPES', True).split()), reverse=True)

I meet either the following two issues when I only build ext2.gz.u-boot,  the following is the error.
Taskhash mismatch issue:
ERROR: core-image-minimal-1.0-r0 do_image_ext2: Taskhash mismatch bb5f9a754f83ef6534d62ca5ea64d631 verses c56d6505b35344945430e1d6cae3867c for /home/yocto/poky/meta/recipes-core/images/core-image-minimal.bb.do_image_ext2
ERROR: Taskhash mismatch bb5f9a754f83ef6534d62ca5ea64d631 verses c56d6505b35344945430e1d6cae3867c for /home/yocto/poky/meta/recipes-core/images/core-image-minimal.bb.do_image_ext2
Ext2.gz remove issue:
| rm: cannot remove 'core-image-minimal-b4860qds-20160613044631.rootfs.ext2.gz': No such file or directory

Any suggestion of how to fix such issues?


Best Regards,

Zhenhua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160613/4640eb68/attachment.html>


More information about the yocto mailing list