mirror of
https://git.yoctoproject.org/poky
synced 2026-09-13 09:49:32 +02:00
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>
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
from wic import WicError
|
from wic import WicError
|
||||||
from wic.engine import get_custom_config
|
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.
|
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)):
|
if os.path.exists("%s/%s" % (result, dirname)):
|
||||||
return result
|
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")
|
raise WicError("Couldn't find correct bootimg_dir, exiting")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user