mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
isoimage-isohybrid.py: Support adding files/dirs
Add "payload_dir" parameter so user can add other files/dirs to the ISO. (From OE-Core rev: bbe84a33c81066fee96dd28a4009d8404b51e642) Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
da439ffb15
commit
ea5880f9f9
|
@ -216,6 +216,18 @@ class IsoImagePlugin(SourcePlugin):
|
|||
creator.name = source_params['image_name'].strip()
|
||||
logger.debug("The name of the image is: %s", creator.name)
|
||||
|
||||
@staticmethod
|
||||
def _install_payload(source_params, iso_dir):
|
||||
"""
|
||||
Copies contents of payload directory (as specified in 'payload_dir' param) into iso_dir
|
||||
"""
|
||||
|
||||
if source_params.get('payload_dir'):
|
||||
payload_dir = source_params['payload_dir']
|
||||
|
||||
logger.debug("Payload directory: %s", payload_dir)
|
||||
shutil.copytree(payload_dir, iso_dir, symlinks=True, dirs_exist_ok=True)
|
||||
|
||||
@classmethod
|
||||
def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
|
||||
oe_builddir, bootimg_dir, kernel_dir,
|
||||
|
@ -228,6 +240,8 @@ class IsoImagePlugin(SourcePlugin):
|
|||
|
||||
isodir = "%s/ISO" % cr_workdir
|
||||
|
||||
cls._install_payload(source_params, isodir)
|
||||
|
||||
if part.rootfs_dir is None:
|
||||
if not 'ROOTFS_DIR' in rootfs_dir:
|
||||
raise WicError("Couldn't find --rootfs-dir, exiting.")
|
||||
|
|
Loading…
Reference in New Issue
Block a user