Add transitional flag for ARM kernel signing in mod_image_for_recovery.sh.

Enable the ARM kernel signing procedure in the recovery image. Will remove it
when the procedure is stable.

BUG=chromium-os:12352,chromium-os:1305
TEST=run "build_image" and "mod_image_for_recovery.sh
--crosbug12352_arm_kernel_signing" to create a recovery image.
Then use u-boot recovery mode to boot the recovery image. Successfully verify
and boot the kernel.

Change-Id: I1bf911176c6f3adaebf3aa9abc86488a48a60494

Review URL: http://codereview.chromium.org/6635010
This commit is contained in:
Tom Wai-Hong Tam 2011-03-08 09:55:10 +08:00
parent a2fcb05593
commit b42af678be

View File

@ -81,6 +81,10 @@ DEFINE_boolean verbose $FLAGS_FALSE \
DEFINE_string keys_dir "/usr/share/vboot/devkeys" \ DEFINE_string keys_dir "/usr/share/vboot/devkeys" \
"Directory containing the signing keys." "Directory containing the signing keys."
# TODO(clchiou): Remove this flag after arm verified boot is stable
DEFINE_boolean crosbug12352_arm_kernel_signing ${FLAGS_FALSE} \
"Sign kernel partition for ARM images (temporary hack)."
# Parse command line # Parse command line
FLAGS "$@" || exit 1 FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}" eval set -- "${FLAGS_ARGV}"
@ -139,6 +143,12 @@ case "${TC_ARCH}" in
exit 1 exit 1
esac esac
if [[ ${FLAGS_crosbug12352_arm_kernel_signing} -eq ${FLAGS_TRUE} ]]; then
crosbug12352_flag="--crosbug12352_arm_kernel_signing"
else
crosbug12352_flag="--nocrosbug12352_arm_kernel_signing"
fi
get_install_vblock() { get_install_vblock() {
# If it exists, we need to copy the vblock over to stateful # If it exists, we need to copy the vblock over to stateful
# This is the real vblock and not the recovery vblock. # This is the real vblock and not the recovery vblock.
@ -239,6 +249,7 @@ create_recovery_kernel_image() {
--root=${cros_root} \ --root=${cros_root} \
--keys_dir="${FLAGS_keys_dir}" \ --keys_dir="${FLAGS_keys_dir}" \
--nouse_dev_keys \ --nouse_dev_keys \
${crosbug12352_flag} \
${verity_args} 1>&2 ${verity_args} 1>&2
sudo rm "$FLAGS_rootfs_hash" sudo rm "$FLAGS_rootfs_hash"
sudo losetup -d "$root_dev" sudo losetup -d "$root_dev"