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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 # and the factory installer added. | 173 # and the factory installer added. |
174 EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall" | 174 EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall" |
175 EXTRA_USE="${EXTRA_USE} initramfs" | 175 EXTRA_USE="${EXTRA_USE} initramfs" |
176 fi | 176 fi |
177 | 177 |
178 # Freshen kernel with correct USE flags. This is a noop if we have | 178 # Freshen kernel with correct USE flags. This is a noop if we have |
179 # the right kernel prebuilt. Factory install uses USE="initramfs". | 179 # the right kernel prebuilt. Factory install uses USE="initramfs". |
180 # We don't allow building from source with the image as a target, | 180 # We don't allow building from source with the image as a target, |
181 # and it's not possible to store prebuilts for the same package | 181 # and it's not possible to store prebuilts for the same package |
182 # with different use flags. | 182 # with different use flags. |
183 USE="${EXTRA_USE}" emerge-${FLAGS_board} \ | 183 USE="${EXTRA_USE} ${USE}" emerge-${FLAGS_board} \ |
184 -uNDvg --binpkg-respect-use=y virtual/kernel | 184 -uNDvg --binpkg-respect-use=y virtual/kernel |
185 | 185 |
186 # Use canonical path since some tools (e.g. mount) do not like symlinks. | 186 # Use canonical path since some tools (e.g. mount) do not like symlinks. |
187 # Append build attempt to output directory. | 187 # Append build attempt to output directory. |
188 IMAGE_SUBDIR="${CHROMEOS_VERSION_STRING}-a${FLAGS_build_attempt}" | 188 IMAGE_SUBDIR="${CHROMEOS_VERSION_STRING}-a${FLAGS_build_attempt}" |
189 OUTPUT_DIR="${FLAGS_output_root}/${FLAGS_board}/${IMAGE_SUBDIR}" | 189 OUTPUT_DIR="${FLAGS_output_root}/${FLAGS_board}/${IMAGE_SUBDIR}" |
190 | 190 |
191 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" | 191 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" |
192 | 192 |
193 # If we are creating a developer image, also create a pristine image with a | 193 # If we are creating a developer image, also create a pristine image with a |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 792 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
793 fi | 793 fi |
794 | 794 |
795 print_time_elapsed | 795 print_time_elapsed |
796 | 796 |
797 echo "To copy to USB keyfob, do something like:" | 797 echo "To copy to USB keyfob, do something like:" |
798 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 798 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
799 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 799 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
800 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 800 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
801 echo "from the scripts directory where you entered the chroot." | 801 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |