summaryrefslogtreecommitdiff
path: root/scripts/lib/mic
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2013-10-15 14:46:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-16 13:26:47 +0100
commit30442d432e203e655b7d40b93f7307f475de1614 (patch)
tree8ce251ac8451531295a2fbe7d49c68feba38bfbd /scripts/lib/mic
parent72c23255cc88b5e2cd6f783231e6f42bf5190df7 (diff)
downloadopenembedded-core-30442d432e203e655b7d40b93f7307f475de1614.tar.gz
openembedded-core-30442d432e203e655b7d40b93f7307f475de1614.tar.bz2
openembedded-core-30442d432e203e655b7d40b93f7307f475de1614.zip
wic: Force lba off for FAT16 partitions
If fat16 is specified to the mkpart parted command, parted will default to setting the lba flag which causes certain EFI firmware to fail to detect the filesystem. lba shouldn't be necessary for FAT16 filesystems anyway, explicitly disable it. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic')
-rw-r--r--scripts/lib/mic/utils/partitionedfs.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lib/mic/utils/partitionedfs.py b/scripts/lib/mic/utils/partitionedfs.py
index e8cded26e0..59263ba1a5 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -352,6 +352,16 @@ class PartitionedMount(Mount):
self.__run_parted(["-s", d['disk'].device, "set",
"%d" % p['num'], flag_name, "on"])
+ # Parted defaults to enabling the lba flag for fat16 partitions,
+ # which causes compatibility issues with some firmware (and really
+ # isn't necessary).
+ if parted_fs_type == "fat16":
+ if d['ptable_format'] == 'msdos':
+ msger.debug("Disable 'lba' flag for partition '%s' on disk '%s'" % \
+ (p['num'], d['disk'].device))
+ self.__run_parted(["-s", d['disk'].device, "set",
+ "%d" % p['num'], "lba", "off"])
+
# If the partition table format is "gpt", find out PARTUUIDs for all
# the partitions. And if users specified custom parition type UUIDs,
# set them.