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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 409 |
410 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then | 410 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then |
411 # Clean out unused packages | 411 # Clean out unused packages |
412 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ | 412 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ |
413 --root="${ROOT_FS_DIR}" --root-deps=rdeps \ | 413 --root="${ROOT_FS_DIR}" --root-deps=rdeps \ |
414 --usepkgonly --depclean ${EMERGE_JOBS} | 414 --usepkgonly --depclean ${EMERGE_JOBS} |
415 fi | 415 fi |
416 | 416 |
417 # Install the bare necessary files so that the "emerge" command works | 417 # Install the bare necessary files so that the "emerge" command works |
418 sudo cp ${root_dev_dir}/etc/make.globals ${ROOT_FS_DIR}/etc/ | 418 sudo cp ${root_dev_dir}/etc/make.globals ${ROOT_FS_DIR}/etc/ |
| 419 sudo sed -i s,/usr/bin/wget,wget, ${ROOT_FS_DIR}/etc/make.globals |
419 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile | 420 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile |
420 | 421 |
421 # Re-run ldconfig to fix /etc/ldconfig.so.cache. | 422 # Re-run ldconfig to fix /etc/ldconfig.so.cache. |
422 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" | 423 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" |
423 | 424 |
424 # Mark the image as a developer image (input to chromeos_startup). | 425 # Mark the image as a developer image (input to chromeos_startup). |
425 sudo mkdir -p "${ROOT_FS_DIR}/root" | 426 sudo mkdir -p "${ROOT_FS_DIR}/root" |
426 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" | 427 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" |
427 | 428 |
428 # Additional changes to developer image. | 429 # Additional changes to developer image. |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 792 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
792 fi | 793 fi |
793 | 794 |
794 print_time_elapsed | 795 print_time_elapsed |
795 | 796 |
796 echo "To copy to USB keyfob, do something like:" | 797 echo "To copy to USB keyfob, do something like:" |
797 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 798 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
798 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 799 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
799 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 800 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
800 echo "from the scripts directory where you entered the chroot." | 801 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |