Bug 3700

Summary: When inherit boot-directdisk class, the first build fail with error "disk full"
Product: [Build System, Metadata & Runtime] BSPs Reporter: Julien Ciesla <jciesla>
Component: bsps-oe-coreAssignee: Darren Hart <dvhart>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium    
Version: 1.3   
Target Milestone: 1.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Julien Ciesla 2013-01-10 12:42:00 UTC
in the boot-directdisk.bbclass, the call to the mkdosfs fonction is specified with an incorrect calculaled value of the image size.

The size should be calculed with the HDDIMG variable and not the HDDDIR variable. This is the correction:

...
	install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg
	install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys

---BLOCKS=`du -bks ${HDDDIR} | cut -f 1`
+++BLOCKS=`du -bks ${HDDIMG} | cut -f 1`
	BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`

	# Ensure total sectors is an integral number of sectors per
	# track or mcopy will complain. Sectors are 512 bytes, and we
...

Tested working.

Regards
Comment 1 Darren Hart 2013-01-11 22:45:57 UTC
Closing at the request of the reporter. I hadn't yet commented, but the fix noted here was definitely incorrect. This code could use a revamping along the lines of that in bootimg.bbclass, but this particular bug was opened in error.