summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2018-10-16 16:29:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-16 20:35:43 +0100
commit95477eaeded87fa069d8832ab44f518e32d3ef6d (patch)
tree34847d7e49b2548e627859668b5652f35a2a71a1 /scripts/lib/wic
parent87082c60dd7dad8cf295971a6f8b853e1820c644 (diff)
downloadpoky-95477eaeded87fa069d8832ab44f518e32d3ef6d.tar.gz
wic: search nonarch STAGING_DATADIR for multilib
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. (From OE-Core rev: dbae9a6f9a1c6cc7d4dd680d7bbda3dfa40f3491) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py10
1 files changed, 9 insertions, 1 deletions
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 @@
26 26
27import logging 27import logging
28import os 28import os
29import re
29 30
30from wic import WicError 31from wic import WicError
31from wic.engine import get_custom_config 32from wic.engine import get_custom_config
@@ -47,10 +48,17 @@ class BootimgPcbiosPlugin(SourcePlugin):
47 """ 48 """
48 Check if dirname exists in default bootimg_dir or in STAGING_DIR. 49 Check if dirname exists in default bootimg_dir or in STAGING_DIR.
49 """ 50 """
50 for result in (bootimg_dir, get_bitbake_var("STAGING_DATADIR")): 51 staging_datadir = get_bitbake_var("STAGING_DATADIR")
52 for result in (bootimg_dir, staging_datadir):
51 if os.path.exists("%s/%s" % (result, dirname)): 53 if os.path.exists("%s/%s" % (result, dirname)):
52 return result 54 return result
53 55
56 # STAGING_DATADIR is expanded with MLPREFIX if multilib is enabled
57 # but dependency syslinux is still populated to original STAGING_DATADIR
58 nonarch_datadir = re.sub('/[^/]*recipe-sysroot', '/recipe-sysroot', staging_datadir)
59 if os.path.exists(os.path.join(nonarch_datadir, dirname)):
60 return nonarch_datadir
61
54 raise WicError("Couldn't find correct bootimg_dir, exiting") 62 raise WicError("Couldn't find correct bootimg_dir, exiting")
55 63
56 @classmethod 64 @classmethod