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 from within | 7 # Script to build a bootable keyfob-based chromeos system image from within |
8 # a chromiumos setup. This assumes that all needed packages have been built into | 8 # a chromiumos setup. This assumes that all needed packages have been built into |
9 # the given target's root with binary packages turned on. This script will | 9 # the given target's root with binary packages turned on. This script will |
10 # build the Chrome OS image using only pre-built binary packages. | 10 # build the Chrome OS image using only pre-built binary packages. |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 sudo ln -sf vim "${ROOT_FS_DIR}/usr/local/bin/vi" | 224 sudo ln -sf vim "${ROOT_FS_DIR}/usr/local/bin/vi" |
225 fi | 225 fi |
226 | 226 |
227 # Check that the image has been correctly created. | 227 # Check that the image has been correctly created. |
228 "${SCRIPTS_DIR}/test_image" \ | 228 "${SCRIPTS_DIR}/test_image" \ |
229 --root="$root_fs_dir" \ | 229 --root="$root_fs_dir" \ |
230 --target="$ARCH" | 230 --target="$ARCH" |
231 | 231 |
232 trap - EXIT | 232 trap - EXIT |
233 $SCRIPTS_DIR/mount_gpt_image.sh -u -r "$root_fs_dir" -s "$stateful_dir" | 233 $SCRIPTS_DIR/mount_gpt_image.sh -u -r "$root_fs_dir" -s "$stateful_dir" |
| 234 sudo rm -rf "$root_fs_dir" "$stateful_dir" |
234 echo "Developer image built and stored at $output_img" | 235 echo "Developer image built and stored at $output_img" |
235 } | 236 } |
236 | 237 |
237 # ${DEV_IMAGE_ROOT} specifies the location of where developer packages will | 238 # ${DEV_IMAGE_ROOT} specifies the location of where developer packages will |
238 # be installed on the stateful dir. On a Chromium OS system, this will | 239 # be installed on the stateful dir. On a Chromium OS system, this will |
239 # translate to /usr/local | 240 # translate to /usr/local |
240 DEV_IMAGE_ROOT= | 241 DEV_IMAGE_ROOT= |
241 | 242 |
242 trap "cleanup && delete_prompt" EXIT | 243 trap "cleanup && delete_prompt" EXIT |
243 | 244 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 echo "Done. Image created in ${OUTPUT_DIR}" | 461 echo "Done. Image created in ${OUTPUT_DIR}" |
461 echo "Chromium OS image created as $PRISTINE_IMAGE_NAME" | 462 echo "Chromium OS image created as $PRISTINE_IMAGE_NAME" |
462 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then | 463 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then |
463 echo "Developer image created as $DEVELOPER_IMAGE_NAME" | 464 echo "Developer image created as $DEVELOPER_IMAGE_NAME" |
464 fi | 465 fi |
465 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 466 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
466 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 467 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
467 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 468 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
468 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 469 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
469 echo "from the scripts directory where you entered the chroot." | 470 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |