From c52c5fbb7c8412440b6661eabc85b56bd57e4701 Mon Sep 17 00:00:00 2001 From: Anush Elangovan Date: Wed, 26 Dec 2012 14:49:30 -0800 Subject: [PATCH] Add support for "skip_kernelblock_install" CrOS could be used in devices that dont have custom firmware to interpret the Kernelblock (Part2,4). In such devices skip trying to make the kernelblock BUG=none TEST=./build_image --board=chronos test and verify we dont build the kernel block Change-Id: I3e9a8dd765ea00db2ebf112553d96c08960e544f Reviewed-on: https://gerrit.chromium.org/gerrit/40219 Commit-Queue: Anush Elangovan Reviewed-by: Anush Elangovan Tested-by: Anush Elangovan --- build_library/base_image_util.sh | 10 +++++----- build_library/dev_image_util.sh | 9 +++++---- build_library/test_image_util.sh | 11 ++++++----- 3 files changed, 16 insertions(+), 14 deletions(-) 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 }