summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/image_types_wic.bbclass2
-rw-r--r--scripts/lib/wic/misc.py9
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py5
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py4
-rwxr-xr-xscripts/wic6
5 files changed, 12 insertions, 14 deletions
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass
index 5cd1c0802d..4d85330d32 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -39,7 +39,7 @@ IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
39USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}" 39USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
40WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}" 40WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
41do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}" 41do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
42do_image_wic[depends] += "wic-tools:do_populate_sysroot" 42do_image_wic[depends] += "${@' '.join('%s-native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk', 'dosfstools', 'mtools'))}"
43WKS_FILE_DEPENDS ??= '' 43WKS_FILE_DEPENDS ??= ''
44DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else '' }" 44DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else '' }"
45 45
diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py
index 3ebae0a6e0..4e07cd659c 100644
--- a/scripts/lib/wic/misc.py
+++ b/scripts/lib/wic/misc.py
@@ -139,14 +139,11 @@ def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""):
139 if pseudo: 139 if pseudo:
140 cmd_and_args = pseudo + cmd_and_args 140 cmd_and_args = pseudo + cmd_and_args
141 141
142 wtools_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", "wic-tools") 142 native_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
143 (native_sysroot, native_sysroot, native_sysroot)
143 144
144 native_paths = \
145 "%s/sbin:%s/usr/sbin:%s/usr/bin:%s/sbin:%s/usr/sbin:%s/usr/bin" % \
146 (wtools_sysroot, wtools_sysroot, wtools_sysroot,
147 native_sysroot, native_sysroot, native_sysroot)
148 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \ 145 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
149 (native_paths, cmd_and_args) 146 (native_paths, cmd_and_args)
150 logger.debug("exec_native_cmd: %s", native_cmd_and_args) 147 logger.debug("exec_native_cmd: %s", native_cmd_and_args)
151 148
152 # If the command isn't in the native sysroot say we failed. 149 # If the command isn't in the native sysroot say we failed.
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index e3518d2f0b..56da468fb5 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -45,10 +45,9 @@ class BootimgPcbiosPlugin(SourcePlugin):
45 @classmethod 45 @classmethod
46 def _get_bootimg_dir(cls, bootimg_dir, dirname): 46 def _get_bootimg_dir(cls, bootimg_dir, dirname):
47 """ 47 """
48 Check if dirname exists in default bootimg_dir or 48 Check if dirname exists in default bootimg_dir or in STAGING_DIR.
49 in wic-tools STAGING_DIR.
50 """ 49 """
51 for result in (bootimg_dir, get_bitbake_var("STAGING_DATADIR", "wic-tools")): 50 for result in (bootimg_dir, get_bitbake_var("STAGING_DATADIR")):
52 if os.path.exists("%s/%s" % (result, dirname)): 51 if os.path.exists("%s/%s" % (result, dirname)):
53 return result 52 return result
54 53
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index db77113232..85f35f7fbe 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -342,7 +342,7 @@ class IsoImagePlugin(SourcePlugin):
342 342
343 if not os.path.isfile("%s/EFI/BOOT/%s" \ 343 if not os.path.isfile("%s/EFI/BOOT/%s" \
344 % (bootimg_dir, grub_image)): 344 % (bootimg_dir, grub_image)):
345 grub_path = get_bitbake_var("STAGING_LIBDIR", "wic-tools") 345 grub_path = get_bitbake_var("STAGING_LIBDIR")
346 if not grub_path: 346 if not grub_path:
347 raise WicError("Couldn't find STAGING_LIBDIR, exiting.") 347 raise WicError("Couldn't find STAGING_LIBDIR, exiting.")
348 348
@@ -411,7 +411,7 @@ class IsoImagePlugin(SourcePlugin):
411 exec_cmd(chmod_cmd) 411 exec_cmd(chmod_cmd)
412 412
413 # Prepare files for legacy boot 413 # Prepare files for legacy boot
414 syslinux_dir = get_bitbake_var("STAGING_DATADIR", "wic-tools") 414 syslinux_dir = get_bitbake_var("STAGING_DATADIR")
415 if not syslinux_dir: 415 if not syslinux_dir:
416 raise WicError("Couldn't find STAGING_DATADIR, exiting.") 416 raise WicError("Couldn't find STAGING_DATADIR, exiting.")
417 417
diff --git a/scripts/wic b/scripts/wic
index 81fc85d693..b8d2a866e1 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -154,8 +154,10 @@ def wic_create_subcommand(options, usage_str):
154 rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name) 154 rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name)
155 kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name) 155 kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name)
156 bootimg_dir = get_bitbake_var("STAGING_DATADIR", options.image_name) 156 bootimg_dir = get_bitbake_var("STAGING_DATADIR", options.image_name)
157 native_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", 157
158 options.image_name) #, cache=False) 158 native_sysroot = options.native_sysroot
159 if options.vars_dir and not native_sysroot:
160 native_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", options.image_name)
159 else: 161 else:
160 if options.build_rootfs: 162 if options.build_rootfs:
161 raise WicError("Image name is not specified, exiting. " 163 raise WicError("Image name is not specified, exiting. "