summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2012-01-31 08:41:13 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-01 15:15:14 +0000
commit217584211625b1c496fe5b78aa4765ccf605d2b9 (patch)
treef39759c23ad42bb50fcfb193357d52d1e8ecde09 /meta/classes
parent89b71a5062cfb42d82de3ea62ce50776a2c43bfe (diff)
downloadpoky-217584211625b1c496fe5b78aa4765ccf605d2b9.tar.gz
bootimg: Do not force FAT32 on all images, it violates the FAT specification
Fixes [YOCTO #1940] do_bootimg was performing the FAT overhead calculations assuming FAT32 and then forcing the use of FAT32 with "-F 32" to mkdosfs. The FAT specification is clear on cluster count being the determining factor for FAT size (even if the fs string is set to FAT32, go figure). Syslinux follows this spec, and rightly so, resulting in a failure on core-image-minimal: syslinux: zero FAT sectors (FAT12/16) Drop the "-F 32" from mkdosfs to allow it to select the appropriate FAT size based on cluster count. Leave the FAT overhead calculation in FAT32. This will result in a little extra padding for really small images, but not enough extra to justify recalculating for FAT12 and FAT16. Tested with a core-image-minimal build for atom-pc. do_bootimg completed successfully, and the resulting image was FAT16. (From OE-Core rev: 634137704dd1a205e377a1131ef708f1c981f6b2) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/bootimg.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index e65bef7cca..a717600cf9 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -114,6 +114,9 @@ build_hddimg() {
114 # Account for the filesystem overhead. This includes directory 114 # Account for the filesystem overhead. This includes directory
115 # entries in the clusters as well as the FAT itself. 115 # entries in the clusters as well as the FAT itself.
116 # Assumptions: 116 # Assumptions:
117 # FAT32 (12 or 16 may be selected by mkdosfs, but the extra
118 # padding will be minimal on those smaller images and not
119 # worth the logic here to caclulate the smaller FAT sizes)
117 # < 16 entries per directory 120 # < 16 entries per directory
118 # 8.3 filenames only 121 # 8.3 filenames only
119 122
@@ -142,7 +145,7 @@ build_hddimg() {
142 BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16))) 145 BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
143 146
144 IMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg 147 IMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
145 mkdosfs -F 32 -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${IMG} ${BLOCKS} 148 mkdosfs -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${IMG} ${BLOCKS}
146 # Copy HDDDIR recursively into the image file directly 149 # Copy HDDDIR recursively into the image file directly
147 mcopy -i ${IMG} -s ${HDDDIR}/* ::/ 150 mcopy -i ${IMG} -s ${HDDDIR}/* ::/
148 151