]> code.ossystems Code Review - openembedded-core.git/commit
bootimg: Use mcopy to construct the hddimg
authorDarren Hart <dvhart@linux.intel.com>
Wed, 11 Apr 2012 17:51:10 +0000 (10:51 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 Apr 2012 22:05:01 +0000 (23:05 +0100)
commitf1a96e95b883d039520c254dd42b3b19ad70ad75
tree2f68eef4b268929e6cece30fd23cf60d87c80656
parent4066c7a3940df2740ad40b21e3ad517a9af20690
bootimg: Use mcopy to construct the hddimg

Fixes [YOCTO 2138]

The initial directory support (-d) added to mkdosfs has proven to be incomplete
and non-compliant with FAT. Rather than continue to maintain this feature and
work around the various issues, we can use mcopy to construct the image.

bootimg.bbclass already depends on mtools-native (although it may not have
needed to previously). No new dependencies are introduced. The image created
passes dosfsck cleanly. Remove the call to dosfsck.

mcopy reported an error with the image we were creating:
Total number of sectors (107574) not a multiple of sectors per track (32)!

Add some logic to ensure the total sector count is an integral number of sectors
per track, including forcing the logical sector size to 512 in the mkdosfs
command.

The du -bks arguments are contradictory, -b is equivalent to "--apparent-size
--block-size=1" and -k is --block-size=1K. If reordered, -kbs will report the
disk usage in bytes insteadk of 1k blocks. Eliminate the ambiguity by using:
du --apparent-size -ks

(From OE-Core rev: 92d2ea1a306354c6565a1b05b51b5719e481840f)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A. Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Backported to poky edison by Darren Hart.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/bootimg.bbclass