OLD | NEW |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 DEFINE_string rootfs_mountpoint "/tmp/rootfs" \ | 92 DEFINE_string rootfs_mountpoint "/tmp/rootfs" \ |
93 "Path where the rootfs can be safely mounted" | 93 "Path where the rootfs can be safely mounted" |
94 DEFINE_string statefulfs_mountpoint "/tmp/statefulfs" \ | 94 DEFINE_string statefulfs_mountpoint "/tmp/statefulfs" \ |
95 "Path where the statefulfs can be safely mounted" | 95 "Path where the statefulfs can be safely mounted" |
96 DEFINE_string espfs_mountpoint "/tmp/espfs" \ | 96 DEFINE_string espfs_mountpoint "/tmp/espfs" \ |
97 "Path where the espfs can be safely mounted" | 97 "Path where the espfs can be safely mounted" |
98 | 98 |
99 DEFINE_boolean use_dev_keys ${FLAGS_FALSE} \ | 99 DEFINE_boolean use_dev_keys ${FLAGS_FALSE} \ |
100 "Use developer keys for signing. (Default: false)" | 100 "Use developer keys for signing. (Default: false)" |
101 | 101 |
| 102 # TODO(sosa): Remove once known images no longer use this in their config. |
| 103 DEFINE_string arm_extra_bootargs "" "DEPRECATED FLAG. Do not use." |
| 104 |
102 # Parse the boot.desc and any overrides | 105 # Parse the boot.desc and any overrides |
103 eval set -- "${BOOT_DESC} ${FLAG_OVERRIDES}" | 106 eval set -- "${BOOT_DESC} ${FLAG_OVERRIDES}" |
104 FLAGS "${@}" || exit 1 | 107 FLAGS "${@}" || exit 1 |
105 | 108 |
106 # Only now can we die on error. shflags functions leak non-zero error codes, | 109 # Only now can we die on error. shflags functions leak non-zero error codes, |
107 # so will die prematurely if 'set -e' is specified before now. | 110 # so will die prematurely if 'set -e' is specified before now. |
108 set -e -u | 111 set -e -u |
109 | 112 |
110 # $1 - Directory where developer rootfs is mounted. | 113 # $1 - Directory where developer rootfs is mounted. |
111 # $2 - Directory where developer stateful_partition is mounted. | 114 # $2 - Directory where developer stateful_partition is mounted. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 mkdir -p ${FLAGS_statefulfs_mountpoint} | 241 mkdir -p ${FLAGS_statefulfs_mountpoint} |
239 mkdir -p ${FLAGS_espfs_mountpoint} | 242 mkdir -p ${FLAGS_espfs_mountpoint} |
240 | 243 |
241 make_image_bootable ${IMAGE} | 244 make_image_bootable ${IMAGE} |
242 | 245 |
243 if [ ${FLAGS_cleanup_dirs} -eq ${FLAGS_TRUE} ]; then | 246 if [ ${FLAGS_cleanup_dirs} -eq ${FLAGS_TRUE} ]; then |
244 rmdir ${FLAGS_rootfs_mountpoint} | 247 rmdir ${FLAGS_rootfs_mountpoint} |
245 rmdir ${FLAGS_statefulfs_mountpoint} | 248 rmdir ${FLAGS_statefulfs_mountpoint} |
246 rmdir ${FLAGS_espfs_mountpoint} | 249 rmdir ${FLAGS_espfs_mountpoint} |
247 fi | 250 fi |
OLD | NEW |