diff options
Diffstat (limited to 'scripts/lib/image/engine.py')
| -rw-r--r-- | scripts/lib/image/engine.py | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index f1df8b4db8..e794545e94 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py | |||
| @@ -67,7 +67,7 @@ def find_artifacts(image_name): | |||
| 67 | """ | 67 | """ |
| 68 | bitbake_env_lines = get_bitbake_env_lines() | 68 | bitbake_env_lines = get_bitbake_env_lines() |
| 69 | 69 | ||
| 70 | rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = "" | 70 | rootfs_dir = kernel_dir = bootimg_dir = native_sysroot = "" |
| 71 | 71 | ||
| 72 | for line in bitbake_env_lines.split('\n'): | 72 | for line in bitbake_env_lines.split('\n'): |
| 73 | if (get_line_val(line, "IMAGE_ROOTFS")): | 73 | if (get_line_val(line, "IMAGE_ROOTFS")): |
| @@ -76,17 +76,11 @@ def find_artifacts(image_name): | |||
| 76 | if (get_line_val(line, "STAGING_KERNEL_DIR")): | 76 | if (get_line_val(line, "STAGING_KERNEL_DIR")): |
| 77 | kernel_dir = get_line_val(line, "STAGING_KERNEL_DIR") | 77 | kernel_dir = get_line_val(line, "STAGING_KERNEL_DIR") |
| 78 | continue | 78 | continue |
| 79 | if (get_line_val(line, "HDDDIR")): | ||
| 80 | hdddir = get_line_val(line, "HDDDIR") | ||
| 81 | continue | ||
| 82 | if (get_line_val(line, "STAGING_DATADIR")): | ||
| 83 | staging_data_dir = get_line_val(line, "STAGING_DATADIR") | ||
| 84 | continue | ||
| 85 | if (get_line_val(line, "STAGING_DIR_NATIVE")): | 79 | if (get_line_val(line, "STAGING_DIR_NATIVE")): |
| 86 | native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE") | 80 | native_sysroot = get_line_val(line, "STAGING_DIR_NATIVE") |
| 87 | continue | 81 | continue |
| 88 | 82 | ||
| 89 | return (rootfs_dir, kernel_dir, hdddir, staging_data_dir, native_sysroot) | 83 | return (rootfs_dir, kernel_dir, bootimg_dir, native_sysroot) |
| 90 | 84 | ||
| 91 | 85 | ||
| 92 | CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts | 86 | CANNED_IMAGE_DIR = "lib/image/canned-wks" # relative to scripts |
| @@ -185,18 +179,15 @@ def list_source_plugins(): | |||
| 185 | 179 | ||
| 186 | 180 | ||
| 187 | def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | 181 | def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, |
| 188 | native_sysroot, hdddir, staging_data_dir, scripts_path, | 182 | native_sysroot, scripts_path, image_output_dir, debug, |
| 189 | image_output_dir, debug, properties_file, properties=None): | 183 | properties_file, properties=None): |
| 190 | """ | 184 | """Create image |
| 191 | Create image | ||
| 192 | 185 | ||
| 193 | wks_file - user-defined OE kickstart file | 186 | wks_file - user-defined OE kickstart file |
| 194 | rootfs_dir - absolute path to the build's /rootfs dir | 187 | rootfs_dir - absolute path to the build's /rootfs dir |
| 195 | bootimg_dir - absolute path to the build's boot artifacts directory | 188 | bootimg_dir - absolute path to the build's boot artifacts directory |
| 196 | kernel_dir - absolute path to the build's kernel directory | 189 | kernel_dir - absolute path to the build's kernel directory |
| 197 | native_sysroot - absolute path to the build's native sysroots dir | 190 | native_sysroot - absolute path to the build's native sysroots dir |
| 198 | hdddir - absolute path to the build's HDDDIR dir | ||
| 199 | staging_data_dir - absolute path to the build's STAGING_DATA_DIR dir | ||
| 200 | scripts_path - absolute path to /scripts dir | 191 | scripts_path - absolute path to /scripts dir |
| 201 | image_output_dir - dirname to create for image | 192 | image_output_dir - dirname to create for image |
| 202 | properties_file - use values from this file if nonempty i.e no prompting | 193 | 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, | |||
| 211 | rootfs_dir: IMAGE_ROOTFS | 202 | rootfs_dir: IMAGE_ROOTFS |
| 212 | kernel_dir: STAGING_KERNEL_DIR | 203 | kernel_dir: STAGING_KERNEL_DIR |
| 213 | native_sysroot: STAGING_DIR_NATIVE | 204 | native_sysroot: STAGING_DIR_NATIVE |
| 214 | hdddir: HDDDIR | ||
| 215 | staging_data_dir: STAGING_DATA_DIR | ||
| 216 | 205 | ||
| 217 | In the above case, bootimg_dir remains unset and the image | 206 | In the above case, bootimg_dir remains unset and the |
| 218 | creation code determines which of the passed-in directories to | 207 | plugin-specific image creation code is responsible for finding the |
| 219 | use. | 208 | bootimg artifacts. |
| 220 | 209 | ||
| 221 | In the case where the values are passed in explicitly i.e 'wic -e' | 210 | In the case where the values are passed in explicitly i.e 'wic -e' |
| 222 | is not used but rather the individual 'wic' options are used to | 211 | is not used but rather the individual 'wic' options are used to |
| 223 | explicitly specify these values, hdddir and staging_data_dir will | 212 | explicitly specify these values. |
| 224 | be unset, but bootimg_dir must be explicit i.e. explicitly set to | ||
| 225 | either hdddir or staging_data_dir, depending on the image being | ||
| 226 | generated. The other values (rootfs_dir, kernel_dir, and | ||
| 227 | native_sysroot) correspond to the same values found above via | ||
| 228 | 'bitbake -e'). | ||
| 229 | |||
| 230 | """ | 213 | """ |
| 231 | try: | 214 | try: |
| 232 | oe_builddir = os.environ["BUILDDIR"] | 215 | oe_builddir = os.environ["BUILDDIR"] |
| @@ -242,8 +225,6 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | |||
| 242 | direct_args.insert(0, bootimg_dir) | 225 | direct_args.insert(0, bootimg_dir) |
| 243 | direct_args.insert(0, kernel_dir) | 226 | direct_args.insert(0, kernel_dir) |
| 244 | direct_args.insert(0, native_sysroot) | 227 | direct_args.insert(0, native_sysroot) |
| 245 | direct_args.insert(0, hdddir) | ||
| 246 | direct_args.insert(0, staging_data_dir) | ||
| 247 | direct_args.insert(0, "direct") | 228 | direct_args.insert(0, "direct") |
| 248 | 229 | ||
| 249 | if debug: | 230 | if debug: |
