All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v3 06/11] isoimage-isohybrid: use TRANSLATED_TARGET_ARCH instead of MACHINE_ARCH
Date: Fri, 27 Jan 2017 22:19:43 +0200	[thread overview]
Message-ID: <5eac69f7c2b0dcc239b275a9dd16b616b5d7e6f9.1485547221.git.ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <cover.1485547221.git.ed.bartosh@linux.intel.com>

isoimage-sihybrid plugin uses MACHINE_ARCH to get the name of initrd image.
It doesn't work for all machines, for example for quemux86-64 machine
MACHINE_ARCH is quemux86_64 and initrd name is
core-image-minimal-initramfs-qemux86-64.cpio.gz

Used TRANSLATED_TARGET_ARCH variable to get the initrd image name.
Replaced MACHINE_ARCH->TRANSLATED_TARGET_ARCH in WICVARS variable to
make it available from <image>.env file.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/classes/image-wic.bbclass                       | 4 ++--
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.bbclass
index bd79073..3e98959 100644
--- a/meta/classes/image-wic.bbclass
+++ b/meta/classes/image-wic.bbclass
@@ -2,8 +2,8 @@
 # variables from this list is written to <image>.env file
 WICVARS ?= "\
            BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_BOOT_FILES \
-           IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR MACHINE_ARCH \
-           RECIPE_SYSROOT_NATIVE ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS"
+           IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
+           ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS TRANSLATED_TARGET_ARCH"
 
 WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
 WKS_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 b54a229..e4637a3 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -158,11 +158,11 @@ class IsoImagePlugin(SourcePlugin):
             if not image_type:
                 msger.error("Couldn't find INITRAMFS_FSTYPES, exiting.\n")
 
-            machine_arch = get_bitbake_var("MACHINE_ARCH")
-            if not machine_arch:
-                msger.error("Couldn't find MACHINE_ARCH, exiting.\n")
+            target_arch = get_bitbake_var("TRANSLATED_TARGET_ARCH")
+            if not target_arch:
+                msger.error("Couldn't find TRANSLATED_TARGET_ARCH, exiting.\n")
 
-            initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, machine_arch, image_type))[0]
+            initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0]
 
         if not os.path.exists(initrd):
             # Create initrd from rootfs directory
-- 
2.1.4



  parent reply	other threads:[~2017-01-27 20:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 20:19 [PATCH v3 00/11] Fix for #10835 - WIC should not rely on hddimg creation for finding all needed artifacts Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass Ed Bartosh
2017-01-30 10:25   ` Ola x Nilsson
2017-01-30 17:03     ` Ed Bartosh
2017-01-30 17:27   ` Rick Altherr
2017-01-30 17:18     ` Ed Bartosh
2017-01-30 17:47       ` Rick Altherr
2017-01-30 17:45         ` Ed Bartosh
2017-01-30 18:25           ` Rick Altherr
2017-01-30 18:15             ` Ed Bartosh
2017-01-30 18:41               ` Rick Altherr
2017-01-30 18:42                 ` Ed Bartosh
2017-01-30 19:07                   ` Rick Altherr
2017-02-01 15:00                     ` Ed Bartosh
2017-02-01 16:48                       ` Rick Altherr
2017-01-27 20:19 ` [PATCH v3 02/11] wic: use INITRD_LIVE in isoimage-isohybrid Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 03/11] wic: isoimage-isohybrid: stop using HDDDIR Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 04/11] image-wic: remove HDDDIR from WICVARS Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 05/11] wic: Look for image artifacts in a common location Ed Bartosh
2017-01-27 20:19 ` Ed Bartosh [this message]
2017-01-27 20:19 ` [PATCH v3 07/11] selftest: stop using hddimg in the wic test suite Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 08/11] selftest: wic: fix test_iso_image test case Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 09/11] grub-efi.bbclass: use 'grub-efi-' prefix Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 10/11] wic-tools: add dependency to systemd-boot Ed Bartosh
2017-01-27 20:19 ` [PATCH v3 11/11] isoimage-isohybrid: renamed variable hdd_dir Ed Bartosh
2017-01-27 20:53 ` ✗ patchtest: failure for Fix for #10835 - WIC should not rely on hddimg creation for finding all needed artifacts (rev3) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5eac69f7c2b0dcc239b275a9dd16b616b5d7e6f9.1485547221.git.ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.