summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/canned-wks/mkhybridiso.wks2
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py27
2 files changed, 2 insertions, 27 deletions
diff --git a/scripts/lib/wic/canned-wks/mkhybridiso.wks b/scripts/lib/wic/canned-wks/mkhybridiso.wks
index 9d34e9b477..48c5ac4791 100644
--- a/scripts/lib/wic/canned-wks/mkhybridiso.wks
+++ b/scripts/lib/wic/canned-wks/mkhybridiso.wks
@@ -2,6 +2,6 @@
2# long-description: Creates an EFI and legacy bootable hybrid ISO image 2# long-description: Creates an EFI and legacy bootable hybrid ISO image
3# which can be used on optical media as well as USB media. 3# which can be used on optical media as well as USB media.
4 4
5part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi,image_name=HYBRID_ISO_IMG" --ondisk cd --label HYBRIDISO --fstype=ext4 5part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi,image_name=HYBRID_ISO_IMG" --ondisk cd --label HYBRIDISO
6 6
7bootloader --timeout=15 --append="" 7bootloader --timeout=15 --append=""
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):