All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] wic: search nonarch STAGING_DATADIR for multilib
@ 2018-10-16  8:29 kai.kang
  2018-10-16  8:29 ` [PATCH 1/1] " kai.kang
  0 siblings, 1 reply; 2+ messages in thread
From: kai.kang @ 2018-10-16  8:29 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Build lib32-core-image-minimal with wic successfully by following config:

  MACHINE = "qemux86-64"
  require conf/multilib.conf
  MULTILIBS = "multilib:lib32"
  DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

  IMAGE_FSTYPES = "wic"


The following changes since commit b02f3bfe2fee291a9db85094e5f31b1933acf871:

  local.conf.sample.extended: add another warning to comment about GLIBC_GENERATE_LOCALES (2018-10-14 23:45:40 +0100)

are available in the Git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/wic
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/wic

Kai Kang (1):
  wic: search nonarch STAGING_DATADIR for multilib

 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--
2.18.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] wic: search nonarch STAGING_DATADIR for multilib
  2018-10-16  8:29 [PATCH 0/1] wic: search nonarch STAGING_DATADIR for multilib kai.kang
@ 2018-10-16  8:29 ` kai.kang
  0 siblings, 0 replies; 2+ messages in thread
From: kai.kang @ 2018-10-16  8:29 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

It fails to build multilib image such as lib32-core-image-minimal with
wic by set 'IMAGE_FSTYPES = "wic"':

| ERROR: Couldn't find correct bootimg_dir, exiting

When multilib is enabled, STAGING_DATADIR is expanded with MLPREFIX. But
dependencies of images such as syslinux is still populated to nonarch
STAGING_DATADIR.

Search nonarch STAGING_DATADIR to fix the error.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index d599112dd7..9347aa7fcb 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -26,6 +26,7 @@
 
 import logging
 import os
+import re
 
 from wic import WicError
 from wic.engine import get_custom_config
@@ -47,10 +48,17 @@ class BootimgPcbiosPlugin(SourcePlugin):
         """
         Check if dirname exists in default bootimg_dir or in STAGING_DIR.
         """
-        for result in (bootimg_dir, get_bitbake_var("STAGING_DATADIR")):
+        staging_datadir = get_bitbake_var("STAGING_DATADIR")
+        for result in (bootimg_dir, staging_datadir):
             if os.path.exists("%s/%s" % (result, dirname)):
                 return result
 
+        # STAGING_DATADIR is expanded with MLPREFIX if multilib is enabled
+        # but dependency syslinux is still populated to original STAGING_DATADIR
+        nonarch_datadir = re.sub('/[^/]*recipe-sysroot', '/recipe-sysroot', staging_datadir)
+        if os.path.exists(os.path.join(nonarch_datadir, dirname)):
+            return nonarch_datadir
+
         raise WicError("Couldn't find correct bootimg_dir, exiting")
 
     @classmethod
-- 
2.18.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-16  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16  8:29 [PATCH 0/1] wic: search nonarch STAGING_DATADIR for multilib kai.kang
2018-10-16  8:29 ` [PATCH 1/1] " kai.kang

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.