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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 --usepkgonly -uDNv chromeos-dev ${EMERGE_JOBS} | 436 --usepkgonly -uDNv chromeos-dev ${EMERGE_JOBS} |
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 [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ] && \ | 446 if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then |
447 sudo cp ${root_dev_dir}/etc/make.globals ${ROOT_FS_DIR}/etc/ | 447 sudo ln -sft ${ROOT_FS_DIR}/usr/share ../../usr/local/share/portage |
448 sudo sed -i s,/usr/bin/wget,wget, ${ROOT_FS_DIR}/etc/make.globals | 448 sudo sed -i s,/usr/bin/wget,wget, \ |
| 449 ${root_dev_dir}/share/portage/config/make.globals |
| 450 fi |
449 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile | 451 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile |
450 | 452 |
451 # Re-run ldconfig to fix /etc/ldconfig.so.cache. | 453 # Re-run ldconfig to fix /etc/ldconfig.so.cache. |
452 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" | 454 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" |
453 | 455 |
454 # Mark the image as a developer image (input to chromeos_startup). | 456 # Mark the image as a developer image (input to chromeos_startup). |
455 sudo mkdir -p "${ROOT_FS_DIR}/root" | 457 sudo mkdir -p "${ROOT_FS_DIR}/root" |
456 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" | 458 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" |
457 | 459 |
458 # Additional changes to developer image. | 460 # Additional changes to developer image. |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 845 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
844 fi | 846 fi |
845 | 847 |
846 print_time_elapsed | 848 print_time_elapsed |
847 | 849 |
848 echo "To copy to USB keyfob, do something like:" | 850 echo "To copy to USB keyfob, do something like:" |
849 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" |
850 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:" |
851 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 853 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
852 echo "from the scripts directory where you entered the chroot." | 854 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |