All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] bootimg: Do not force FAT32 on all images
@ 2012-01-31 17:35 Darren Hart
  2012-01-31 17:35 ` [PATCH 1/1] bootimg: Do not force FAT32 on all images, it violates the FAT specification Darren Hart
  0 siblings, 1 reply; 2+ messages in thread
From: Darren Hart @ 2012-01-31 17:35 UTC (permalink / raw)
  To: openembedded-core, Saul Wold

The following changes since commit d7b13cd42ab8d5f44f97e119b73ec2e363677d26:

  useradd.bbclass: Fix missing quote (2012-01-27 23:57:33 +0000)

are available in the git repository at:
  git://git.yoctoproject.org/user-contrib/dvhart/oe-core dvhart/bug/1940
  http://git.yoctoproject.org/cgit.cgi/user-contrib/dvhart/oe-core/log/?h=dvhart/bug/1940

Darren Hart (1):
  bootimg: Do not force FAT32 on all images, it violates the FAT specification

 meta/classes/bootimg.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

-- 
1.7.6.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] bootimg: Do not force FAT32 on all images, it violates the FAT specification
  2012-01-31 17:35 [PATCH 0/1] bootimg: Do not force FAT32 on all images Darren Hart
@ 2012-01-31 17:35 ` Darren Hart
  0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2012-01-31 17:35 UTC (permalink / raw)
  To: openembedded-core, Saul Wold

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.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 meta/classes/bootimg.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index e65bef7..a717600 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -114,6 +114,9 @@ build_hddimg() {
 		# Account for the filesystem overhead. This includes directory
 		# entries in the clusters as well as the FAT itself.
 		# Assumptions:
+		#   FAT32 (12 or 16 may be selected by mkdosfs, but the extra
+		#   padding will be minimal on those smaller images and not
+		#   worth the logic here to caclulate the smaller FAT sizes)
 		#   < 16 entries per directory
 		#   8.3 filenames only
 
@@ -142,7 +145,7 @@ build_hddimg() {
 		BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
 
 		IMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
-		mkdosfs -F 32 -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${IMG} ${BLOCKS}
+		mkdosfs -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${IMG} ${BLOCKS}
 		# Copy HDDDIR recursively into the image file directly
 		mcopy -i ${IMG} -s ${HDDDIR}/* ::/
 
-- 
1.7.6.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-31 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31 17:35 [PATCH 0/1] bootimg: Do not force FAT32 on all images Darren Hart
2012-01-31 17:35 ` [PATCH 1/1] bootimg: Do not force FAT32 on all images, it violates the FAT specification Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.