From 233b631ece5ee14d057932c146327065064b5196 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Sun, 8 Feb 2015 23:52:00 +0100 Subject: wic: allow creation of partitions not in table For some architectures it is necessary to reserve space on disk without it being present in the partition table. For example, u-boot on i.mx is placed at an offset of 1kB on the sdcard. While it would be possible to create a partition at that offset and place u-boot there, it would then be necessary to update the default u-boot environment to use partition 2 on the mmc instead of partition 1. Signed-off-by: Alexandre Belloni Signed-off-by: Ross Burton --- scripts/lib/wic/kickstart/custom_commands/partition.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/lib/wic/kickstart/custom_commands/partition.py') diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 7a307065f2..9be6b0457b 100644 --- a/scripts/lib/wic/kickstart/custom_commands/partition.py +++ b/scripts/lib/wic/kickstart/custom_commands/partition.py @@ -49,6 +49,7 @@ class Wic_PartData(Mic_PartData): self.source = kwargs.get("source", None) self.sourceparams = kwargs.get("sourceparams", None) self.rootfs = kwargs.get("rootfs-dir", None) + self.no_table = kwargs.get("no-table", False) self.source_file = "" self.size = 0 @@ -61,6 +62,8 @@ class Wic_PartData(Mic_PartData): retval += " --sourceparams=%s" % self.sourceparams if self.rootfs: retval += " --rootfs-dir=%s" % self.rootfs + if self.no_table: + retval += " --no-table" return retval @@ -521,4 +524,7 @@ class Wic_Partition(Mic_Partition): # use specified rootfs path to fill the partition op.add_option("--rootfs-dir", type="string", action="store", dest="rootfs", default=None) + # wether to add the partition in the partition table + op.add_option("--no-table", dest="no_table", action="store_true", + default=False) return op -- cgit 1.2.3-korg