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 # Load common constants. This should be the first executable line. | 7 # Load common constants. This should be the first executable line. |
8 # The path to common.sh should be relative to your script's location. | 8 # The path to common.sh should be relative to your script's location. |
9 . "$(dirname "$0")/common.sh" | 9 . "$(dirname "$0")/common.sh" |
10 | 10 |
11 # Load functions and constants for chromeos-install | 11 # Load functions and constants for chromeos-install |
12 . "$(dirname "$0")/chromeos-common.sh" | 12 . "$(dirname "$0")/chromeos-common.sh" |
13 | 13 |
14 # Script must be run inside the chroot. | 14 # Script must be run inside the chroot. |
15 assert_inside_chroot | 15 restart_in_chroot_if_needed $* |
16 | 16 |
17 get_default_board | 17 get_default_board |
18 | 18 |
19 # Flags. | 19 # Flags. |
20 DEFINE_string arch "" \ | 20 DEFINE_string arch "" \ |
21 "The target architecture (\"arm\" or \"x86\")." | 21 "The target architecture (\"arm\" or \"x86\")." |
22 DEFINE_string board "$DEFAULT_BOARD" \ | 22 DEFINE_string board "$DEFAULT_BOARD" \ |
23 "The board to build an image for." | 23 "The board to build an image for." |
24 | 24 |
25 # Usage. | 25 # Usage. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 echo "Copying rootfs..." | 139 echo "Copying rootfs..." |
140 $sudo dd if=${ROOTFS_IMG} of=${OUTDEV} conv=notrunc bs=512 seek=${START_ROOTFS_A
} | 140 $sudo dd if=${ROOTFS_IMG} of=${OUTDEV} conv=notrunc bs=512 seek=${START_ROOTFS_A
} |
141 | 141 |
142 echo "Copying EFI system partition..." | 142 echo "Copying EFI system partition..." |
143 $sudo dd if=${ESP_IMG} of=${OUTDEV} conv=notrunc bs=512 seek=${START_ESP} | 143 $sudo dd if=${ESP_IMG} of=${OUTDEV} conv=notrunc bs=512 seek=${START_ESP} |
144 | 144 |
145 # Clean up temporary files. | 145 # Clean up temporary files. |
146 if [[ -n "${MBR_IMG:-}" ]]; then | 146 if [[ -n "${MBR_IMG:-}" ]]; then |
147 rm "${MBR_IMG}" | 147 rm "${MBR_IMG}" |
148 fi | 148 fi |
OLD | NEW |