mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
Adding board specific image creation stage
BUG=none TEST=Build a beaglebone image then verify that the beaglebone bootloader was installed into the ESP Change-Id: I1037ee6a61d409e8fd2d66ec6746048a54ce8f14 Reviewed-on: https://gerrit.chromium.org/gerrit/26738 Tested-by: Liam McLoughlin <lmcloughlin@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
This commit is contained in:
parent
5885d772f7
commit
d606ee21b4
20
build_image
20
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
|
||||
|
||||
@ -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 "/".
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user