| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 if [ "$((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad))" -gt \ | 177 if [ "$((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad))" -gt \ |
| 178 "${FLAGS_rootfs_partition_size}" ] ; then | 178 "${FLAGS_rootfs_partition_size}" ] ; then |
| 179 die "rootfs ($((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) MiB) is \ | 179 die "rootfs ($((FLAGS_rootfs_size + FLAGS_rootfs_hash_pad)) MiB) is \ |
| 180 bigger than partition (${FLAGS_rootfs_partition_size} MiB)." | 180 bigger than partition (${FLAGS_rootfs_partition_size} MiB)." |
| 181 fi | 181 fi |
| 182 | 182 |
| 183 EMERGE_BOARD_CMD="emerge-${FLAGS_board}" | 183 EMERGE_BOARD_CMD="emerge-${FLAGS_board}" |
| 184 if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then | 184 if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then |
| 185 echo "Using alternate emerge" | 185 echo "Using alternate emerge" |
| 186 EMERGE_BOARD_CMD="${SCRIPTS_DIR}/parallel_emerge --board=${FLAGS_board}" | 186 EMERGE_CMD="${GCLIENT_ROOT}/chromite/bin/parallel_emerge" |
| 187 EMERGE_BOARD_CMD="${EMERGE_CMD} --board=${FLAGS_board}" |
| 187 fi | 188 fi |
| 188 | 189 |
| 189 # Determine build version. | 190 # Determine build version. |
| 190 . ${SRC_ROOT}/third_party/chromiumos-overlay/chromeos/config/chromeos_version.sh | 191 . ${SRC_ROOT}/third_party/chromiumos-overlay/chromeos/config/chromeos_version.sh |
| 191 | 192 |
| 192 # Configure extra USE or packages for this type of build. | 193 # Configure extra USE or packages for this type of build. |
| 193 EXTRA_PACKAGES="" | 194 EXTRA_PACKAGES="" |
| 194 EXTRA_USE="" | 195 EXTRA_USE="" |
| 195 if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] ; then | 196 if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] ; then |
| 196 # Factory install needs to have the kernel initrmafs enabled, | 197 # Factory install needs to have the kernel initrmafs enabled, |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 840 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
| 840 fi | 841 fi |
| 841 | 842 |
| 842 print_time_elapsed | 843 print_time_elapsed |
| 843 | 844 |
| 844 echo "To copy to USB keyfob, do something like:" | 845 echo "To copy to USB keyfob, do something like:" |
| 845 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 846 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
| 846 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 847 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
| 847 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 848 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
| 848 echo "from the scripts directory where you entered the chroot." | 849 echo "from the scripts directory where you entered the chroot." |
| OLD | NEW |