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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 # Determine build version. | 144 # Determine build version. |
145 . "${SCRIPTS_DIR}/chromeos_version.sh" | 145 . "${SCRIPTS_DIR}/chromeos_version.sh" |
146 | 146 |
147 # Configure extra USE or packages for this type of build. | 147 # Configure extra USE or packages for this type of build. |
148 EXTRA_PACKAGES="" | 148 EXTRA_PACKAGES="" |
149 EXTRA_USE="" | 149 EXTRA_USE="" |
150 if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] ; then | 150 if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] ; then |
151 # Factory install needs to have the kernel initrmafs enabled, | 151 # Factory install needs to have the kernel initrmafs enabled, |
152 # and the factory installer added. | 152 # and the factory installer added. |
153 EXTRA_PACKAGES="chromeos-base/chromeos-factoryinstall" | 153 EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall" |
154 EXTRA_USE="initramfs" | 154 EXTRA_USE="${EXTRA_USE} initramfs" |
155 fi | 155 fi |
156 | 156 |
157 # Freshen kernel with correct USE flags. This is a noop if we have | 157 # Freshen kernel with correct USE flags. This is a noop if we have |
158 # the right kernel prebuilt. Factory install uses USE="initramfs". | 158 # the right kernel prebuilt. Factory install uses USE="initramfs". |
159 # We don't allow building from source with the image as a target, | 159 # We don't allow building from source with the image as a target, |
160 # and it's not possible to store prebuilts for the same package | 160 # and it's not possible to store prebuilts for the same package |
161 # with different use flags. | 161 # with different use flags. |
162 USE="${EXTRA_USE}" emerge-${FLAGS_board} \ | 162 USE="${EXTRA_USE}" emerge-${FLAGS_board} \ |
163 -uNDvg --binpkg-respect-use=y kernel | 163 -uNDvg --binpkg-respect-use=y kernel |
164 | 164 |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 739 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
740 fi | 740 fi |
741 | 741 |
742 print_time_elapsed | 742 print_time_elapsed |
743 | 743 |
744 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 744 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
745 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 745 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
746 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 746 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
747 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 747 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
748 echo "from the scripts directory where you entered the chroot." | 748 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |