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 to manipulate the tag files in the output of build_image | 7 # Script to manipulate the tag files in the output of build_image |
8 | 8 |
9 # Load common constants. This should be the first executable line. | 9 # Load common constants. This should be the first executable line. |
10 # The path to common.sh should be relative to your script's location. | 10 # The path to common.sh should be relative to your script's location. |
11 . "$(dirname "$0")/common.sh" | 11 . "$(dirname "$0")/common.sh" |
12 | 12 |
13 load_shflags | 13 load_shflags |
14 | 14 |
15 DEFINE_string from "chromiumos_image.bin" \ | 15 DEFINE_string from "chromiumos_image.bin" \ |
16 "Input file name of Chrome OS image to tag/stamp." | 16 "Input file name of Chrome OS image to tag/stamp." |
17 DEFINE_string dev_mode "" \ | 17 DEFINE_string dev_mode "" \ |
18 "(build-info) Tag as a developer mode build (1 to enable, 0 to disable)" | 18 "(build-info) Tag as a developer mode build (1 to enable, 0 to disable)" |
19 DEFINE_string update_firmware "" \ | 19 DEFINE_string update_firmware "" \ |
20 "(auto-update) Force updating firmware (1 to enable, 0 to disable)" | 20 "(auto-update) Force updating firmware (1 to enable, 0 to disable)" |
| 21 DEFINE_string leave_firmware_alone "" \ |
| 22 "(auto-update) For BIOS development use ONLY (1 to enable, 0 to disable)" |
21 DEFINE_string forget_usernames "" \ | 23 DEFINE_string forget_usernames "" \ |
22 "(session-manager) Forget usernames (1 to enable, 0 to disable)" | 24 "(session-manager) Forget usernames (1 to enable, 0 to disable)" |
23 DEFINE_string leave_core "" \ | 25 DEFINE_string leave_core "" \ |
24 "(crash-reporter) Leave core dumps (1 to enable, 0 to disable)" | 26 "(crash-reporter) Leave core dumps (1 to enable, 0 to disable)" |
25 DEFINE_string crosh_workarounds "" \ | 27 DEFINE_string crosh_workarounds "" \ |
26 "(crosh) Keep crosh (1 to keep, 0 to disable *irreversible*)" | 28 "(crosh) Keep crosh (1 to keep, 0 to disable *irreversible*)" |
27 | 29 |
28 # Parameters for manipulating /etc/lsb-release. | 30 # Parameters for manipulating /etc/lsb-release. |
29 DEFINE_boolean remove_test_label false \ | 31 DEFINE_boolean remove_test_label false \ |
30 "(build-info) Remove 'test' suffix in /etc/lsb-release" | 32 "(build-info) Remove 'test' suffix in /etc/lsb-release" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 /root/.dev_mode \ | 137 /root/.dev_mode \ |
136 "${FLAGS_dev_mode}" | 138 "${FLAGS_dev_mode}" |
137 | 139 |
138 process_tag "${do_modification}" \ | 140 process_tag "${do_modification}" \ |
139 "(auto-update) update_firmware" \ | 141 "(auto-update) update_firmware" \ |
140 "${rootfs}" \ | 142 "${rootfs}" \ |
141 /root/.force_update_firmware \ | 143 /root/.force_update_firmware \ |
142 "${FLAGS_update_firmware}" | 144 "${FLAGS_update_firmware}" |
143 | 145 |
144 process_tag "${do_modification}" \ | 146 process_tag "${do_modification}" \ |
| 147 "(auto-update) leave_firmware_alone" \ |
| 148 "${rootfs}" \ |
| 149 /root/.leave_firmware_alone \ |
| 150 "${FLAGS_leave_firmware_alone}" |
| 151 |
| 152 process_tag "${do_modification}" \ |
145 "(session-manager) forget_usernames" \ | 153 "(session-manager) forget_usernames" \ |
146 "${rootfs}" \ | 154 "${rootfs}" \ |
147 /root/.forget_usernames \ | 155 /root/.forget_usernames \ |
148 "${FLAGS_forget_usernames}" | 156 "${FLAGS_forget_usernames}" |
149 | 157 |
150 process_tag "${do_modification}" \ | 158 process_tag "${do_modification}" \ |
151 "(crash-reporter) leave_core" \ | 159 "(crash-reporter) leave_core" \ |
152 "${rootfs}" \ | 160 "${rootfs}" \ |
153 /root/.leave_core \ | 161 /root/.leave_core \ |
154 "${FLAGS_leave_core}" | 162 "${FLAGS_leave_core}" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 process_all_tags "${rootfs}" ${FLAGS_TRUE} | 222 process_all_tags "${rootfs}" ${FLAGS_TRUE} |
215 process_all_lsb_mods "${rootfs}" ${FLAGS_TRUE} | 223 process_all_lsb_mods "${rootfs}" ${FLAGS_TRUE} |
216 | 224 |
217 # this is supposed to be automatically done in mount_image_partition, | 225 # this is supposed to be automatically done in mount_image_partition, |
218 # but it's no harm to explicitly make it again here. | 226 # but it's no harm to explicitly make it again here. |
219 tag_as_needs_to_be_resigned "${rootfs}" | 227 tag_as_needs_to_be_resigned "${rootfs}" |
220 echo "IMAGE IS MODIFIED. PLEASE REMEMBER TO RESIGN YOUR IMAGE." | 228 echo "IMAGE IS MODIFIED. PLEASE REMEMBER TO RESIGN YOUR IMAGE." |
221 else | 229 else |
222 echo "Image is not modified." | 230 echo "Image is not modified." |
223 fi | 231 fi |
OLD | NEW |