Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: build_image

Issue 6901047: Use initramfs on x86 but not on arm for factory install image. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 fi 183 fi
184 184
185 OVERLAY_CHROMEOS_DIR="${SRC_ROOT}/third_party/chromiumos-overlay/chromeos/" 185 OVERLAY_CHROMEOS_DIR="${SRC_ROOT}/third_party/chromiumos-overlay/chromeos/"
186 186
187 # Determine build version. 187 # Determine build version.
188 . "${OVERLAY_CHROMEOS_DIR}/config/chromeos_version.sh" 188 . "${OVERLAY_CHROMEOS_DIR}/config/chromeos_version.sh"
189 189
190 # Configure extra USE or packages for this type of build. 190 # Configure extra USE or packages for this type of build.
191 EXTRA_PACKAGES="" 191 EXTRA_PACKAGES=""
192 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ] ; then 192 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ] ; then
193 # Factory install needs to have the kernel initrmafs enabled, 193 # Factory install needs to have the factory installer added.
194 # and the factory installer added.
195 EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall" 194 EXTRA_PACKAGES="${EXTRA_PACKAGES} chromeos-base/chromeos-factoryinstall"
196 export USE="${USE} fbconsole initramfs" 195 # On x86, booting factory install shim on SD card needs to have the kernel
196 # initrmafs enabled. On ARM, booting factory install image on network does
197 # not needs initramfs. Force to enable fbconsole to fix a display driver bug.
198 if [ ${ARCH} -eq "arm" ] ; then
199 export USE="${USE} fbconsole"
200 else
201 export USE="${USE} initramfs"
202 fi
197 fi 203 fi
198 204
199 emerge_to_image() { 205 emerge_to_image() {
200 sudo -E ${EMERGE_BOARD_CMD} --root-deps=rdeps --usepkgonly \ 206 sudo -E ${EMERGE_BOARD_CMD} --root-deps=rdeps --usepkgonly \
201 "$@" ${EMERGE_JOBS} 207 "$@" ${EMERGE_JOBS}
202 } 208 }
203 209
204 # Freshen kernel with correct USE flags. This is a noop if we have 210 # Freshen kernel with correct USE flags. This is a noop if we have
205 # the right kernel prebuilt. Factory install uses USE="initramfs". 211 # the right kernel prebuilt. Factory install uses USE="initramfs".
206 # We don't allow building from source with the image as a target, 212 # We don't allow building from source with the image as a target,
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 808 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
803 fi 809 fi
804 810
805 print_time_elapsed 811 print_time_elapsed
806 812
807 echo "To copy to USB keyfob, do something like:" 813 echo "To copy to USB keyfob, do something like:"
808 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 814 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
809 echo "To convert to VMWare image, INSIDE the chroot, do something like:" 815 echo "To convert to VMWare image, INSIDE the chroot, do something like:"
810 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" 816 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}"
811 echo "from the scripts directory where you entered the chroot." 817 echo "from the scripts directory where you entered the chroot."
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698