Bug 6449

Summary: do_bootimg hangs in syslinux for large images
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Stuart Weaver <stuart.weaver>
Component: deploymentAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: blloyd, poky.bs.watcher, poky.watcher, richard.purdie
Version: 1.6.2   
Target Milestone: 1.9 M2   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Stuart Weaver 2014-06-13 14:08:35 UTC
I have a image file based on core-image-sato with added gstreamer/vaapi packages. I added a value for IMAGE_ROOTFS_SIZE in the image file and since then bitbake seems to lock up on the do_bootimg task to the extent that I have to kill the python processes. Since then I've deleted the IMAGE_ROOTFS_SIZE and tried with same issue and also replaced it with IMAGE_ROOTFS_EXTRA_SPACE, again same issue. After killing processes again I've added -vvv to bitbake to see what's going on and last messages are below:

+ mcopy -i /home/stuartw/Yocto-Daisy/poky/build/tmp/deploy/images/valleyisland-32/sato-vaapi-image-valleyisland-32-20140613134341.hddimg -s /home/stuartw/Yocto-Daisy/poky/build/tmp/work/valleyisland_32-poky-linux/sato-vaapi-image/1.0-r0/sato-vaapi-image-1.0/hddimg/EFI /home/stuartw/Yocto-Daisy/poky/build/tmp/work/valleyisland_32-poky-linux/sato-vaapi-image/1.0-r0/sato-vaapi-image-1.0/hddimg/initrd /home/stuartw/Yocto-Daisy/poky/build/tmp/work/valleyisland_32-poky-linux/sato-vaapi-image/1.0-r0/sato-vaapi-image-1.0/hddimg/ldlinux.sys /home/stuartw/Yocto-Daisy/poky/build/tmp/work/valleyisland_32-poky-linux/sato-vaapi-image/1.0-r0/sato-vaapi-image-1.0/hddimg/rootfs.img /home/stuartw/Yocto-Daisy/poky/build/tmp/work/valleyisland_32-poky-linux/sato-vaapi-image/1.0-r0/sato-vaapi-image-1.0/hddimg/syslinux.cfg /home/stuartw/Yocto-Daisy/poky/build/tmp/work/valleyisland_32-poky-linux/sato-vaapi-image/1.0-r0/sato-vaapi-image-1.0/hddimg/vmlinuz ::/

File "rootfs.img" too big

+ [ 1 = 1 ]
+ syslinux_hddimg_install
+ syslinux /home/stuartw/Yocto-Daisy/poky/build/tmp/deploy/images/valleyisland-32/sato-vaapi-image-valleyisland-32-20140613134341.hddimg
Comment 1 Mark Hatle 2014-06-13 16:50:55 UTC
Stuart, what is your host system configuration?  The host type, and the bit size, 32-bit or 64-bit?
Comment 2 Stuart Weaver 2014-06-16 07:32:58 UTC
Hi Mark, Didn't think about that but may be an issue, It's an i7-4770S 64-bit but running latest Ubuntu (14.04). Reason I chose 14.04 was because it states that Yocto supports it in the Reference manual.
Comment 3 Mark Hatle 2014-06-16 18:35:21 UTC
My initial thought of a 32-bit overflow would not be the culpret as you are on a 64-bit machine.

I'll see if I can find someone to work on this, or get a newer Ubuntu installed to attempt to reproduce/resolve this.
Comment 4 Blloyd 2014-08-29 14:36:05 UTC
Fedora 20 does the same thing.

For me, it triggers when I add IMAGE_ROOTFS_EXTRA_SPACE = "4096304" to any image.
Instead of failing, it hangs permanently.

FAT32 is limited to 4GB file sizes, so images greater than 4GB will fail.  Instead of erroring out, the image creation hangs.

The above test was to test when it started hanging.  My original discovery was a hung image after increasing the free space.  Since that image was normally @3GB, it didn't take much added to hit 4GB.


+ mcopy -i /embedded/var/bldtmp/master/deploy/images/vortex86/image-omccore-qaimage-vortex86-20140829141839.hddimg -s /embedded/var/bldtmp/master/work/vortex86-poky-linux/image-omccore-qaimage/1.0-r0/image-omccore-qaimage-1.0/hddimg/initrd /embedded/var/bldtmp/master/work/vortex86-poky-linux/image-omccore-qaimage/1.0-r0/image-omccore-qaimage-1.0/hddimg/ldlinux.sys /embedded/var/bldtmp/master/work/vortex86-poky-linux/image-omccore-qaimage/1.0-r0/image-omccore-qaimage-1.0/hddimg/rootfs.img /embedded/var/bldtmp/master/work/vortex86-poky-linux/image-omccore-qaimage/1.0-r0/image-omccore-qaimage-1.0/hddimg/syslinux.cfg /embedded/var/bldtmp/master/work/vortex86-poky-linux/image-omccore-qaimage/1.0-r0/image-omccore-qaimage-1.0/hddimg/vmlinuz ::/

File "rootfs.img" too big


Useful responses to this error would be to warn that hddimg could not be generated and to create all the other selected images, or to fail and exit with an error that the image size is too large for hddimg.

I suspect that .iso images will have the same problem.
Comment 5 Mark Hatle 2015-04-28 18:23:01 UTC
I agree, a warning/error from the image generation is the right way to deal with this.

Robert can you fix this or assign someone to implement the warning?
Comment 6 Robert Yang 2015-07-02 01:37:43 UTC
Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b3c79c4d0f1aaed5b2901ce6d87bd3348ca3435d

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5c71337cd79b03322f39e56c22c3e7634a2d9abd

Use -iso-level 3 for iso when the file is larger than 4GB, and print appropriate error message when for hddimg