summaryrefslogtreecommitdiffstats
path: root/scripts/lib/image
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-10-29 17:04:23 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-30 13:03:41 +0000
commit42d0334aa8bf59937262f957f2ea04abc271138b (patch)
tree1b8b5b948c3b711eb9bd666e1e25c2a03b86d917 /scripts/lib/image
parent38400617febd61a1594969c86a6f1712a9d80516 (diff)
downloadast2050-yocto-poky-42d0334aa8bf59937262f957f2ea04abc271138b.zip
ast2050-yocto-poky-42d0334aa8bf59937262f957f2ea04abc271138b.tar.gz
wic: Remove special-case bootimg_dir
The first iterations of wic very shortsightedly catered to two specific use-cases and added special-purpose params for those cases so that they could be directly given their corresponding boot artifacts. (hdddir and staging_data_dir). As more use-cases are added, it becomes rather obvious that such a scheme doens't scale, and additionally causes confusion for plugin writers. This removes those special cases and states explicitly in the help text that plugins are responsible for locating their own boot artifacts. (From OE-Core rev: 6ba3eb5ff7c47aee6b3419fb3a348a634fe74ac9) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/image')
-rw-r--r--scripts/lib/image/engine.py37
-rw-r--r--scripts/lib/image/help.py2
2 files changed, 10 insertions, 29 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index f1df8b4..e794545 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -67,7 +67,7 @@ def find_artifacts(image_name):
"""
bitbake_env_lines = get_bitbake_env_lines()
- rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = ""
+ rootfs_dir = kernel_dir = bootimg_dir = native_sysroot = ""
for line in bitbake_env_lines.split('\n'):
if (get_line_val(line, "IMAGE_ROOTFS")):
@@ -76,17 +76,11 @@ def find_artifacts(image_name):
if (get_line_val(line, "STAGING_KERNEL_DIR")):
kernel_dir = get_line_val(line, "STAGING_KERNEL_DIR")
continue
- if (get_line_val(line, "HDDDIR")):
- hdddir = get_line_val(line, "HDDDIR")
- continue
- if (get_line_val(line, "STAGING_DATADIR")):
- staging_data_dir = get_line_val(line, "STAGING_DATADIR")
- continue
if (get_line_val(line, "STAGING_DIR_NATIVE")):
native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE")
continue
- return (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot)
+ return (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot)
CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts
@@ -185,18 +179,15 @@ def list_source_plugins():
def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
- native_sysroot, hdddir, staging_data_dir, scripts_path,
- image_output_dir, debug, properties_file, properties=None):
- """
- Create image
+ native_sysroot, scripts_path, image_output_dir, debug,
+ properties_file, properties=None):
+ """Create image
wks_file - user-defined OE kickstart file
rootfs_dir - absolute path to the build's /rootfs dir
bootimg_dir - absolute path to the build's boot artifacts directory
kernel_dir - absolute path to the build's kernel directory
native_sysroot - absolute path to the build's native sysroots dir
- hdddir - absolute path to the build's HDDDIR dir
- staging_data_dir - absolute path to the build's STAGING_DATA_DIR dir
scripts_path - absolute path to /scripts dir
image_output_dir - dirname to create for image
properties_file - use values from this file if nonempty i.e no prompting
@@ -211,22 +202,14 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
rootfs_dir: IMAGE_ROOTFS
kernel_dir: STAGING_KERNEL_DIR
native_sysroot: STAGING_DIR_NATIVE
- hdddir: HDDDIR
- staging_data_dir: STAGING_DATA_DIR
- In the above case, bootimg_dir remains unset and the image
- creation code determines which of the passed-in directories to
- use.
+ In the above case, bootimg_dir remains unset and the
+ plugin-specific image creation code is responsible for finding the
+ bootimg artifacts.
In the case where the values are passed in explicitly i.e 'wic -e'
is not used but rather the individual 'wic' options are used to
- explicitly specify these values, hdddir and staging_data_dir will
- be unset, but bootimg_dir must be explicit i.e. explicitly set to
- either hdddir or staging_data_dir, depending on the image being
- generated. The other values (rootfs_dir, kernel_dir, and
- native_sysroot) correspond to the same values found above via
- 'bitbake -e').
-
+ explicitly specify these values.
"""
try:
oe_builddir = os.environ["BUILDDIR"]
@@ -242,8 +225,6 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir,
direct_args.insert(0, bootimg_dir)
direct_args.insert(0, kernel_dir)
direct_args.insert(0, native_sysroot)
- direct_args.insert(0, hdddir)
- direct_args.insert(0, staging_data_dir)
direct_args.insert(0, "direct")
if debug:
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index 0963532..6b74f57 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -189,7 +189,7 @@ DESCRIPTION
-r: IMAGE_ROOTFS
-k: STAGING_KERNEL_DIR
-n: STAGING_DIR_NATIVE
- -b: HDDDIR and STAGING_DATA_DIR (handlers decide which to use)
+ -b: empty (plugin-specific handlers must determine this)
If 'wic -e' is not used, the user needs to select the appropriate
value for -b (as well as -r, -k, and -n).
OpenPOWER on IntegriCloud