From 826878c84c8361127e55a464fd6e58b9c61087dc Mon Sep 17 00:00:00 2001 From: Gilad Arnold Date: Thu, 1 Dec 2011 12:15:24 -0800 Subject: [PATCH] Do not pass dm-verity options to build_kernel_image. * Since dm-verity arguments are now read from the install image upon recovery, we need not use them in build_kernel_image. * Also, don't expect or remove /tmp/rootfs.hash, which will not be generated by build_kernel_image. * Cleanup of dead code following the elimination of use of root_dev. * Updated ASCII art for success/failure condition. * See corresponding changes to initramfs script (extract verity args from install kernel) and chromeos-initramfs ebuild (pull dump_kernel_config). BUG=chromium-os:22530 TEST=Built and successfully installed recovery image on CR-48 Change-Id: I146b6ad707d96c9fbc8731a73ae079e80902a565 Reviewed-on: https://gerrit.chromium.org/gerrit/12335 Reviewed-by: Richard Barnette Tested-by: Gilad Arnold --- mod_image_for_recovery.sh | 59 ++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/mod_image_for_recovery.sh b/mod_image_for_recovery.sh index 0ac288c7ec..9ebc390fe0 100755 --- a/mod_image_for_recovery.sh +++ b/mod_image_for_recovery.sh @@ -41,9 +41,6 @@ DEFINE_integer jobs -1 \ DEFINE_string build_root "/build" \ "The root location for board sysroots." -DEFINE_string rootfs_hash "/tmp/rootfs.hash" \ - "Path where the rootfs hash should be stored." - DEFINE_boolean verbose $FLAGS_FALSE \ "Log all commands to stdout." v @@ -104,17 +101,32 @@ get_install_vblock() { echo "$out" } -failboat() { +okboat() { # http://www.chris.com/ascii/index.php?art=transportation/nautical - echo -e "${V_BOLD_RED}" - cat <&2 || failboat "build_kernel_image" - sudo rm "$FLAGS_rootfs_hash" + --nouse_dev_keys 1>&2 || failboat "build_kernel_image" sudo mount | sed 's/^/16651 /' sudo losetup -a | sed 's/^/16651 /' - sudo losetup -d "$root_dev" trap - RETURN # Update the EFI System Partition configuration so that the kern_hash check @@ -435,6 +428,8 @@ maybe_resize_stateful # Also copies the image if needed. install_recovery_kernel +okboat + echo "Recovery image created at $RECOVERY_IMAGE" print_time_elapsed trap - EXIT