mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
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:
parent
25b20b420c
commit
0cc06c9c5c
@ -186,9 +186,12 @@ start_image() {
|
||||
}
|
||||
|
||||
finish_image() {
|
||||
local disk_layout="$1"
|
||||
local root_fs_dir="$2"
|
||||
local image_contents="$3"
|
||||
local image_name="$1"
|
||||
local disk_layout="$2"
|
||||
local root_fs_dir="$3"
|
||||
local image_contents="$4"
|
||||
|
||||
local disk_img="${BUILD_DIR}/${image_name}"
|
||||
|
||||
# Record directories installed to the state partition.
|
||||
# Explicitly ignore entries covered by existing configs.
|
||||
@ -206,6 +209,7 @@ finish_image() {
|
||||
${BUILD_LIBRARY_DIR}/configure_bootloaders.sh \
|
||||
--arch=${ARCH} \
|
||||
--disk_layout="${disk_layout}" \
|
||||
--disk_image="${disk_img}" \
|
||||
--boot_dir="${root_fs_dir}"/usr/boot \
|
||||
--esp_dir="${root_fs_dir}"/boot \
|
||||
--boot_args="${FLAGS_boot_args}"
|
||||
|
@ -24,6 +24,7 @@ DEFINE_string boot_args "" \
|
||||
"Additional boot arguments to pass to the commandline (Default: '')"
|
||||
DEFINE_string disk_layout "base" \
|
||||
"The disk layout type to use for this image."
|
||||
DEFINE_string disk_image "" "The disk image."
|
||||
|
||||
# Parse flags
|
||||
FLAGS "$@" || exit 1
|
||||
|
@ -112,7 +112,7 @@ EOF
|
||||
# The remount services are provided by coreos-base/coreos-init
|
||||
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" \
|
||||
"${BUILD_DIR}/${image_contents}" \
|
||||
"${BUILD_DIR}/${image_packages}" \
|
||||
|
@ -81,7 +81,7 @@ EOF
|
||||
disable_read_write=${FLAGS_FALSE}
|
||||
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.
|
||||
if [[ ${disable_read_write} -eq ${FLAGS_TRUE} ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user