| 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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 # Pre-set "sucessful" bit in gpt, so we will never mark-for-death | 711 # Pre-set "sucessful" bit in gpt, so we will never mark-for-death |
| 712 # a partition on an SDCard/USB stick. | 712 # a partition on an SDCard/USB stick. |
| 713 ${GPT} add -i 2 -S 1 "${OUTPUT_DIR}/${image_name}" | 713 ${GPT} add -i 2 -S 1 "${OUTPUT_DIR}/${image_name}" |
| 714 | 714 |
| 715 trap - EXIT | 715 trap - EXIT |
| 716 } | 716 } |
| 717 | 717 |
| 718 generate_au_zip () { | 718 generate_au_zip () { |
| 719 local lgenerateauzip="${SCRIPTS_DIR}/generate_au_zip.py" | 719 local lgenerateauzip="${SCRIPTS_DIR}/generate_au_zip.py" |
| 720 local largs="-o ${OUTPUT_DIR}" | 720 local largs="-o ${OUTPUT_DIR}" |
| 721 ! -d "${OUTPUT_DIR}" && mkdir -p "${OUTPUT_DIR}" | 721 test ! -d "${OUTPUT_DIR}" && mkdir -p "${OUTPUT_DIR}" |
| 722 info "Running ${lgenerateauzip} ${largs} for generating AU updater zip file" | 722 info "Running ${lgenerateauzip} ${largs} for generating AU updater zip file" |
| 723 $lgenerateauzip $largs | 723 $lgenerateauzip $largs |
| 724 } | 724 } |
| 725 | 725 |
| 726 # Create the output directory. | 726 # Create the output directory. |
| 727 mkdir -p "${OUTPUT_DIR}" | 727 mkdir -p "${OUTPUT_DIR}" |
| 728 mkdir -p "${ROOT_FS_DIR}" | 728 mkdir -p "${ROOT_FS_DIR}" |
| 729 mkdir -p "${STATEFUL_FS_DIR}" | 729 mkdir -p "${STATEFUL_FS_DIR}" |
| 730 mkdir -p "${OEM_FS_DIR}" | 730 mkdir -p "${OEM_FS_DIR}" |
| 731 mkdir -p "${ESP_FS_DIR}" | 731 mkdir -p "${ESP_FS_DIR}" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 815 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
| 816 fi | 816 fi |
| 817 | 817 |
| 818 print_time_elapsed | 818 print_time_elapsed |
| 819 | 819 |
| 820 echo "To copy to USB keyfob, do something like:" | 820 echo "To copy to USB keyfob, do something like:" |
| 821 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 821 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
| 822 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 822 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
| 823 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 823 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
| 824 echo "from the scripts directory where you entered the chroot." | 824 echo "from the scripts directory where you entered the chroot." |
| OLD | NEW |