OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 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 build a bootable keyfob-based chromeos system image. | 7 # Script to build a bootable keyfob-based chromeos system image. |
8 # It uses debootstrap (see https://wiki.ubuntu.com/DebootstrapChroot) to | 8 # It uses debootstrap (see https://wiki.ubuntu.com/DebootstrapChroot) to |
9 # create a base file system. It then cusotmizes the file system and adds | 9 # create a base file system. It then cusotmizes the file system and adds |
10 # Ubuntu and chromeos specific packages. Finally, it creates a bootable USB | 10 # Ubuntu and chromeos specific packages. Finally, it creates a bootable USB |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 cd - | 201 cd - |
202 | 202 |
203 # File-type mirrors have a different path when bind-mounted inside the chroot | 203 # File-type mirrors have a different path when bind-mounted inside the chroot |
204 # ${FOO/bar/baz} replaces bar with baz when evaluating $FOO. | 204 # ${FOO/bar/baz} replaces bar with baz when evaluating $FOO. |
205 MIRROR_INSIDE="${FLAGS_mirror/$GCLIENT_ROOT//trunk}" | 205 MIRROR_INSIDE="${FLAGS_mirror/$GCLIENT_ROOT//trunk}" |
206 MIRROR2_INSIDE="${FLAGS_mirror2/$GCLIENT_ROOT//trunk}" | 206 MIRROR2_INSIDE="${FLAGS_mirror2/$GCLIENT_ROOT//trunk}" |
207 | 207 |
208 # Write options for customize script into the chroot | 208 # Write options for customize script into the chroot |
209 CUST_OPTS="${SETUP_DIR}/customize_opts.sh" | 209 CUST_OPTS="${SETUP_DIR}/customize_opts.sh" |
210 cat <<EOF > $CUST_OPTS | 210 cat <<EOF > $CUST_OPTS |
| 211 REAL_USER=$USER |
211 SETUP_DIR="$ROOTFS_SETUP_DIR" | 212 SETUP_DIR="$ROOTFS_SETUP_DIR" |
212 KERNEL_VERSION="$KERNEL_VERSION" | 213 KERNEL_VERSION="$KERNEL_VERSION" |
213 SERVER="$MIRROR_INSIDE" | 214 SERVER="$MIRROR_INSIDE" |
214 SUITE="$FLAGS_suite" | 215 SUITE="$FLAGS_suite" |
215 SERVER2="$MIRROR2_INSIDE" | 216 SERVER2="$MIRROR2_INSIDE" |
216 SUITE2="$FLAGS_suite2" | 217 SUITE2="$FLAGS_suite2" |
217 EOF | 218 EOF |
218 # ...and all CHROMEOS_ vars | 219 # ...and all CHROMEOS_ vars |
219 set | egrep "^CHROMEOS_|^BUILDBOT_" >> $CUST_OPTS | 220 set | egrep "^CHROMEOS_|^BUILDBOT_" >> $CUST_OPTS |
220 | 221 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 EOF | 276 EOF |
276 | 277 |
277 OUTSIDE_OUTPUT_DIR="${EXTERNAL_TRUNK_PATH}/src/build/images/${IMAGE_SUBDIR}" | 278 OUTSIDE_OUTPUT_DIR="${EXTERNAL_TRUNK_PATH}/src/build/images/${IMAGE_SUBDIR}" |
278 echo "Done. Image created in ${OUTPUT_DIR}" | 279 echo "Done. Image created in ${OUTPUT_DIR}" |
279 echo "To copy to USB keyfob, outside the chroot, do something like:" | 280 echo "To copy to USB keyfob, outside the chroot, do something like:" |
280 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" | 281 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" |
281 echo "To convert to VMWare image, outside the chroot, do something like:" | 282 echo "To convert to VMWare image, outside the chroot, do something like:" |
282 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 283 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
283 | 284 |
284 trap - EXIT | 285 trap - EXIT |
OLD | NEW |