mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-27 13:31:56 +01:00
Copy vmlinuz_hd.vblock only in x86 platform.
Review URL: http://codereview.chromium.org/2842044
This commit is contained in:
parent
ca1c2b0430
commit
85d49fc1d9
18
build_image
18
build_image
@ -317,16 +317,18 @@ make_image_bootable() {
|
|||||||
# In original CL: http://codereview.chromium.org/2868044, this was done in
|
# In original CL: http://codereview.chromium.org/2868044, this was done in
|
||||||
# create_base_image(). However, it could break the build if it is a clean
|
# create_base_image(). However, it could break the build if it is a clean
|
||||||
# build because vmlinuz_hd.vblock hasn't been created by build_kernel_image.sh
|
# build because vmlinuz_hd.vblock hasn't been created by build_kernel_image.sh
|
||||||
STATEFUL_LOOP_DEV=$(sudo losetup -f)
|
if [[ "${ARCH}" = "x86" ]]; then
|
||||||
|
STATEFUL_LOOP_DEV=$(sudo losetup -f)
|
||||||
if [ -z "${STATEFUL_LOOP_DEV}" ] ; then
|
if [ -z "${STATEFUL_LOOP_DEV}" ] ; then
|
||||||
echo "No free loop device. Free up a loop device or reboot. exiting. "
|
echo "No free loop device. Free up a loop device or reboot. exiting. "
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
sudo losetup "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_IMG}"
|
||||||
|
sudo mount "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_DIR}"
|
||||||
|
sudo cp "${OUTPUT_DIR}/vmlinuz_hd.vblock" "${STATEFUL_FS_DIR}"
|
||||||
|
sudo umount -d "${STATEFUL_FS_DIR}"
|
||||||
|
STATEFUL_LOOP_DEV=
|
||||||
fi
|
fi
|
||||||
sudo losetup "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_IMG}"
|
|
||||||
sudo mount "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_DIR}"
|
|
||||||
sudo cp "${OUTPUT_DIR}/vmlinuz_hd.vblock" "${STATEFUL_FS_DIR}"
|
|
||||||
sudo umount -d "${STATEFUL_FS_DIR}"
|
|
||||||
STATEFUL_LOOP_DEV=
|
|
||||||
|
|
||||||
# START_KERN_A is set by the first call to install the gpt.
|
# START_KERN_A is set by the first call to install the gpt.
|
||||||
local koffset="$(partoffset ${OUTPUT_DIR}/${image_name} 2)"
|
local koffset="$(partoffset ${OUTPUT_DIR}/${image_name} 2)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user