mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
Don't hardcode output directories in boot.desc.
Right now, output directories are hardcoded in boot.desc. This means that
cros_make_image_bootable will still write to the directories mentioned in
build_image, even if it's working on a different directory. This can
mess with the buildbot, because it can cause cros_make_image_bootable
to mess with the files created for existing images.
This change fixes flaky failures where the buildbot fails with warnings
stating that vmlinuz_hd.vblock does not exist. See bug 19956.
BUG=chromium-os:19956
TEST=Run full canary trybot run and verify cros_make_image_bootable uses
files from the right directory now.
Change-Id: Ib390aa84570b077cbc8b69b757998056acc091ea
Reviewed-on: http://gerrit.chromium.org/gerrit/7282
Reviewed-by: Will Drewry <wad@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
9a995bb37c
commit
d1679ab864
@ -324,15 +324,12 @@ verify_image_rootfs() {
|
||||
command line parameters are correct"
|
||||
}
|
||||
|
||||
# Use default of current image location if the output dir doesn't exist.
|
||||
if [ ! -d ${FLAGS_output_dir} ]; then
|
||||
warn "Output dir not found, using ${IMAGE_DIR}."
|
||||
FLAGS_output_dir="${IMAGE_DIR}"
|
||||
FLAGS_rootfs_hash="${IMAGE_DIR}/rootfs.hash"
|
||||
FLAGS_rootfs_mountpoint="${IMAGE_DIR}/rootfs_dir"
|
||||
FLAGS_statefulfs_mountpoint="${IMAGE_DIR}/stateful_dir"
|
||||
FLAGS_espfs_mountpoint="${IMAGE_DIR}/esp"
|
||||
fi
|
||||
# Store output and temporary files next to image.
|
||||
FLAGS_output_dir="${IMAGE_DIR}"
|
||||
FLAGS_rootfs_hash="${IMAGE_DIR}/rootfs.hash"
|
||||
FLAGS_rootfs_mountpoint="${IMAGE_DIR}/rootfs_dir"
|
||||
FLAGS_statefulfs_mountpoint="${IMAGE_DIR}/stateful_dir"
|
||||
FLAGS_espfs_mountpoint="${IMAGE_DIR}/esp"
|
||||
|
||||
# Create the directories if they don't exist.
|
||||
mkdir -p ${FLAGS_rootfs_mountpoint}
|
||||
|
||||
@ -43,14 +43,9 @@ create_boot_desc() {
|
||||
|
||||
cat <<EOF > ${OUTPUT_DIR}/boot.desc
|
||||
--arch="${ARCH}"
|
||||
--output_dir="${OUTPUT_DIR}"
|
||||
--boot_args="${FLAGS_boot_args}"
|
||||
--rootfs_size="${FLAGS_rootfs_size}"
|
||||
--rootfs_hash_pad="${FLAGS_rootfs_hash_pad}"
|
||||
--rootfs_hash="${OUTPUT_DIR}/rootfs.hash"
|
||||
--rootfs_mountpoint="${ROOT_FS_DIR}"
|
||||
--statefulfs_mountpoint="${STATEFUL_FS_DIR}"
|
||||
--espfs_mountpoint="${ESP_FS_DIR}"
|
||||
--verity_error_behavior="${FLAGS_verity_error_behavior}"
|
||||
--verity_max_ios="${FLAGS_verity_max_ios}"
|
||||
--verity_algorithm="${FLAGS_verity_algorithm}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user