diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index 4f8bc44081..c69321b25f 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -276,9 +276,9 @@ create_base_image() { USE_DEV_KEYS="--use_dev_keys" fi - # Place flags before positional args. - ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \ - ${image_name} \ - ${USE_DEV_KEYS} \ - --adjust_part="${FLAGS_adjust_part}" + if [[ ${skip_kernelblock_install} -ne 1 ]]; then + # Place flags before positional args. + ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \ + ${image_name} ${USE_DEV_KEYS} --adjust_part="${FLAGS_adjust_part}" + fi } diff --git a/build_library/dev_image_util.sh b/build_library/dev_image_util.sh index 1e9f1c1e5f..5146be4d86 100755 --- a/build_library/dev_image_util.sh +++ b/build_library/dev_image_util.sh @@ -109,9 +109,10 @@ EOF cleanup_mounts trap - EXIT - if should_build_image ${image_name}; then - ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \ - ${image_name} \ - --force_developer_mode + if [[ ${skip_kernelblock_install} -ne 1 ]]; then + if should_build_image ${image_name}; then + ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${BUILD_DIR}" \ + ${image_name} --force_developer_mode + fi fi } diff --git a/build_library/test_image_util.sh b/build_library/test_image_util.sh index a83588a83f..30a071b919 100755 --- a/build_library/test_image_util.sh +++ b/build_library/test_image_util.sh @@ -81,10 +81,11 @@ mod_image_for_test () { cleanup_mounts trap - EXIT - # Now make it bootable with the flags from build_image. - if should_build_image ${image_name}; then - "${SCRIPTS_DIR}/bin/cros_make_image_bootable" "${BUILD_DIR}" \ - ${image_name} \ - --force_developer_mode + if [[ ${skip_kernelblock_install} -ne 1 ]]; then + # Now make it bootable with the flags from build_image. + if should_build_image ${image_name}; then + "${SCRIPTS_DIR}/bin/cros_make_image_bootable" "${BUILD_DIR}" \ + ${image_name} --force_developer_mode + fi fi }