summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2012-04-11 10:51:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-14 23:11:51 +0100
commit33561a5417a6404c46820f48d1ca681af5ac6dc0 (patch)
tree23132c8c4743fb3748b6db76ed758b398fb801f9
parentbb31c819be4f8f5d7d36b33664ca94e4cbf8ab5b (diff)
downloadpoky-33561a5417a6404c46820f48d1ca681af5ac6dc0.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> Backported to edison by Darren Hart. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 489819b815..09f5b67c94 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -73,6 +73,9 @@ build_boot_bin() {
73 # Account for the filesystem overhead. This includes directory 73 # Account for the filesystem overhead. This includes directory
74 # entries in the clusters as well as the FAT itself. 74 # entries in the clusters as well as the FAT itself.
75 # Assumptions: 75 # Assumptions:
76 # FAT32 (12 or 16 may be selected by mkdosfs, but the extra
77 # padding will be minimal on those smaller images and not
78 # worth the logic here to caclulate the smaller FAT sizes)
76 # < 16 entries per directory 79 # < 16 entries per directory
77 # 8.3 filenames only 80 # 8.3 filenames only
78 81
@@ -102,7 +105,7 @@ build_boot_bin() {
102 BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16))) 105 BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
103 106
104 IMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg 107 IMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
105 mkdosfs -F 32 -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${IMG} ${BLOCKS} 108 mkdosfs -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${IMG} ${BLOCKS}
106 # Copy HDDDIR recursively into the image file directly 109 # Copy HDDDIR recursively into the image file directly
107 mcopy -i ${IMG} -s ${HDDDIR}/* ::/ 110 mcopy -i ${IMG} -s ${HDDDIR}/* ::/
108 111