diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/isoimage-isohybrid.py')
| -rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index b119c9c2fd..0d4f50d1f7 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py | |||
| @@ -47,7 +47,7 @@ class IsoImagePlugin(SourcePlugin): | |||
| 47 | 47 | ||
| 48 | Example kickstart file: | 48 | Example kickstart file: |
| 49 | part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi, \\ | 49 | part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi, \\ |
| 50 | image_name= IsoImage" --ondisk cd --label LIVECD --fstype=ext2 | 50 | image_name= IsoImage" --ondisk cd --label LIVECD |
| 51 | bootloader --timeout=10 --append=" " | 51 | bootloader --timeout=10 --append=" " |
| 52 | 52 | ||
| 53 | In --sourceparams "loader" specifies the bootloader used for booting in EFI | 53 | In --sourceparams "loader" specifies the bootloader used for booting in EFI |
| @@ -253,33 +253,8 @@ class IsoImagePlugin(SourcePlugin): | |||
| 253 | raise WicError("Couldn't find IMAGE_ROOTFS, exiting.") | 253 | raise WicError("Couldn't find IMAGE_ROOTFS, exiting.") |
| 254 | 254 | ||
| 255 | part.rootfs_dir = rootfs_dir | 255 | part.rootfs_dir = rootfs_dir |
| 256 | |||
| 257 | # Prepare rootfs.img | ||
| 258 | deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | 256 | deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") |
| 259 | img_iso_dir = get_bitbake_var("ISODIR") | 257 | img_iso_dir = get_bitbake_var("ISODIR") |
| 260 | rootfs_img = "%s/rootfs.img" % img_iso_dir | ||
| 261 | if not os.path.isfile(rootfs_img): | ||
| 262 | # check if rootfs.img is in deploydir | ||
| 263 | deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | ||
| 264 | image_name = get_bitbake_var("IMAGE_LINK_NAME") | ||
| 265 | rootfs_img = "%s/%s.%s" \ | ||
| 266 | % (deploy_dir, image_name, part.fstype) | ||
| 267 | |||
| 268 | if not os.path.isfile(rootfs_img): | ||
| 269 | # create image file with type specified by --fstype | ||
| 270 | # which contains rootfs | ||
| 271 | du_cmd = "du -bks %s" % rootfs_dir | ||
| 272 | out = exec_cmd(du_cmd) | ||
| 273 | part.size = int(out.split()[0]) | ||
| 274 | part.extra_space = 0 | ||
| 275 | part.overhead_factor = 1.2 | ||
| 276 | part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, \ | ||
| 277 | native_sysroot) | ||
| 278 | rootfs_img = part.source_file | ||
| 279 | |||
| 280 | install_cmd = "install -m 0644 %s %s/rootfs.img" \ | ||
| 281 | % (rootfs_img, isodir) | ||
| 282 | exec_cmd(install_cmd) | ||
| 283 | 258 | ||
| 284 | # Remove the temporary file created by part.prepare_rootfs() | 259 | # Remove the temporary file created by part.prepare_rootfs() |
| 285 | if os.path.isfile(part.source_file): | 260 | if os.path.isfile(part.source_file): |
