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

Unified Diff: build_image

Issue 2818045: Use the new developer keys to sign things. (submit for Bill) (Closed) Base URL: ssh://gitrw.chromium.org/crosutils.git
Patch Set: fixed indet and column 80 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build_kernel_image.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_image
diff --git a/build_image b/build_image
index b8802152e1828b0311e7bc90d66464ca39af1f69..2bdbbc7220e470c3bab5cc0dfa2dcbf8f650877b 100755
--- a/build_image
+++ b/build_image
@@ -292,11 +292,14 @@ make_image_bootable() {
sudo mount -o remount,ro "${ROOT_FS_DIR}"
root_dev=$(mount | grep -- "${ROOT_FS_DIR}" | cut -f1 -d' ' | tail -1)
+ DEVKEYSDIR="${SRC_ROOT}/platform/vboot_reference/tests/devkeys"
+
# Builds the kernel partition image. The temporary files are kept around
# so that we can perform a load_kernel_test later on the final image.
${SCRIPTS_DIR}/build_kernel_image.sh \
--arch="${ARCH}" \
--to="${OUTPUT_DIR}/vmlinuz.image" \
+ --hd_vblock="${OUTPUT_DIR}/vmlinuz_hd.vblock" \
--vmlinuz="${OUTPUT_DIR}/boot/vmlinuz" \
--working_dir="${OUTPUT_DIR}" \
--keep_work \
@@ -307,7 +310,7 @@ make_image_bootable() {
--vboot_max_ios=${FLAGS_vboot_max_ios} \
--vboot_error_behavior=${FLAGS_vboot_behavior} \
--root=${cros_root} \
- --keys_dir="${SRC_ROOT}/platform/vboot_reference/tests/testkeys"
+ --keys_dir="${DEVKEYSDIR}"
# START_KERN_A is set by the first call to install the gpt.
local koffset="$(partoffset ${OUTPUT_DIR}/${image_name} 2)"
@@ -599,6 +602,10 @@ create_base_image() {
# Create an empty esp image to be updated in by update_bootloaders.sh.
${SCRIPTS_DIR}/create_esp.sh --to="${ESP_FS_IMG}"
+ # Move the verification block needed for the hard disk install to the
+ # stateful partition.
+ sudo cp "${OUTPUT_DIR}/vmlinuz_hd.vblock" "${STATEFUL_FS_DIR}"
+
cleanup
trap delete_prompt EXIT
@@ -649,7 +656,7 @@ make_image_bootable ${PRISTINE_IMAGE_NAME}
if [[ "${ARCH}" = "x86" ]]; then
# Verify the final image.
load_kernel_test "${OUTPUT_DIR}/${PRISTINE_IMAGE_NAME}" \
- "${OUTPUT_DIR}/kernel_subkey.vbpubk"
+ "${DEVKEYSDIR}/recovery_key.vbpubk"
fi
# Create a developer image based on the chromium os base image.
@@ -665,12 +672,7 @@ fi
# Clean up temporary files.
rm -f "${ROOT_FS_IMG}" "${STATEFUL_FS_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \
- "${ESP_FS_IMG}" "${OUTPUT_DIR}/kernel.keyblock" \
- "${OUTPUT_DIR}/kernel_subkey.vbpubk" \
- "${OUTPUT_DIR}/kernel_subkey.vbprivk" \
- "${OUTPUT_DIR}/kernel_data_key.vbpubk" \
- "${OUTPUT_DIR}/kernel_data_key.vbprivk" \
- "${OEM_FS_IMG}"
+ "${ESP_FS_IMG}" "${OEM_FS_IMG}" "${OUTPUT_DIR}/vmlinuz_hd.vblock"
rmdir "${ROOT_FS_DIR}" "${STATEFUL_FS_DIR}" "${OEM_FS_DIR}" "${ESP_FS_DIR}"
echo "Done. Image created in ${OUTPUT_DIR}"
« 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