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

Side by Side Diff: build_image

Issue 2817047: Generate and use .vbprivk files for signing now. (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: Created 10 years, 5 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 | build_kernel_image.sh » ('j') | 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 --rootfs_partition_size=${FLAGS_rootfs_partition_size} \ 551 --rootfs_partition_size=${FLAGS_rootfs_partition_size} \
552 "${OUTPUT_DIR}" \ 552 "${OUTPUT_DIR}" \
553 "${OUTPUT_DIR}/${image_name}" 553 "${OUTPUT_DIR}/${image_name}"
554 554
555 trap - EXIT 555 trap - EXIT
556 556
557 # FIXME: only signing things for x86 right now. 557 # FIXME: only signing things for x86 right now.
558 if [[ "${ARCH}" = "x86" ]]; then 558 if [[ "${ARCH}" = "x86" ]]; then
559 # Verify the final image. 559 # Verify the final image.
560 load_kernel_test "${OUTPUT_DIR}/${image_name}" \ 560 load_kernel_test "${OUTPUT_DIR}/${image_name}" \
561 "${OUTPUT_DIR}/key_alg8.vbpubk" 561 "${OUTPUT_DIR}/kernel_subkey.vbpubk"
562 fi 562 fi
563 } 563 }
564 564
565 # Create the output directory. 565 # Create the output directory.
566 mkdir -p "${OUTPUT_DIR}" 566 mkdir -p "${OUTPUT_DIR}"
567 mkdir -p "${ROOT_FS_DIR}" 567 mkdir -p "${ROOT_FS_DIR}"
568 mkdir -p "${STATEFUL_FS_DIR}" 568 mkdir -p "${STATEFUL_FS_DIR}"
569 mkdir -p "${OEM_FS_DIR}" 569 mkdir -p "${OEM_FS_DIR}"
570 mkdir -p "${ESP_FS_DIR}" 570 mkdir -p "${ESP_FS_DIR}"
571 571
(...skipping 23 matching lines...) Expand all
595 if [[ ! -f ${DEVELOPER_IMG} ]] ; then 595 if [[ ! -f ${DEVELOPER_IMG} ]] ; then
596 echo "Creating developer image from base image ${PRISTINE_IMAGE_NAME}" 596 echo "Creating developer image from base image ${PRISTINE_IMAGE_NAME}"
597 cp ${PRISTINE_IMG} ${DEVELOPER_IMG} 597 cp ${PRISTINE_IMG} ${DEVELOPER_IMG}
598 fi 598 fi
599 599
600 update_dev_packages ${DEVELOPER_IMAGE_NAME} 600 update_dev_packages ${DEVELOPER_IMAGE_NAME}
601 fi 601 fi
602 602
603 # Clean up temporary files. 603 # Clean up temporary files.
604 rm -f "${ROOT_FS_IMG}" "${STATEFUL_FS_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \ 604 rm -f "${ROOT_FS_IMG}" "${STATEFUL_FS_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \
605 "${ESP_FS_IMG}" "${OUTPUT_DIR}/data4_sign8.keyblock" \ 605 "${ESP_FS_IMG}" "${OUTPUT_DIR}/kernel.keyblock" \
606 "${OUTPUT_DIR}/key_alg4.vbpubk" "${OUTPUT_DIR}/key_alg8.vbpubk" \ 606 "${OUTPUT_DIR}/kernel_subkey.vbpubk" \
607 "${OUTPUT_DIR}/kernel_subkey.vbprivk" \
608 "${OUTPUT_DIR}/kernel_data_key.vbpubk" \
609 "${OUTPUT_DIR}/kernel_data_key.vbprivk" \
607 "${OEM_FS_IMG}" 610 "${OEM_FS_IMG}"
608 rmdir "${ROOT_FS_DIR}" "${STATEFUL_FS_DIR}" "${OEM_FS_DIR}" "${ESP_FS_DIR}" 611 rmdir "${ROOT_FS_DIR}" "${STATEFUL_FS_DIR}" "${OEM_FS_DIR}" "${ESP_FS_DIR}"
609 612
610 echo "Done. Image created in ${OUTPUT_DIR}" 613 echo "Done. Image created in ${OUTPUT_DIR}"
611 echo "Chromium OS image created as ${PRISTINE_IMAGE_NAME}" 614 echo "Chromium OS image created as ${PRISTINE_IMAGE_NAME}"
612 if [ "${FLAGS_withdev}" -eq "${FLAGS_TRUE}" ]; then 615 if [ "${FLAGS_withdev}" -eq "${FLAGS_TRUE}" ]; then
613 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 616 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
614 fi 617 fi
615 618
616 print_time_elapsed 619 print_time_elapsed
617 620
618 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" 621 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:"
619 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 622 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
620 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" 623 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:"
621 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" 624 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}"
622 echo "from the scripts directory where you entered the chroot." 625 echo "from the scripts directory where you entered the chroot."
OLDNEW
« no previous file with comments | « no previous file | build_kernel_image.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698