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

Side by Side Diff: build_image

Issue 6677163: build_image: provide USE flags when installing chromeos-dev (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: added -E 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 ${SCRIPTS_DIR}/mount_gpt_image.sh --from "${OUTPUT_DIR}" \ 411 ${SCRIPTS_DIR}/mount_gpt_image.sh --from "${OUTPUT_DIR}" \
412 --image "${image_name}" -r "${ROOT_FS_DIR}" \ 412 --image "${image_name}" -r "${ROOT_FS_DIR}" \
413 -s "${STATEFUL_FS_DIR}" -e "${ESP_FS_DIR}" 413 -s "${STATEFUL_FS_DIR}" -e "${ESP_FS_DIR}"
414 414
415 # Determine the root dir for developer packages. 415 # Determine the root dir for developer packages.
416 local root_dev_dir="${ROOT_FS_DIR}" 416 local root_dev_dir="${ROOT_FS_DIR}"
417 [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ] && \ 417 [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ] && \
418 root_dev_dir="${ROOT_FS_DIR}/usr/local" 418 root_dev_dir="${ROOT_FS_DIR}/usr/local"
419 419
420 # Install developer packages described in chromeos-dev. 420 # Install developer packages described in chromeos-dev.
421 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ 421 sudo -E USE="${USE} ${EXTRA_USE}" INSTALL_MASK="${INSTALL_MASK}" \
422 --root="${root_dev_dir}" --root-deps=rdeps \ 422 ${EMERGE_BOARD_CMD} --root="${root_dev_dir}" --root-deps=rdeps \
423 --usepkgonly -uDNv chromeos-dev ${EMERGE_JOBS} 423 --usepkgonly -uDNv chromeos-dev ${EMERGE_JOBS}
424 424
425 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then 425 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then
426 # Clean out unused packages 426 # Clean out unused packages
427 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ 427 sudo -E USE="${USE} ${EXTRA_USE}" INSTALL_MASK="${INSTALL_MASK}" \
428 --root="${ROOT_FS_DIR}" --root-deps=rdeps \ 428 ${EMERGE_BOARD_CMD} --root="${ROOT_FS_DIR}" --root-deps=rdeps \
429 --usepkgonly --depclean ${EMERGE_JOBS} 429 --usepkgonly --depclean ${EMERGE_JOBS}
430 fi 430 fi
431 431
432 # Install the bare necessary files so that the "emerge" command works 432 # Install the bare necessary files so that the "emerge" command works
433 if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then 433 if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then
434 sudo cp -a ${root_dev_dir}/share/portage ${ROOT_FS_DIR}/usr/share 434 sudo cp -a ${root_dev_dir}/share/portage ${ROOT_FS_DIR}/usr/share
435 sudo sed -i s,/usr/bin/wget,wget, \ 435 sudo sed -i s,/usr/bin/wget,wget, \
436 ${ROOT_FS_DIR}/usr/share/portage/config/make.globals 436 ${ROOT_FS_DIR}/usr/share/portage/config/make.globals
437 fi 437 fi
438 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile 438 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 811 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
812 fi 812 fi
813 813
814 print_time_elapsed 814 print_time_elapsed
815 815
816 echo "To copy to USB keyfob, do something like:" 816 echo "To copy to USB keyfob, do something like:"
817 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 817 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
818 echo "To convert to VMWare image, INSIDE the chroot, do something like:" 818 echo "To convert to VMWare image, INSIDE the chroot, do something like:"
819 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" 819 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}"
820 echo "from the scripts directory where you entered the chroot." 820 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