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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 fi | 420 fi |
421 | 421 |
422 # If pygtk is installed in stateful-dev, then install a path. | 422 # If pygtk is installed in stateful-dev, then install a path. |
423 if [[ -d \ | 423 if [[ -d \ |
424 "${ROOT_FS_DIR}/usr/local/lib/python2.6/site-packages/gtk-2.0" ]]; then | 424 "${ROOT_FS_DIR}/usr/local/lib/python2.6/site-packages/gtk-2.0" ]]; then |
425 sudo bash -c "\ | 425 sudo bash -c "\ |
426 echo gtk-2.0 > \ | 426 echo gtk-2.0 > \ |
427 ${ROOT_FS_DIR}/usr/local/lib/python2.6/site-packages/pygtk.pth" | 427 ${ROOT_FS_DIR}/usr/local/lib/python2.6/site-packages/pygtk.pth" |
428 fi | 428 fi |
429 | 429 |
| 430 # If python is installed on stateful-dev, fix python symlinks. |
| 431 local python_path="/usr/local/bin/python2.6" |
| 432 if [ -e "${ROOT_FS_DIR}${python_path}" ]; then |
| 433 info "Fixing python symlinks for developer and test images." |
| 434 local python_paths="/usr/bin/python /usr/local/bin/python \ |
| 435 /usr/bin/python2 /usr/local/bin/python2" |
| 436 for path in ${python_paths}; do |
| 437 sudo rm -f "${ROOT_FS_DIR}${path}" |
| 438 sudo ln -s ${python_path} "${ROOT_FS_DIR}${path}" |
| 439 done |
| 440 fi |
| 441 |
430 # Check that the image has been correctly created. Only do it if not | 442 # Check that the image has been correctly created. Only do it if not |
431 # building a factory install image and not a dev install shim, as the | 443 # building a factory install image and not a dev install shim, as the |
432 # INSTALL_MASK for it will make test_image fail. | 444 # INSTALL_MASK for it will make test_image fail. |
433 if [ ${FLAGS_factory_install} -eq ${FLAGS_FALSE} ] && | 445 if [ ${FLAGS_factory_install} -eq ${FLAGS_FALSE} ] && |
434 [ ${FLAGS_dev_install} -eq ${FLAGS_FALSE} ] ; then | 446 [ ${FLAGS_dev_install} -eq ${FLAGS_FALSE} ] ; then |
435 "${SCRIPTS_DIR}/test_image" \ | 447 "${SCRIPTS_DIR}/test_image" \ |
436 --root="${ROOT_FS_DIR}" \ | 448 --root="${ROOT_FS_DIR}" \ |
437 --target="${ARCH}" | 449 --target="${ARCH}" |
438 fi | 450 fi |
439 echo "Developer image built and stored at ${image_name}" | 451 echo "Developer image built and stored at ${image_name}" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 765 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
754 fi | 766 fi |
755 | 767 |
756 print_time_elapsed | 768 print_time_elapsed |
757 | 769 |
758 echo "To copy to USB keyfob, do something like:" | 770 echo "To copy to USB keyfob, do something like:" |
759 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 771 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
760 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 772 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
761 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 773 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
762 echo "from the scripts directory where you entered the chroot." | 774 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |