diff --git a/build_image b/build_image index ef76f5b489..ed9600b4ce 100755 --- a/build_image +++ b/build_image @@ -109,6 +109,13 @@ OVERLAY_CHROMEOS_DIR="${SRC_ROOT}/third_party/chromiumos-overlay/chromeos" parse_build_image_args +for overlay in $(cros_overlay_list --board "$BOARD"); do + setup_sh="${overlay}/scripts/board_specific_setup.sh" + if [[ -e ${setup_sh} ]]; then + source "${setup_sh}" + fi +done + # Tweak sizes defaulted or given based on any boost given (or defaulted). # This is syntactic sugar to separate concerns in callers, and unify # default values here. @@ -190,10 +197,14 @@ DEV_IMAGE_ROOT="${STATEFUL_FS_DIR}/dev_image" eclean-$BOARD -d packages -check_blacklist +if [[ ${skip_blacklist_check} -ne 1 ]]; then + check_blacklist +fi # Check that the build root is sane. -"${BUILD_LIBRARY_DIR}/test_build_root" --root="${BOARD_ROOT}" +if [[ ${skip_test_build_root} -ne 1 ]]; then + "${BUILD_LIBRARY_DIR}/test_build_root" --root="${BOARD_ROOT}" +fi # Hack to fix bug where x86_64 CHOST line gets incorrectly added. # ToDo(msb): remove this hack. @@ -237,6 +248,11 @@ if should_build_image "${PRISTINE_IMAGE_NAME}"; then "${DEVKEYSDIR}/recovery_key.vbpubk" ${BOOT_FLAG} fi +# Running board-specific setup if any exists. +if type board_setup &>/dev/null; then + board_setup "${BUILD_DIR}/${PRISTINE_IMAGE_NAME}" +fi + # Create a developer image if an image that is based on it is requested. if should_build_image ${CHROMEOS_DEVELOPER_IMAGE_NAME} \ ${CHROMEOS_TEST_IMAGE_NAME} ${CHROMEOS_FACTORY_TEST_IMAGE_NAME}; then diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index 5dabddb9e4..dfc25d1d03 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -193,8 +193,10 @@ create_base_image() { # Don't test the factory install shim if ! should_build_image ${CHROMEOS_FACTORY_INSTALL_SHIM_NAME}; then - # Check that the image has been correctly created. - test_image_content "$ROOT_FS_DIR" + if [[ ${skip_test_image_content} -ne 1 ]]; then + # Check that the image has been correctly created. + test_image_content "$ROOT_FS_DIR" + fi fi # Clean up symlinks so they work on a running target rooted at "/".