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

Side by Side Diff: bin/cros_make_image_bootable

Issue 6549034: kernel build: use %U+1 for dm-verity booting (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build_kernel_image.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 # Script which ensures that a given image has an up-to-date 7 # Script which ensures that a given image has an up-to-date
8 # kernel partition, rootfs integrity hashes, and legacy bootloader configs. 8 # kernel partition, rootfs integrity hashes, and legacy bootloader configs.
9 9
10 # --- BEGIN COMMON.SH BOILERPLATE --- 10 # --- BEGIN COMMON.SH BOILERPLATE ---
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 local statefs="${2-$FLAGS_statefulfs_mountpoint}" 136 local statefs="${2-$FLAGS_statefulfs_mountpoint}"
137 local espfs="${3-$FLAGS_espfs_mountpoint}" 137 local espfs="${3-$FLAGS_espfs_mountpoint}"
138 "${SCRIPTS_DIR}/mount_gpt_image.sh" \ 138 "${SCRIPTS_DIR}/mount_gpt_image.sh" \
139 -u -r "${rootfs}" -s "${statefs}" -e "${espfs}" 139 -u -r "${rootfs}" -s "${statefs}" -e "${espfs}"
140 } 140 }
141 141
142 make_image_bootable() { 142 make_image_bootable() {
143 local image="$1" 143 local image="$1"
144 local use_dev_keys= 144 local use_dev_keys=
145 145
146 # Default to non-verified, non-UUID boot unless verified.
147 # Long term we want root=PARTUUID=uuid+1.
146 cros_root=/dev/sd%D%P 148 cros_root=/dev/sd%D%P
147 if [[ "${FLAGS_arch}" = "arm" ]]; then 149 if [[ "${FLAGS_arch}" = "arm" ]]; then
148 cros_root='/dev/${devname}${rootpart}' 150 cros_root='/dev/${devname}${rootpart}'
149 fi 151 fi
150 if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then 152 if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
151 cros_root=/dev/dm-0 153 cros_root=/dev/dm-0
152 fi 154 fi
153 155
154 trap "mount_gpt_cleanup" EXIT 156 trap "mount_gpt_cleanup" EXIT
155 "${SCRIPTS_DIR}/mount_gpt_image.sh" --from "$(dirname "${image}")" \ 157 "${SCRIPTS_DIR}/mount_gpt_image.sh" --from "$(dirname "${image}")" \
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 mkdir -p ${FLAGS_espfs_mountpoint} 300 mkdir -p ${FLAGS_espfs_mountpoint}
299 301
300 make_image_bootable "${IMAGE}" 302 make_image_bootable "${IMAGE}"
301 verify_image_rootfs "${IMAGE}" 303 verify_image_rootfs "${IMAGE}"
302 304
303 if [ ${FLAGS_cleanup_dirs} -eq ${FLAGS_TRUE} ]; then 305 if [ ${FLAGS_cleanup_dirs} -eq ${FLAGS_TRUE} ]; then
304 rmdir ${FLAGS_rootfs_mountpoint} 306 rmdir ${FLAGS_rootfs_mountpoint}
305 rmdir ${FLAGS_statefulfs_mountpoint} 307 rmdir ${FLAGS_statefulfs_mountpoint}
306 rmdir ${FLAGS_espfs_mountpoint} 308 rmdir ${FLAGS_espfs_mountpoint}
307 fi 309 fi
OLDNEW
« no previous file with comments | « no previous file | build_kernel_image.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698