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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall" | 155 EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall" |
156 EXTRA_USE="${EXTRA_USE} initramfs" | 156 EXTRA_USE="${EXTRA_USE} initramfs" |
157 fi | 157 fi |
158 | 158 |
159 # Freshen kernel with correct USE flags. This is a noop if we have | 159 # Freshen kernel with correct USE flags. This is a noop if we have |
160 # the right kernel prebuilt. Factory install uses USE="initramfs". | 160 # the right kernel prebuilt. Factory install uses USE="initramfs". |
161 # We don't allow building from source with the image as a target, | 161 # We don't allow building from source with the image as a target, |
162 # and it's not possible to store prebuilts for the same package | 162 # and it's not possible to store prebuilts for the same package |
163 # with different use flags. | 163 # with different use flags. |
164 USE="${EXTRA_USE}" emerge-${FLAGS_board} \ | 164 USE="${EXTRA_USE}" emerge-${FLAGS_board} \ |
165 -uNDvg --binpkg-respect-use=y kernel | 165 -uNDvg --binpkg-respect-use=y virtual/kernel |
166 | 166 |
167 # Use canonical path since some tools (e.g. mount) do not like symlinks. | 167 # Use canonical path since some tools (e.g. mount) do not like symlinks. |
168 # Append build attempt to output directory. | 168 # Append build attempt to output directory. |
169 IMAGE_SUBDIR="${CHROMEOS_VERSION_STRING}-a${FLAGS_build_attempt}" | 169 IMAGE_SUBDIR="${CHROMEOS_VERSION_STRING}-a${FLAGS_build_attempt}" |
170 OUTPUT_DIR="${FLAGS_output_root}/${FLAGS_board}/${IMAGE_SUBDIR}" | 170 OUTPUT_DIR="${FLAGS_output_root}/${FLAGS_board}/${IMAGE_SUBDIR}" |
171 | 171 |
172 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" | 172 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" |
173 | 173 |
174 # If we are creating a developer image, also create a pristine image with a | 174 # If we are creating a developer image, also create a pristine image with a |
175 # different name. | 175 # different name. |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 750 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
751 fi | 751 fi |
752 | 752 |
753 print_time_elapsed | 753 print_time_elapsed |
754 | 754 |
755 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 755 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
756 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 756 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
757 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 757 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
758 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 758 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
759 echo "from the scripts directory where you entered the chroot." | 759 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |