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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 437 |
438 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then | 438 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then |
439 # Clean out unused packages | 439 # Clean out unused packages |
440 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ | 440 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ |
441 --root="${ROOT_FS_DIR}" --root-deps=rdeps \ | 441 --root="${ROOT_FS_DIR}" --root-deps=rdeps \ |
442 --usepkgonly --depclean ${EMERGE_JOBS} | 442 --usepkgonly --depclean ${EMERGE_JOBS} |
443 fi | 443 fi |
444 | 444 |
445 # Install the bare necessary files so that the "emerge" command works | 445 # Install the bare necessary files so that the "emerge" command works |
446 if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then | 446 if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then |
447 sudo ln -sft ${ROOT_FS_DIR}/usr/share ../../usr/local/share/portage | 447 sudo cp -a ${root_dev_dir}/share/portage ${ROOT_FS_DIR}/usr/share |
448 sudo sed -i s,/usr/bin/wget,wget, \ | 448 sudo sed -i s,/usr/bin/wget,wget, \ |
449 ${root_dev_dir}/share/portage/config/make.globals | 449 ${ROOT_FS_DIR}/usr/share/portage/config/make.globals |
450 fi | 450 fi |
451 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile | 451 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile |
452 | 452 |
453 # Re-run ldconfig to fix /etc/ldconfig.so.cache. | 453 # Re-run ldconfig to fix /etc/ldconfig.so.cache. |
454 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" | 454 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" |
455 | 455 |
456 # Mark the image as a developer image (input to chromeos_startup). | 456 # Mark the image as a developer image (input to chromeos_startup). |
457 sudo mkdir -p "${ROOT_FS_DIR}/root" | 457 sudo mkdir -p "${ROOT_FS_DIR}/root" |
458 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" | 458 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" |
459 | 459 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 845 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
846 fi | 846 fi |
847 | 847 |
848 print_time_elapsed | 848 print_time_elapsed |
849 | 849 |
850 echo "To copy to USB keyfob, do something like:" | 850 echo "To copy to USB keyfob, do something like:" |
851 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 851 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
852 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 852 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
853 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 853 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
854 echo "from the scripts directory where you entered the chroot." | 854 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |