summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
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