All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 5/9] wic: set FAT 16 for msdos partitions
Date: Thu, 30 Mar 2017 21:43:47 +0300	[thread overview]
Message-ID: <52b907479452fee08d1a2b9d186a28b6f49098f1.1490898545.git.ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <cover.1490898545.git.ed.bartosh@linux.intel.com>

Used '-F 16' parameter for mkdosfs to create FAT16 partitions for
'msdos' partition type.

[YOCTO #11137]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 scripts/lib/wic/partition.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index d59351c..6f324ad 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -305,7 +305,12 @@ class Partition():
         if self.label:
             label_str = "-n %s" % self.label
 
-        dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, rootfs_size)
+        size_str = ""
+        if self.fstype == 'msdos':
+            size_str = "-F 16" # FAT 16
+
+        dosfs_cmd = "mkdosfs %s -S 512 %s -C %s %d" % (label_str, size_str,
+                                                       rootfs, rootfs_size)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
@@ -372,7 +377,12 @@ class Partition():
         if self.label:
             label_str = "-n %s" % self.label
 
-        dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
+        size_str = ""
+        if self.fstype == 'msdos':
+            size_str = "-F 16" # FAT 16
+
+        dosfs_cmd = "mkdosfs %s -S 512 %s -C %s %d" % (label_str, size_str,
+                                                       rootfs, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)
 
         chmod_cmd = "chmod 644 %s" % rootfs
-- 
2.1.4



  parent reply	other threads:[~2017-03-30 18:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30 18:43 [PATCH 0/9] wic: Fix fstype handling Ed Bartosh
2017-03-30 18:43 ` [PATCH 1/9] oe-selftest: fix incorrect fstype Ed Bartosh
2017-03-30 18:43 ` [PATCH 2/9] wic: allow only supported fstypes Ed Bartosh
2017-03-30 18:43 ` [PATCH 3/9] wic: don't silently skip unknown fstypes Ed Bartosh
2017-03-30 18:43 ` [PATCH 4/9] wic: support 'msdos' fstype Ed Bartosh
2017-03-30 18:43 ` Ed Bartosh [this message]
2017-03-30 18:43 ` [PATCH 6/9] wic: set correct system id for msdos partitions Ed Bartosh
2017-03-30 18:43 ` [PATCH 7/9] wic: fix list of supported fstypes in help content Ed Bartosh
2017-03-30 18:43 ` [PATCH 8/9] oe-selftest: test creation of msdos partition Ed Bartosh
2017-03-30 18:43 ` [PATCH 9/9] wic: remove prepare_empty_partition_squashfs Ed Bartosh
2017-03-30 19:02 ` ✗ patchtest: failure for wic: Fix fstype handling Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52b907479452fee08d1a2b9d186a28b6f49098f1.1490898545.git.ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.