mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 12:32:15 +02:00
wic: get rid of get_rootfs and set_rootfs
Got rid of get_rootfs and set_rootfs java-like getter and setter. Renamed rootfs to rootfs_dir to be consistent with the name of kickstart parameter --rootfs-dir. (From OE-Core rev: 51ec52a62ce49d1a1a83489379990f78cfe849f9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4d5d5dd428
commit
5cd222b19f
@@ -233,7 +233,7 @@ class DirectImageCreator(BaseImageCreator):
|
||||
# get rootfs size from bitbake variable if it's not set in .ks file
|
||||
if not part.size:
|
||||
# and if rootfs name is specified for the partition
|
||||
image_name = part.get_rootfs()
|
||||
image_name = part.rootfs_dir
|
||||
if image_name:
|
||||
# Bitbake variable ROOTFS_SIZE is calculated in
|
||||
# Image._get_rootfs_size method from meta/lib/oe/image.py
|
||||
@@ -336,13 +336,13 @@ class DirectImageCreator(BaseImageCreator):
|
||||
|
||||
msg += 'The following build artifacts were used to create the image(s):\n'
|
||||
for part in parts:
|
||||
if part.get_rootfs() is None:
|
||||
if part.rootfs_dir is None:
|
||||
continue
|
||||
if part.mountpoint == '/':
|
||||
suffix = ':'
|
||||
else:
|
||||
suffix = '["%s"]:' % (part.mountpoint or part.label)
|
||||
msg += ' ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.get_rootfs())
|
||||
msg += ' ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.rootfs_dir)
|
||||
|
||||
msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir
|
||||
msg += ' KERNEL_DIR: %s\n' % self.kernel_dir
|
||||
|
||||
@@ -262,26 +262,26 @@ class IsoImagePlugin(SourcePlugin):
|
||||
|
||||
isodir = "%s/ISO" % cr_workdir
|
||||
|
||||
if part.rootfs is None:
|
||||
if part.rootfs_dir is None:
|
||||
if not 'ROOTFS_DIR' in rootfs_dir:
|
||||
msger.error("Couldn't find --rootfs-dir, exiting.\n")
|
||||
rootfs_dir = rootfs_dir['ROOTFS_DIR']
|
||||
else:
|
||||
if part.rootfs in rootfs_dir:
|
||||
rootfs_dir = rootfs_dir[part.rootfs]
|
||||
elif part.rootfs:
|
||||
rootfs_dir = part.rootfs
|
||||
if part.rootfs_dir in rootfs_dir:
|
||||
rootfs_dir = rootfs_dir[part.rootfs_dir]
|
||||
elif part.rootfs_dir:
|
||||
rootfs_dir = part.rootfs_dir
|
||||
else:
|
||||
msg = "Couldn't find --rootfs-dir=%s connection "
|
||||
msg += "or it is not a valid path, exiting.\n"
|
||||
msger.error(msg % part.rootfs)
|
||||
msger.error(msg % part.rootfs_dir)
|
||||
|
||||
if not os.path.isdir(rootfs_dir):
|
||||
rootfs_dir = get_bitbake_var("IMAGE_ROOTFS")
|
||||
if not os.path.isdir(rootfs_dir):
|
||||
msger.error("Couldn't find IMAGE_ROOTFS, exiting.\n")
|
||||
|
||||
part.set_rootfs(rootfs_dir)
|
||||
part.rootfs_dir = rootfs_dir
|
||||
|
||||
# Prepare rootfs.img
|
||||
hdd_dir = get_bitbake_var("HDDDIR")
|
||||
|
||||
@@ -61,23 +61,23 @@ class RootfsPlugin(SourcePlugin):
|
||||
'prepares' the partition to be incorporated into the image.
|
||||
In this case, prepare content for legacy bios boot partition.
|
||||
"""
|
||||
if part.rootfs is None:
|
||||
if part.rootfs_dir is None:
|
||||
if not 'ROOTFS_DIR' in krootfs_dir:
|
||||
msg = "Couldn't find --rootfs-dir, exiting"
|
||||
msger.error(msg)
|
||||
rootfs_dir = krootfs_dir['ROOTFS_DIR']
|
||||
else:
|
||||
if part.rootfs in krootfs_dir:
|
||||
rootfs_dir = krootfs_dir[part.rootfs]
|
||||
elif part.rootfs:
|
||||
rootfs_dir = part.rootfs
|
||||
if part.rootfs_dir in krootfs_dir:
|
||||
rootfs_dir = krootfs_dir[part.rootfs_dir]
|
||||
elif part.rootfs_dir:
|
||||
rootfs_dir = part.rootfs_dir
|
||||
else:
|
||||
msg = "Couldn't find --rootfs-dir=%s connection"
|
||||
msg += " or it is not a valid path, exiting"
|
||||
msger.error(msg % part.rootfs)
|
||||
msger.error(msg % part.rootfs_dir)
|
||||
|
||||
real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
|
||||
|
||||
part.set_rootfs(real_rootfs_dir)
|
||||
part.rootfs_dir = real_rootfs_dir
|
||||
part.prepare_rootfs(cr_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ class RootfsPlugin(SourcePlugin):
|
||||
|
||||
real_rootfs_dir = cls._get_rootfs_dir(rootfs_dir)
|
||||
|
||||
part.set_rootfs(real_rootfs_dir)
|
||||
part.rootfs_dir = real_rootfs_dir
|
||||
part.prepare_rootfs(image_creator_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
|
||||
|
||||
# install syslinux into rootfs partition
|
||||
|
||||
Reference in New Issue
Block a user