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

Side by Side Diff: build_image

Issue 4959001: scripts: repair build_image nostatefuldev collision (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 10 years, 1 month 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 --usepkgonly -uDNv chromeos-dev ${EMERGE_JOBS} 408 --usepkgonly -uDNv chromeos-dev ${EMERGE_JOBS}
409 409
410 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then 410 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then
411 # Clean out unused packages 411 # Clean out unused packages
412 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ 412 sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \
413 --root="${ROOT_FS_DIR}" --root-deps=rdeps \ 413 --root="${ROOT_FS_DIR}" --root-deps=rdeps \
414 --usepkgonly --depclean ${EMERGE_JOBS} 414 --usepkgonly --depclean ${EMERGE_JOBS}
415 fi 415 fi
416 416
417 # Install the bare necessary files so that the "emerge" command works 417 # Install the bare necessary files so that the "emerge" command works
418 sudo cp ${root_dev_dir}/etc/make.globals ${ROOT_FS_DIR}/etc/ 418 [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ] && \
419 sudo cp ${root_dev_dir}/etc/make.globals ${ROOT_FS_DIR}/etc/
419 sudo sed -i s,/usr/bin/wget,wget, ${ROOT_FS_DIR}/etc/make.globals 420 sudo sed -i s,/usr/bin/wget,wget, ${ROOT_FS_DIR}/etc/make.globals
420 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile 421 sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile
421 422
422 # Re-run ldconfig to fix /etc/ldconfig.so.cache. 423 # Re-run ldconfig to fix /etc/ldconfig.so.cache.
423 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" 424 sudo /sbin/ldconfig -r "${ROOT_FS_DIR}"
424 425
425 # Mark the image as a developer image (input to chromeos_startup). 426 # Mark the image as a developer image (input to chromeos_startup).
426 sudo mkdir -p "${ROOT_FS_DIR}/root" 427 sudo mkdir -p "${ROOT_FS_DIR}/root"
427 sudo touch "${ROOT_FS_DIR}/root/.dev_mode" 428 sudo touch "${ROOT_FS_DIR}/root/.dev_mode"
428 429
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 793 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
793 fi 794 fi
794 795
795 print_time_elapsed 796 print_time_elapsed
796 797
797 echo "To copy to USB keyfob, do something like:" 798 echo "To copy to USB keyfob, do something like:"
798 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 799 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:" 800 echo "To convert to VMWare image, INSIDE the chroot, do something like:"
800 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" 801 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}"
801 echo "from the scripts directory where you entered the chroot." 802 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