From dc4a6446e9cbb8670493ccca77a0ead605557c40 Mon Sep 17 00:00:00 2001 From: Gaurav Shah Date: Wed, 17 Nov 2010 14:11:43 -0800 Subject: [PATCH] Set success=1 for the recovery kernel This will prevent the firmware from updating the tries flag on a USB recovery image. Change-Id: I47bf276eab5b40ae54b732d0e082e4c9f58bfed3 BUG=chromium-os:6550 TEST=build_package, build_image, cgpt show recovery_image.bin (successful flag should be set to 1) Review URL: http://codereview.chromium.org/4979007 --- mod_image_for_recovery.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod_image_for_recovery.sh b/mod_image_for_recovery.sh index 3e4a6f9780..e6cc8859a8 100755 --- a/mod_image_for_recovery.sh +++ b/mod_image_for_recovery.sh @@ -284,6 +284,10 @@ install_recovery_kernel() { count=$kern_a_size \ conv=notrunc + # Set the 'Success' flag to 1 (to prevent the firmware from updating + # the 'Tries' flag). + sudo $GPT add -i 2 -S 1 "$RECOVERY_IMAGE" + # Repeat for the legacy bioses. # Replace vmlinuz.A with the recovery version local sysroot="${FLAGS_build_root}/${FLAGS_board}"