mirror of
https://git.yoctoproject.org/poky
synced 2026-06-04 02:00:04 +00:00
wic: set bootimg_dir when using image-name artifacts
Running wic with -e to use artifacts from a named image, bootimg_dir was always passed as empty string to partition source plugins. The patch sets bootimg_dir to current value of DEPLOY_DIR_IMAGE, as bootloader artifacts end up in that location as well. (From OE-Core rev: d7f69e6f0932a927b6ce289fb47ba575d7aaa1c8) Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
48ff3fa3a5
commit
7ce1dc13f9
@@ -67,7 +67,8 @@ def find_artifacts(image_name):
|
|||||||
"""
|
"""
|
||||||
bitbake_env_lines = get_bitbake_env_lines()
|
bitbake_env_lines = get_bitbake_env_lines()
|
||||||
|
|
||||||
rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = ""
|
rootfs_dir = kernel_dir = bootimg_dir = ""
|
||||||
|
hdddir = staging_data_dir = native_sysroot = ""
|
||||||
|
|
||||||
for line in bitbake_env_lines.split('\n'):
|
for line in bitbake_env_lines.split('\n'):
|
||||||
if (get_line_val(line, "IMAGE_ROOTFS")):
|
if (get_line_val(line, "IMAGE_ROOTFS")):
|
||||||
@@ -85,8 +86,12 @@ def find_artifacts(image_name):
|
|||||||
if (get_line_val(line, "STAGING_DIR_NATIVE")):
|
if (get_line_val(line, "STAGING_DIR_NATIVE")):
|
||||||
native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE")
|
native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE")
|
||||||
continue
|
continue
|
||||||
|
if (get_line_val(line, "DEPLOY_DIR_IMAGE")):
|
||||||
|
bootimg_dir = get_line_val(line, "DEPLOY_DIR_IMAGE")
|
||||||
|
continue
|
||||||
|
|
||||||
return (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot)
|
return (rootfs_dir, kernel_dir, bootimg_dir, hdddir, staging_data_dir, \
|
||||||
|
native_sysroot)
|
||||||
|
|
||||||
|
|
||||||
CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts
|
CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts
|
||||||
|
|||||||
+4
-3
@@ -134,8 +134,8 @@ def wic_create_subcommand(args, usage_str):
|
|||||||
bootimg_dir = staging_data_dir = hdddir = ""
|
bootimg_dir = staging_data_dir = hdddir = ""
|
||||||
|
|
||||||
if options.image_name:
|
if options.image_name:
|
||||||
(rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot) = \
|
(rootfs_dir, kernel_dir, bootimg_dir, hdddir, \
|
||||||
find_artifacts(options.image_name)
|
staging_data_dir, native_sysroot) = find_artifacts(options.image_name)
|
||||||
|
|
||||||
wks_file = args[0]
|
wks_file = args[0]
|
||||||
|
|
||||||
@@ -172,7 +172,8 @@ def wic_create_subcommand(args, usage_str):
|
|||||||
not_found = not_found_dir = ""
|
not_found = not_found_dir = ""
|
||||||
if not os.path.isdir(rootfs_dir):
|
if not os.path.isdir(rootfs_dir):
|
||||||
(not_found, not_found_dir) = ("rootfs-dir", rootfs_dir)
|
(not_found, not_found_dir) = ("rootfs-dir", rootfs_dir)
|
||||||
elif not os.path.isdir(hdddir) and not os.path.isdir(staging_data_dir):
|
elif not os.path.isdir(bootimg_dir) and not os.path.isdir(hdddir) \
|
||||||
|
and not os.path.isdir(staging_data_dir):
|
||||||
(not_found, not_found_dir) = ("bootimg-dir", bootimg_dir)
|
(not_found, not_found_dir) = ("bootimg-dir", bootimg_dir)
|
||||||
elif not os.path.isdir(kernel_dir):
|
elif not os.path.isdir(kernel_dir):
|
||||||
(not_found, not_found_dir) = ("kernel-dir", kernel_dir)
|
(not_found, not_found_dir) = ("kernel-dir", kernel_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user