diff options
| -rwxr-xr-x | scripts/wic | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/wic b/scripts/wic index f09dbc2e00..8918cb4853 100755 --- a/scripts/wic +++ b/scripts/wic | |||
| @@ -175,11 +175,23 @@ def wic_create_subcommand(args, usage_str): | |||
| 175 | 175 | ||
| 176 | rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name) | 176 | rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name) |
| 177 | kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name) | 177 | kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name) |
| 178 | native_sysroot = os.path.join(get_bitbake_var("RECIPE_SYSROOT_NATIVE", "wic-tools")) | 178 | native_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", |
| 179 | "wic-tools", cache=False) | ||
| 179 | else: | 180 | else: |
| 180 | if options.build_rootfs: | 181 | if options.build_rootfs: |
| 181 | print("Image name is not specified, exiting. (Use -e/--image-name to specify it)\n") | 182 | print("Image name is not specified, exiting. (Use -e/--image-name to specify it)\n") |
| 182 | sys.exit(1) | 183 | sys.exit(1) |
| 184 | native_sysroot = options.native_sysroot | ||
| 185 | |||
| 186 | if not native_sysroot or not os.path.isdir(native_sysroot): | ||
| 187 | print("Building wic-tools...\n") | ||
| 188 | if bitbake_main(BitBakeConfigParameters("bitbake wic-tools".split()), | ||
| 189 | cookerdata.CookerConfiguration()): | ||
| 190 | sys.exit(1) | ||
| 191 | native_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", "wic-tools") | ||
| 192 | if not native_sysroot: | ||
| 193 | print("Unable to find the location of the native tools sysroot to use\n") | ||
| 194 | sys.exit(1) | ||
| 183 | 195 | ||
| 184 | wks_file = args[0] | 196 | wks_file = args[0] |
| 185 | 197 | ||
