mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
wic: Add parameter 'uuid' to Image.add_partition method
With this parameter it's possible to pass generated UUID into Image class to set it for partition when it's created. (From OE-Core rev: e4bc71fa78b0d7a60aa85b8eb09a053545b61b84) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c3148c6199
commit
9f40e6a5e8
@@ -272,7 +272,8 @@ class DirectImageCreator(BaseImageCreator):
|
|||||||
boot=p.active,
|
boot=p.active,
|
||||||
align=p.align,
|
align=p.align,
|
||||||
no_table=p.no_table,
|
no_table=p.no_table,
|
||||||
part_type=p.part_type)
|
part_type=p.part_type,
|
||||||
|
uuid=p.uuid)
|
||||||
|
|
||||||
self._restore_fstab(fstab)
|
self._restore_fstab(fstab)
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Image(object):
|
|||||||
|
|
||||||
def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None,
|
def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None,
|
||||||
label=None, fsopts=None, boot=False, align=None, no_table=False,
|
label=None, fsopts=None, boot=False, align=None, no_table=False,
|
||||||
part_type=None):
|
part_type=None, uuid=None):
|
||||||
""" Add the next partition. Prtitions have to be added in the
|
""" Add the next partition. Prtitions have to be added in the
|
||||||
first-to-last order. """
|
first-to-last order. """
|
||||||
|
|
||||||
@@ -110,7 +110,8 @@ class Image(object):
|
|||||||
'boot': boot, # Bootable flag
|
'boot': boot, # Bootable flag
|
||||||
'align': align, # Partition alignment
|
'align': align, # Partition alignment
|
||||||
'no_table' : no_table, # Partition does not appear in partition table
|
'no_table' : no_table, # Partition does not appear in partition table
|
||||||
'part_type' : part_type} # Partition type
|
'part_type' : part_type, # Partition type
|
||||||
|
'uuid': uuid} # Partition UUID
|
||||||
|
|
||||||
self.__add_partition(part)
|
self.__add_partition(part)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user