diff options
| author | Chaitanya Vadrevu <chaitanya.vadrevu@ni.com> | 2020-11-03 16:10:32 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-11-08 14:03:20 +0000 |
| commit | ea5880f9f943a94491fef3af3f3cf94cd6087c4a (patch) | |
| tree | 3ca07be8ae2918fd9aed881e8592c3f3c0caf606 /scripts/lib/wic/plugins/source | |
| parent | da439ffb1554ce0a5543e4f6f412fc300aa3b568 (diff) | |
| download | poky-ea5880f9f943a94491fef3af3f3cf94cd6087c4a.tar.gz | |
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>
Diffstat (limited to 'scripts/lib/wic/plugins/source')
| -rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 11326a274b..afc9ea0f8f 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py | |||
| @@ -216,6 +216,18 @@ class IsoImagePlugin(SourcePlugin): | |||
| 216 | creator.name = source_params['image_name'].strip() | 216 | creator.name = source_params['image_name'].strip() |
| 217 | logger.debug("The name of the image is: %s", creator.name) | 217 | logger.debug("The name of the image is: %s", creator.name) |
| 218 | 218 | ||
| 219 | @staticmethod | ||
| 220 | def _install_payload(source_params, iso_dir): | ||
| 221 | """ | ||
| 222 | Copies contents of payload directory (as specified in 'payload_dir' param) into iso_dir | ||
| 223 | """ | ||
| 224 | |||
| 225 | if source_params.get('payload_dir'): | ||
| 226 | payload_dir = source_params['payload_dir'] | ||
| 227 | |||
| 228 | logger.debug("Payload directory: %s", payload_dir) | ||
| 229 | shutil.copytree(payload_dir, iso_dir, symlinks=True, dirs_exist_ok=True) | ||
| 230 | |||
| 219 | @classmethod | 231 | @classmethod |
| 220 | def do_prepare_partition(cls, part, source_params, creator, cr_workdir, | 232 | def do_prepare_partition(cls, part, source_params, creator, cr_workdir, |
| 221 | oe_builddir, bootimg_dir, kernel_dir, | 233 | oe_builddir, bootimg_dir, kernel_dir, |
| @@ -228,6 +240,8 @@ class IsoImagePlugin(SourcePlugin): | |||
| 228 | 240 | ||
| 229 | isodir = "%s/ISO" % cr_workdir | 241 | isodir = "%s/ISO" % cr_workdir |
| 230 | 242 | ||
| 243 | cls._install_payload(source_params, isodir) | ||
| 244 | |||
| 231 | if part.rootfs_dir is None: | 245 | if part.rootfs_dir is None: |
| 232 | if not 'ROOTFS_DIR' in rootfs_dir: | 246 | if not 'ROOTFS_DIR' in rootfs_dir: |
| 233 | raise WicError("Couldn't find --rootfs-dir, exiting.") | 247 | raise WicError("Couldn't find --rootfs-dir, exiting.") |
