| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 # Re-run ldconfig to fix /etc/ldconfig.so.cache. | 342 # Re-run ldconfig to fix /etc/ldconfig.so.cache. |
| 343 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" | 343 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" |
| 344 | 344 |
| 345 # Mark the image as a developer image (input to chromeos_startup). | 345 # Mark the image as a developer image (input to chromeos_startup). |
| 346 sudo mkdir -p "${ROOT_FS_DIR}/root" | 346 sudo mkdir -p "${ROOT_FS_DIR}/root" |
| 347 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" | 347 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" |
| 348 | 348 |
| 349 # Additional changes to developer image. | 349 # Additional changes to developer image. |
| 350 | 350 |
| 351 # Leave core files for developers to inspect. |
| 352 sudo touch "${ROOT_FS_DIR}/etc/leave_core" |
| 353 |
| 351 # The ldd tool is a useful shell script but lives in glibc; just copy it. | 354 # The ldd tool is a useful shell script but lives in glibc; just copy it. |
| 352 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" | 355 sudo cp -a "$(which ldd)" "${root_dev_dir}/usr/bin" |
| 353 | 356 |
| 354 # If vim is installed, then a vi symlink would probably help. | 357 # If vim is installed, then a vi symlink would probably help. |
| 355 if [[ -x "${ROOT_FS_DIR}/usr/local/bin/vim" ]]; then | 358 if [[ -x "${ROOT_FS_DIR}/usr/local/bin/vim" ]]; then |
| 356 sudo ln -sf vim "${ROOT_FS_DIR}/usr/local/bin/vi" | 359 sudo ln -sf vim "${ROOT_FS_DIR}/usr/local/bin/vi" |
| 357 fi | 360 fi |
| 358 | 361 |
| 359 # If pygtk is installed in stateful-dev, then install a path. | 362 # If pygtk is installed in stateful-dev, then install a path. |
| 360 if [[ -d \ | 363 if [[ -d \ |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 672 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
| 670 fi | 673 fi |
| 671 | 674 |
| 672 print_time_elapsed | 675 print_time_elapsed |
| 673 | 676 |
| 674 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 677 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
| 675 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 678 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
| 676 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 679 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
| 677 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR}" | 680 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR}" |
| 678 echo "from the scripts directory where you entered the chroot." | 681 echo "from the scripts directory where you entered the chroot." |
| OLD | NEW |