Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3101)

Unified Diff: build_image

Issue 2842044: Copy vmlinuz_hd.vblock only in x86 platform. (Closed) Base URL: ssh://gitrw.chromium.org/crosutils.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_image
diff --git a/build_image b/build_image
index 6dcd9e2c0f60349dfc87a443f40e5d09c870e19c..977e2ca885875a5b43c6b769cf5e0c778d31b126 100755
--- a/build_image
+++ b/build_image
@@ -317,16 +317,18 @@ make_image_bootable() {
# 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
# 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
- echo "No free loop device. Free up a loop device or reboot. exiting. "
- exit 1
+ echo "No free loop device. Free up a loop device or reboot. exiting. "
+ 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
- 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.
local koffset="$(partoffset ${OUTPUT_DIR}/${image_name} 2)"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698