summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiang Xu <warx@chromium.org>2016-10-07 10:55:39 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-10-13 17:26:38 -0700
commita1001da56512fdcd3bd648a5a04da03ffea3e91b (patch)
treeded5a838fca208899eef96f1fd08856964f133e5
parent3b55afa94e84c91874fcdad352b4053036886aa7 (diff)
downloadvboot-a1001da56512fdcd3bd648a5a04da03ffea3e91b.tar.gz
Strip out bootcache config when removing rootfs verification
For a device with bootcache support (such as parrot), the kernel config contains bootcache args (reference: device_map_args in build_kernel_image.sh). When removing rootfs verification, bootcache should be disabled, equivalently we should remove bootcache args. BRANCH=vboot_reference BUG=chromium:590606 TEST=tested on parrot device with ./build_image --board=parrot test. After installing the image on device, (1) run sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification (2) reboot The bootloop bug is fixed. Change-Id: I56ca5f2d98e00e1117611959a67ce72338ec7377 Reviewed-on: https://chromium-review.googlesource.com/395386 Commit-Ready: Qiang Xu <warx@chromium.org> Tested-by: Qiang Xu <warx@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Qiang Xu <warx@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-xscripts/image_signing/make_dev_ssd.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/image_signing/make_dev_ssd.sh b/scripts/image_signing/make_dev_ssd.sh
index 28d42a69..db076cc3 100755
--- a/scripts/image_signing/make_dev_ssd.sh
+++ b/scripts/image_signing/make_dev_ssd.sh
@@ -61,9 +61,12 @@ EXEC_LOG="$(make_temp_file)"
# ----------------------------------------------------------------------------
# Removes rootfs verification from kernel boot parameter
+# And strip out bootcache args if it exists
remove_rootfs_verification() {
local new_root="PARTUUID=%U/PARTNROFF=1"
+ # the first line in sed is to strip out bootcache details
echo "$*" | sed '
+ s| dm=\"2 [^"]*bootcache[^"]* vroot | dm=\"1 vroot |
s| root=/dev/dm-[0-9] | root='"$new_root"' |
s| dm_verity.dev_wait=1 | dm_verity.dev_wait=0 |
s| payload=PARTUUID=%U/PARTNROFF=1 | payload=ROOT_DEV |