build_image_util: pass the disk image through to configure_bootloaders

Required so that configure_bootloaders can now handle installing the
bootloaders as well.
This commit is contained in:
Michael Marineau 2014-08-30 16:39:05 -07:00
parent 25b20b420c
commit 0cc06c9c5c
4 changed files with 10 additions and 5 deletions

View File

@ -186,9 +186,12 @@ start_image() {
} }
finish_image() { finish_image() {
local disk_layout="$1" local image_name="$1"
local root_fs_dir="$2" local disk_layout="$2"
local image_contents="$3" local root_fs_dir="$3"
local image_contents="$4"
local disk_img="${BUILD_DIR}/${image_name}"
# Record directories installed to the state partition. # Record directories installed to the state partition.
# Explicitly ignore entries covered by existing configs. # Explicitly ignore entries covered by existing configs.
@ -206,6 +209,7 @@ finish_image() {
${BUILD_LIBRARY_DIR}/configure_bootloaders.sh \ ${BUILD_LIBRARY_DIR}/configure_bootloaders.sh \
--arch=${ARCH} \ --arch=${ARCH} \
--disk_layout="${disk_layout}" \ --disk_layout="${disk_layout}" \
--disk_image="${disk_img}" \
--boot_dir="${root_fs_dir}"/usr/boot \ --boot_dir="${root_fs_dir}"/usr/boot \
--esp_dir="${root_fs_dir}"/boot \ --esp_dir="${root_fs_dir}"/boot \
--boot_args="${FLAGS_boot_args}" --boot_args="${FLAGS_boot_args}"

View File

@ -24,6 +24,7 @@ DEFINE_string boot_args "" \
"Additional boot arguments to pass to the commandline (Default: '')" "Additional boot arguments to pass to the commandline (Default: '')"
DEFINE_string disk_layout "base" \ DEFINE_string disk_layout "base" \
"The disk layout type to use for this image." "The disk layout type to use for this image."
DEFINE_string disk_image "" "The disk image."
# Parse flags # Parse flags
FLAGS "$@" || exit 1 FLAGS "$@" || exit 1

View File

@ -112,7 +112,7 @@ EOF
# The remount services are provided by coreos-base/coreos-init # The remount services are provided by coreos-base/coreos-init
systemd_enable "${root_fs_dir}" "multi-user.target" "remount-usr.service" systemd_enable "${root_fs_dir}" "multi-user.target" "remount-usr.service"
finish_image "${disk_layout}" "${root_fs_dir}" "${image_contents}" finish_image "${image_name}" "${disk_layout}" "${root_fs_dir}" "${image_contents}"
upload_image -d "${BUILD_DIR}/${image_name}.bz2.DIGESTS" \ upload_image -d "${BUILD_DIR}/${image_name}.bz2.DIGESTS" \
"${BUILD_DIR}/${image_contents}" \ "${BUILD_DIR}/${image_contents}" \
"${BUILD_DIR}/${image_packages}" \ "${BUILD_DIR}/${image_packages}" \

View File

@ -81,7 +81,7 @@ EOF
disable_read_write=${FLAGS_FALSE} disable_read_write=${FLAGS_FALSE}
fi fi
finish_image "${disk_layout}" "${root_fs_dir}" "${image_contents}" finish_image "${image_name}" "${disk_layout}" "${root_fs_dir}" "${image_contents}"
# Make the filesystem un-mountable as read-write. # Make the filesystem un-mountable as read-write.
if [[ ${disable_read_write} -eq ${FLAGS_TRUE} ]]; then if [[ ${disable_read_write} -eq ${FLAGS_TRUE} ]]; then