1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-15 15:37:03 +00:00

wic: Add argument --hidden to default imager

Add argument --hidden to avoid MS Windows prompting to format
partition after flashing to a USB stick, SD card on another media.
Set Bit 0 (RequiredPartition) to mark that the partition is
required for the platform to function on GUID Partition Table
(GPT).

The new argument simplifies setting RequiredPartition on GPT
through a WKS file and the default imager plugin. Otherwise,
without this feature, to achieve the same result a new imager
plugin has to be implemented and set in WIC_CREATE_EXTRA_ARGS.

(From OE-Core rev: 7a111ff58d7390b79e2e63c8059f6c25f40f8977)

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Leon Anavi
2023-05-15 15:00:10 +03:00
committed by Richard Purdie
parent 7fbf5fdd02
commit 08d26fb375
3 changed files with 9 additions and 0 deletions
+7
View File
@@ -605,6 +605,13 @@ class PartitionedImage():
(self.path, part.num, part.system_id),
self.native_sysroot)
if part.hidden and self.ptable_format == "gpt":
logger.debug("Set hidden attribute for partition '%s' on disk '%s'",
part.num, self.path)
exec_native_cmd("sfdisk --part-attrs %s %s RequiredPartition" % \
(self.path, part.num),
self.native_sysroot)
def cleanup(self):
pass