]> code.ossystems Code Review - openembedded-core.git/commitdiff
image-live, image-vm, wic: Remove fs size workaround
authorJussi Kukkonen <jussi.kukkonen@intel.com>
Thu, 2 Jun 2016 10:49:33 +0000 (13:49 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 3 Jun 2016 12:12:14 +0000 (13:12 +0100)
Since mtools has been patched to live with filesystems with sizes
not divisible by sectors-per-track, we no longer need to try to
set the size based on our guess of the sectors-per-track dosfstools is
going to use.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image-live.bbclass
meta/classes/image-vm.bbclass
scripts/lib/wic/partition.py
scripts/lib/wic/plugins/source/bootimg-efi.py
scripts/lib/wic/plugins/source/bootimg-pcbios.py
scripts/lib/wic/plugins/source/isoimage-isohybrid.py

index ea6ced2dcb05f365c772bf19a309606bb230a1fd..f0e6647ac13a8328d75831afd1b28558ad603088 100644 (file)
@@ -202,12 +202,6 @@ build_fat_img() {
        # Determine the final size in blocks accounting for some padding
        BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
 
-       # Ensure total sectors is an integral number of sectors per
-       # track or mcopy will complain. Sectors are 512 bytes, and we
-       # generate images with 32 sectors per track. This calculation is
-       # done in blocks, thus the mod by 16 instead of 32.
-       BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
-
        # mkdosfs will sometimes use FAT16 when it is not appropriate,
        # resulting in a boot failure from SYSLINUX. Use FAT32 for
        # images larger than 512MB, otherwise let mkdosfs decide.
index 2bbd9d36716e5bdc9dff2ded167bb3829bb2d416..72f7b4b1014ece5d7498d189753be4a7866d9387 100644 (file)
@@ -66,12 +66,6 @@ build_boot_dd() {
        BLOCKS=`du -bks $HDDDIR | 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
-       # generate images with 32 sectors per track. This calculation is
-       # done in blocks, thus the mod by 16 instead of 32.
-       BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
-
        # Remove it since mkdosfs would fail when it exists
        rm -f $HDDIMG
        mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS 
index 34fd7d6a721372cadd71aca579ab339800ab0219..30cd320a309b35f74d3b0904285e2f430e14ea5c 100644 (file)
@@ -281,14 +281,6 @@ class Partition():
         msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
                     (extra_blocks, self.mountpoint, blocks))
 
-        # Ensure total sectors is an integral number of sectors per
-        # track or mcopy will complain. Sectors are 512 bytes, and we
-        # generate images with 32 sectors per track. This calculation
-        # is done in blocks, thus the mod by 16 instead of 32. Apply
-        # sector count fix only when needed.
-        if blocks % 16 != 0:
-            blocks += (16 - (blocks % 16))
-
         label_str = "-n boot"
         if self.label:
             label_str = "-n %s" % self.label
index ec13f6d2e50e458264608a310d98dd619a2db53a..3a16861204d2c9843ae6696d88bb22e365634037 100644 (file)
@@ -216,12 +216,6 @@ class BootimgEFIPlugin(SourcePlugin):
         msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
                     (extra_blocks, part.mountpoint, blocks))
 
-        # Ensure total sectors is an integral number of sectors per
-        # track or mcopy will complain. Sectors are 512 bytes, and we
-        # generate images with 32 sectors per track. This calculation is
-        # done in blocks, thus the mod by 16 instead of 32.
-        blocks += (16 - (blocks % 16))
-
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot.img" % cr_workdir
 
index 5b719bf3bb8ffc22517ec9da5322518097df85a0..f204daa3232e0b2e50bf7b1369be01fe912b7824 100644 (file)
@@ -179,12 +179,6 @@ class BootimgPcbiosPlugin(SourcePlugin):
         msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
                     (extra_blocks, part.mountpoint, blocks))
 
-        # Ensure total sectors is an integral number of sectors per
-        # track or mcopy will complain. Sectors are 512 bytes, and we
-        # generate images with 32 sectors per track. This calculation is
-        # done in blocks, thus the mod by 16 instead of 32.
-        blocks += (16 - (blocks % 16))
-
         # dosfs image, created by mkdosfs
         bootimg = "%s/boot.img" % cr_workdir
 
index ed59d85962ff3969f5201a494451e3dc560fc57d..3858fd439b1019621c71f6150f286256274956c8 100644 (file)
@@ -441,12 +441,6 @@ class IsoImagePlugin(SourcePlugin):
                     % (part.mountpoint, blocks)
             msger.debug(msg)
 
-            # Ensure total sectors is an integral number of sectors per
-            # track or mcopy will complain. Sectors are 512 bytes, and we
-            # generate images with 32 sectors per track. This calculation is
-            # done in blocks, thus the mod by 16 instead of 32.
-            blocks += (16 - (blocks % 16))
-
             # dosfs image for EFI boot
             bootimg = "%s/efi.img" % isodir