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

Side by Side Diff: build_image

Issue 3158021: Issue 5183: reduce dev install shim size (Closed) Base URL: http://src.chromium.org/git/crosutils.git
Patch Set: test Created 10 years, 4 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
« 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 cp ${PREVIOUS_DIR}/${PRISTINE_IMAGE_NAME} ${OUTPUT_DIR} 648 cp ${PREVIOUS_DIR}/${PRISTINE_IMAGE_NAME} ${OUTPUT_DIR}
649 649
650 # Copy forward the developer image, if we already copied forward the base. 650 # Copy forward the developer image, if we already copied forward the base.
651 if [[ ${FLAGS_withdev} -eq ${FLAGS_TRUE} ]] && \ 651 if [[ ${FLAGS_withdev} -eq ${FLAGS_TRUE} ]] && \
652 [[ -f ${PREVIOUS_DIR}/${DEVELOPER_IMAGE_NAME} ]] ; then 652 [[ -f ${PREVIOUS_DIR}/${DEVELOPER_IMAGE_NAME} ]] ; then
653 cp ${PREVIOUS_DIR}/${DEVELOPER_IMAGE_NAME} ${OUTPUT_DIR} 653 cp ${PREVIOUS_DIR}/${DEVELOPER_IMAGE_NAME} ${OUTPUT_DIR}
654 fi 654 fi
655 fi 655 fi
656 fi 656 fi
657 657
658 # Minimize rootfs size for dev install shim and factory installer 658 # Minimize rootfs size for factory installer
659 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} -o \ 659 if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ]; then
660 ${FLAGS_dev_install} -eq ${FLAGS_TRUE} ] ; then
661 info "Fixing the rootfs size at 300 MiB for the factory installer" 660 info "Fixing the rootfs size at 300 MiB for the factory installer"
662 FLAGS_rootfs_size=300 661 FLAGS_rootfs_size=300
663 fi 662 fi
664 663
664 # Minimize rootfs size and statefulfs size for dev install shim
665 if [ ${FLAGS_dev_install} -eq ${FLAGS_TRUE} ] ; then
666 info "Fixing the rootfs size at 300 MiB for dev install shim"
667 FLAGS_rootfs_size=300
668 info "Fixing the statefulfs size at 140 MiB for dev install shim"
669 FLAGS_statefulfs_size=140
670 fi
671
665 # Create the boot.desc file which stores the build-time configuration 672 # Create the boot.desc file which stores the build-time configuration
666 # information needed for making the image bootable after creation with 673 # information needed for making the image bootable after creation with
667 # cros_make_image_bootable. 674 # cros_make_image_bootable.
668 create_boot_desc 675 create_boot_desc
669 676
670 if [[ -f ${PRISTINE_IMG} ]] ; then 677 if [[ -f ${PRISTINE_IMG} ]] ; then
671 update_base_packages ${PRISTINE_IMAGE_NAME} 678 update_base_packages ${PRISTINE_IMAGE_NAME}
672 else 679 else
673 create_base_image ${PRISTINE_IMAGE_NAME} 680 create_base_image ${PRISTINE_IMAGE_NAME}
674 fi 681 fi
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 730 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
724 fi 731 fi
725 732
726 print_time_elapsed 733 print_time_elapsed
727 734
728 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" 735 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:"
729 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 736 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
730 echo "To convert to VMWare image, INSIDE the chroot, do something like:" 737 echo "To convert to VMWare image, INSIDE the chroot, do something like:"
731 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR}" 738 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR}"
732 echo "from the scripts directory where you entered the chroot." 739 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