diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-03-30 17:14:22 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-01 08:14:58 +0100 |
commit | e5959eb4808238fb10ae60da07c8f4273e0d6abb (patch) | |
tree | f99a706b3642ac15ffcd17b74d18e27331720541 /scripts | |
parent | 88e1d55de2612f27d4c043181c37e710b33ecaec (diff) | |
download | poky-e5959eb4808238fb10ae60da07c8f4273e0d6abb.tar.gz |
wic: set FAT 16 for msdos partitions
Used '-F 16' parameter for mkdosfs to create FAT16 partitions for
'msdos' partition type.
[YOCTO #11137]
(From OE-Core rev: b6243a03ced9a719a5801afcee014b03313cc43c)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/partition.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index d59351c500..6f324ad5b3 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -305,7 +305,12 @@ class Partition(): | |||
305 | if self.label: | 305 | if self.label: |
306 | label_str = "-n %s" % self.label | 306 | label_str = "-n %s" % self.label |
307 | 307 | ||
308 | dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, rootfs_size) | 308 | size_str = "" |
309 | if self.fstype == 'msdos': | ||
310 | size_str = "-F 16" # FAT 16 | ||
311 | |||
312 | dosfs_cmd = "mkdosfs %s -S 512 %s -C %s %d" % (label_str, size_str, | ||
313 | rootfs, rootfs_size) | ||
309 | exec_native_cmd(dosfs_cmd, native_sysroot) | 314 | exec_native_cmd(dosfs_cmd, native_sysroot) |
310 | 315 | ||
311 | mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir) | 316 | mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir) |
@@ -372,7 +377,12 @@ class Partition(): | |||
372 | if self.label: | 377 | if self.label: |
373 | label_str = "-n %s" % self.label | 378 | label_str = "-n %s" % self.label |
374 | 379 | ||
375 | dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks) | 380 | size_str = "" |
381 | if self.fstype == 'msdos': | ||
382 | size_str = "-F 16" # FAT 16 | ||
383 | |||
384 | dosfs_cmd = "mkdosfs %s -S 512 %s -C %s %d" % (label_str, size_str, | ||
385 | rootfs, blocks) | ||
376 | exec_native_cmd(dosfs_cmd, native_sysroot) | 386 | exec_native_cmd(dosfs_cmd, native_sysroot) |
377 | 387 | ||
378 | chmod_cmd = "chmod 644 %s" % rootfs | 388 | chmod_cmd = "chmod 644 %s" % rootfs |