diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-03-30 17:18:03 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-01 08:14:58 +0100 |
commit | 1586663fb3a39ac99214a36bc9f76c380b9daa75 (patch) | |
tree | a614597bfe96ae1b8ff5416ee3b750318dda6b85 /scripts/lib | |
parent | e5959eb4808238fb10ae60da07c8f4273e0d6abb (diff) | |
download | poky-1586663fb3a39ac99214a36bc9f76c380b9daa75.tar.gz |
wic: set correct system id for msdos partitions
Explicitly set system id 0x6(FAT16) for msdos partitions.
Removed old code that attempts to achieve the same result
using 'parted ... lba off'.
(From OE-Core rev: 230452faf151e277bfb2b49526923f8097755b35)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 79b948a739..f2e6127331 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
@@ -487,6 +487,8 @@ class PartitionedImage(): | |||
487 | parted_fs_type = "fat32" | 487 | parted_fs_type = "fat32" |
488 | elif part.fstype == "msdos": | 488 | elif part.fstype == "msdos": |
489 | parted_fs_type = "fat16" | 489 | parted_fs_type = "fat16" |
490 | if not part.system_id: | ||
491 | part.system_id = '0x6' # FAT16 | ||
490 | else: | 492 | else: |
491 | # Type for ext2/ext3/ext4/btrfs | 493 | # Type for ext2/ext3/ext4/btrfs |
492 | parted_fs_type = "ext2" | 494 | parted_fs_type = "ext2" |
@@ -536,17 +538,6 @@ class PartitionedImage(): | |||
536 | (self.path, part.num, part.system_id), | 538 | (self.path, part.num, part.system_id), |
537 | self.native_sysroot) | 539 | self.native_sysroot) |
538 | 540 | ||
539 | # Parted defaults to enabling the lba flag for fat16 partitions, | ||
540 | # which causes compatibility issues with some firmware (and really | ||
541 | # isn't necessary). | ||
542 | if parted_fs_type == "fat16": | ||
543 | if self.ptable_format == 'msdos': | ||
544 | logger.debug("Disable 'lba' flag for partition '%s' on disk '%s'", | ||
545 | part.num, self.path) | ||
546 | exec_native_cmd("parted -s %s set %d lba off" % \ | ||
547 | (self.path, part.num), | ||
548 | self.native_sysroot) | ||
549 | |||
550 | def cleanup(self): | 541 | def cleanup(self): |
551 | # remove partition images | 542 | # remove partition images |
552 | for image in set(self.partimages): | 543 | for image in set(self.partimages): |