summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-05-17 12:49:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-03 23:46:06 +0100
commit684534198f53c8c9b550d5a75787d8dd28d284ed (patch)
tree9151b3290d12d303b9eff76b29150b9cd4c7b89d
parent2d739a352b6aaef0fd5e4de57cc2e0dbcb44f3ae (diff)
downloadpoky-684534198f53c8c9b550d5a75787d8dd28d284ed.tar.gz
isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCH
isoimage-isohybrid plugin fails with this error when trying to find initrd image: initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0] IndexError: list index out of range as it uses TRANSLATED_TARGET_ARCH value as part of the image. This approach stopped to work due to changes in oe core code. initrd file name is made using MACHINE variable. wic can't get value of this variable as it's not included into bitbake -e output. Used basename of deploy dir as MACHINE value to fix the breakage. (From OE-Core rev: cfbb3cc1279ea88ca3e2867f8a409c5120aa1f05) (From OE-Core rev: e26fa1c34c33ffdc678f8073dade0126aff08b40) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image_types_wic.bbclass2
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py6
2 files changed, 3 insertions, 5 deletions
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass
index 4711c24593..5cd1c0802d 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -3,7 +3,7 @@
3WICVARS ?= "\ 3WICVARS ?= "\
4 BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_BOOT_FILES \ 4 BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_BOOT_FILES \
5 IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \ 5 IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
6 ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS TRANSLATED_TARGET_ARCH" 6 ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS"
7 7
8WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks" 8WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
9WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks" 9WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 1ceba62be0..b464263c3d 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -162,11 +162,9 @@ class IsoImagePlugin(SourcePlugin):
162 if not image_type: 162 if not image_type:
163 raise WicError("Couldn't find INITRAMFS_FSTYPES, exiting.") 163 raise WicError("Couldn't find INITRAMFS_FSTYPES, exiting.")
164 164
165 target_arch = get_bitbake_var("TRANSLATED_TARGET_ARCH") 165 machine = os.path.basename(initrd_dir)
166 if not target_arch:
167 raise WicError("Couldn't find TRANSLATED_TARGET_ARCH, exiting.")
168 166
169 initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0] 167 initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, machine, image_type))[0]
170 168
171 if not os.path.exists(initrd): 169 if not os.path.exists(initrd):
172 # Create initrd from rootfs directory 170 # Create initrd from rootfs directory