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

Side by Side Diff: bin/cros_make_image_bootable

Issue 3396011: build_image: Add verity support for ARM. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Created 10 years, 3 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_image » ('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 # Load common constants. This should be the first executable line. 10 # Load common constants. This should be the first executable line.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 "${SCRIPTS_DIR}/mount_gpt_image.sh" \ 118 "${SCRIPTS_DIR}/mount_gpt_image.sh" \
119 -u -r "${rootfs}" -s "${statefs}" -e "${espfs}" 119 -u -r "${rootfs}" -s "${statefs}" -e "${espfs}"
120 } 120 }
121 121
122 make_image_bootable() { 122 make_image_bootable() {
123 local image="$1" 123 local image="$1"
124 local use_dev_keys= 124 local use_dev_keys=
125 125
126 cros_root=/dev/sd%D%P 126 cros_root=/dev/sd%D%P
127 if [[ "${FLAGS_arch}" = "arm" ]]; then 127 if [[ "${FLAGS_arch}" = "arm" ]]; then
128 # TODO(wad) assumed like in build_gpt for now. 128 cros_root='/dev/${devname}${rootpart}'
129 cros_root=/dev/mmcblk1p3
130 fi 129 fi
131 if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then 130 if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
132 cros_root=/dev/dm-0 131 cros_root=/dev/dm-0
133 fi 132 fi
134 133
135 trap "mount_gpt_cleanup" EXIT 134 trap "mount_gpt_cleanup" EXIT
136 ${SCRIPTS_DIR}/mount_gpt_image.sh --from "$(dirname ${image})" \ 135 ${SCRIPTS_DIR}/mount_gpt_image.sh --from "$(dirname ${image})" \
137 --image "$(basename ${image})" -r "${FLAGS_rootfs_mountpoint}" \ 136 --image "$(basename ${image})" -r "${FLAGS_rootfs_mountpoint}" \
138 -s "${FLAGS_statefulfs_mountpoint}" 137 -s "${FLAGS_statefulfs_mountpoint}"
139 138
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 mkdir -p ${FLAGS_statefulfs_mountpoint} 251 mkdir -p ${FLAGS_statefulfs_mountpoint}
253 mkdir -p ${FLAGS_espfs_mountpoint} 252 mkdir -p ${FLAGS_espfs_mountpoint}
254 253
255 make_image_bootable ${IMAGE} 254 make_image_bootable ${IMAGE}
256 255
257 if [ ${FLAGS_cleanup_dirs} -eq ${FLAGS_TRUE} ]; then 256 if [ ${FLAGS_cleanup_dirs} -eq ${FLAGS_TRUE} ]; then
258 rmdir ${FLAGS_rootfs_mountpoint} 257 rmdir ${FLAGS_rootfs_mountpoint}
259 rmdir ${FLAGS_statefulfs_mountpoint} 258 rmdir ${FLAGS_statefulfs_mountpoint}
260 rmdir ${FLAGS_espfs_mountpoint} 259 rmdir ${FLAGS_espfs_mountpoint}
261 fi 260 fi
OLDNEW
« no previous file with comments | « no previous file | build_image » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698