* [PATCH 0/2] wic: FAT16 and python module fixes
@ 2013-10-15 21:46 Darren Hart
2013-10-15 21:46 ` [PATCH 1/2] wic: Force lba off for FAT16 partitions Darren Hart
2013-10-15 21:46 ` [PATCH 2/2] wic: Check for external modules Darren Hart
0 siblings, 2 replies; 3+ messages in thread
From: Darren Hart @ 2013-10-15 21:46 UTC (permalink / raw)
To: openembedded-core, Tom Zanussi
The following changes since commit 2b5bac02196b8bd30d223d508f5f7d4300889fd7:
poky: Update Version post release (2013-10-14 16:59:12 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib wic
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=wic
Darren Hart (2):
wic: Force lba off for FAT16 partitions
wic: Check for external modules
scripts/lib/mic/utils/partitionedfs.py | 10 ++++++++++
scripts/wic | 12 ++++++++++++
2 files changed, 22 insertions(+)
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] wic: Force lba off for FAT16 partitions
2013-10-15 21:46 [PATCH 0/2] wic: FAT16 and python module fixes Darren Hart
@ 2013-10-15 21:46 ` Darren Hart
2013-10-15 21:46 ` [PATCH 2/2] wic: Check for external modules Darren Hart
1 sibling, 0 replies; 3+ messages in thread
From: Darren Hart @ 2013-10-15 21:46 UTC (permalink / raw)
To: openembedded-core, Tom Zanussi
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>
---
scripts/lib/mic/utils/partitionedfs.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/scripts/lib/mic/utils/partitionedfs.py b/scripts/lib/mic/utils/partitionedfs.py
index e8cded2..59263ba 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.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] wic: Check for external modules
2013-10-15 21:46 [PATCH 0/2] wic: FAT16 and python module fixes Darren Hart
2013-10-15 21:46 ` [PATCH 1/2] wic: Force lba off for FAT16 partitions Darren Hart
@ 2013-10-15 21:46 ` Darren Hart
1 sibling, 0 replies; 3+ messages in thread
From: Darren Hart @ 2013-10-15 21:46 UTC (permalink / raw)
To: openembedded-core, Tom Zanussi
Since eight unique files import rpm, perform a check at the top level
for the existence of the rpm module print a sensible error message if it
is not. This may be able to be removed if some of the core rpm
dependencies are removed from the mic libs.
Also check for urlgrabber.
This avoids a bracktrace in the event the modules are not installed
which can be very off-putting to would-be users.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
---
scripts/wic | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/scripts/wic b/scripts/wic
index 06e72bb..f665823 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -31,11 +31,23 @@
__version__ = "0.1.0"
+# Python Standard Library modules
import os
import sys
import optparse
import logging
+# External modules
+try:
+ import rpm
+ import urlgrabber
+except ImportError:
+ print("ERROR: failed to import necessary modules.")
+ print("Please ensure the following modules are installed:")
+ print("\trpm");
+ print("\turlgrabber");
+ sys.exit(1)
+
scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
lib_path = scripts_path + '/lib'
sys.path = sys.path + [lib_path]
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-15 21:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 21:46 [PATCH 0/2] wic: FAT16 and python module fixes Darren Hart
2013-10-15 21:46 ` [PATCH 1/2] wic: Force lba off for FAT16 partitions Darren Hart
2013-10-15 21:46 ` [PATCH 2/2] wic: Check for external modules Darren Hart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox