summaryrefslogtreecommitdiffstats
path: root/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py')
-rw-r--r--poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py36
1 files changed, 5 insertions, 31 deletions
diff --git a/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index b119c9c2f..170077c22 100644
--- a/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -47,7 +47,7 @@ class IsoImagePlugin(SourcePlugin):
Example kickstart file:
part /boot --source isoimage-isohybrid --sourceparams="loader=grub-efi, \\
- image_name= IsoImage" --ondisk cd --label LIVECD --fstype=ext2
+ image_name= IsoImage" --ondisk cd --label LIVECD
bootloader --timeout=10 --append=" "
In --sourceparams "loader" specifies the bootloader used for booting in EFI
@@ -191,10 +191,9 @@ class IsoImagePlugin(SourcePlugin):
else:
raise WicError("Couldn't find or build initrd, exiting.")
- exec_cmd("cd %s && find . | cpio -o -H newc -R +0:+0 >./initrd.cpio " \
- % initrd_dir, as_shell=True)
- exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \
- % (cr_workdir, initrd), as_shell=True)
+ exec_cmd("cd %s && find . | cpio -o -H newc -R root:root >%s/initrd.cpio " \
+ % (initrd_dir, cr_workdir), as_shell=True)
+ exec_cmd("gzip -f -9 %s/initrd.cpio" % cr_workdir, as_shell=True)
shutil.rmtree(initrd_dir)
return initrd
@@ -253,33 +252,8 @@ class IsoImagePlugin(SourcePlugin):
raise WicError("Couldn't find IMAGE_ROOTFS, exiting.")
part.rootfs_dir = rootfs_dir
-
- # Prepare rootfs.img
deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
img_iso_dir = get_bitbake_var("ISODIR")
- rootfs_img = "%s/rootfs.img" % img_iso_dir
- if not os.path.isfile(rootfs_img):
- # check if rootfs.img is in deploydir
- deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
- image_name = get_bitbake_var("IMAGE_LINK_NAME")
- rootfs_img = "%s/%s.%s" \
- % (deploy_dir, image_name, part.fstype)
-
- if not os.path.isfile(rootfs_img):
- # create image file with type specified by --fstype
- # which contains rootfs
- du_cmd = "du -bks %s" % rootfs_dir
- out = exec_cmd(du_cmd)
- part.size = int(out.split()[0])
- part.extra_space = 0
- part.overhead_factor = 1.2
- part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, \
- native_sysroot)
- rootfs_img = part.source_file
-
- install_cmd = "install -m 0644 %s %s/rootfs.img" \
- % (rootfs_img, isodir)
- exec_cmd(install_cmd)
# Remove the temporary file created by part.prepare_rootfs()
if os.path.isfile(part.source_file):
@@ -342,7 +316,7 @@ class IsoImagePlugin(SourcePlugin):
grub_src = os.path.join(deploy_dir, grub_src_image)
if not os.path.exists(grub_src):
raise WicError("Grub loader %s is not found in %s. "
- "Please build grub-efi first" % (grub_image, deploy_dir))
+ "Please build grub-efi first" % (grub_src_image, deploy_dir))
shutil.copy(grub_src, grub_target)
if not os.path.isfile(os.path.join(target_dir, "boot.cfg")):
OpenPOWER on IntegriCloud