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

Side by Side Diff: build_image

Issue 5689004: Moving generating au-generator.zip file to build_image. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years 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 | « archive_build.sh ('k') | 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 "${OUTPUT_DIR}" \ 695 "${OUTPUT_DIR}" \
696 "${OUTPUT_DIR}/${image_name}" 696 "${OUTPUT_DIR}/${image_name}"
697 697
698 # Pre-set "sucessful" bit in gpt, so we will never mark-for-death 698 # Pre-set "sucessful" bit in gpt, so we will never mark-for-death
699 # a partition on an SDCard/USB stick. 699 # a partition on an SDCard/USB stick.
700 ${GPT} add -i 2 -S 1 "${OUTPUT_DIR}/${image_name}" 700 ${GPT} add -i 2 -S 1 "${OUTPUT_DIR}/${image_name}"
701 701
702 trap - EXIT 702 trap - EXIT
703 } 703 }
704 704
705 generate_au_zip () {
706 local lgenerateauzip="${SCRIPTS_DIR}/generate_au_zip.py"
707 local largs="-o ${OUTPUT_DIR}"
708 ! -d "${OUTPUT_DIR}" && mkdir -p "${OUTPUT_DIR}"
709 info "Running ${lgenerateauzip} ${largs} for generating AU updater zip file"
710 $lgenerateauzip $largs
711 }
712
705 # Create the output directory. 713 # Create the output directory.
706 mkdir -p "${OUTPUT_DIR}" 714 mkdir -p "${OUTPUT_DIR}"
707 mkdir -p "${ROOT_FS_DIR}" 715 mkdir -p "${ROOT_FS_DIR}"
708 mkdir -p "${STATEFUL_FS_DIR}" 716 mkdir -p "${STATEFUL_FS_DIR}"
709 mkdir -p "${OEM_FS_DIR}" 717 mkdir -p "${OEM_FS_DIR}"
710 mkdir -p "${ESP_FS_DIR}" 718 mkdir -p "${ESP_FS_DIR}"
711 719
712 # Preserve old images by copying them forward for --preserve. 720 # Preserve old images by copying them forward for --preserve.
713 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then 721 if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then
714 if [[ -f ${PREVIOUS_DIR}/${PRISTINE_IMAGE_NAME} ]] ; then 722 if [[ -f ${PREVIOUS_DIR}/${PRISTINE_IMAGE_NAME} ]] ; then
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 update_dev_packages ${DEVELOPER_IMAGE_NAME} 783 update_dev_packages ${DEVELOPER_IMAGE_NAME}
776 ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${OUTPUT_DIR}" \ 784 ${SCRIPTS_DIR}/bin/cros_make_image_bootable "${OUTPUT_DIR}" \
777 "${DEVELOPER_IMAGE_NAME}" 785 "${DEVELOPER_IMAGE_NAME}"
778 fi 786 fi
779 787
780 # Clean up temporary files. 788 # Clean up temporary files.
781 rm -f "${ROOT_FS_IMG}" "${STATEFUL_FS_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \ 789 rm -f "${ROOT_FS_IMG}" "${STATEFUL_FS_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \
782 "${ESP_FS_IMG}" "${OEM_FS_IMG}" "${OUTPUT_DIR}/vmlinuz_hd.vblock" 790 "${ESP_FS_IMG}" "${OEM_FS_IMG}" "${OUTPUT_DIR}/vmlinuz_hd.vblock"
783 rmdir "${ROOT_FS_DIR}" "${STATEFUL_FS_DIR}" "${OEM_FS_DIR}" "${ESP_FS_DIR}" 791 rmdir "${ROOT_FS_DIR}" "${STATEFUL_FS_DIR}" "${OEM_FS_DIR}" "${ESP_FS_DIR}"
784 792
793 # Generating AU generator zip file to run outside chroot
794 generate_au_zip || echo "Failed generating AU zip file - ignoring Error..."
785 # Create a 'latest' link 795 # Create a 'latest' link
786 rm -f ${FLAGS_output_root}/${FLAGS_board}/latest 796 rm -f ${FLAGS_output_root}/${FLAGS_board}/latest
787 ln -s $(basename ${OUTPUT_DIR}) ${FLAGS_output_root}/${FLAGS_board}/latest 797 ln -s $(basename ${OUTPUT_DIR}) ${FLAGS_output_root}/${FLAGS_board}/latest
788 798
789 echo "Done. Image created in ${OUTPUT_DIR}" 799 echo "Done. Image created in ${OUTPUT_DIR}"
790 echo "Chromium OS image created as ${PRISTINE_IMAGE_NAME}" 800 echo "Chromium OS image created as ${PRISTINE_IMAGE_NAME}"
791 if [ "${FLAGS_withdev}" -eq "${FLAGS_TRUE}" ]; then 801 if [ "${FLAGS_withdev}" -eq "${FLAGS_TRUE}" ]; then
792 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 802 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
793 fi 803 fi
794 804
795 print_time_elapsed 805 print_time_elapsed
796 806
797 echo "To copy to USB keyfob, do something like:" 807 echo "To copy to USB keyfob, do something like:"
798 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 808 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:" 809 echo "To convert to VMWare image, INSIDE the chroot, do something like:"
800 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" 810 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}"
801 echo "from the scripts directory where you entered the chroot." 811 echo "from the scripts directory where you entered the chroot."
OLDNEW
« no previous file with comments | « archive_build.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698