summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorShao-Chuan Lee <shaochuan@chromium.org>2022-08-09 17:36:14 +0900
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-16 19:03:34 +0000
commitba30719672b5cbd5510e5dcf98937dbe387838f9 (patch)
treef5c7c5b5eb067ae6535129abd0ae9575e6145187 /scripts
parentc050cbd0f13f34915854137dced4003b8836f451 (diff)
downloadvboot-ba30719672b5cbd5510e5dcf98937dbe387838f9.tar.gz
make_dev_ssd.sh: skip firmware checks on VM
The script doesn't work on betty without --force. And in turn dev_features_rootfs_verification doesn't work as well. BUG=None TEST=copy the script to betty and run BRANCH=none Change-Id: I70f48b97b470bb04fb9f5fff751df83c44d7defe Signed-off-by: Shao-Chuan Lee <shaochuan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3818089 Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/image_signing/make_dev_ssd.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/image_signing/make_dev_ssd.sh b/scripts/image_signing/make_dev_ssd.sh
index d9df52a5..7c6f68e6 100755
--- a/scripts/image_signing/make_dev_ssd.sh
+++ b/scripts/image_signing/make_dev_ssd.sh
@@ -491,6 +491,20 @@ validity_check_live_firmware() {
return $FLAGS_FALSE
}
+validity_check() {
+ validity_check_live_partitions || return $FLAGS_FALSE
+
+ # Remaining checks depend on firmware; skip if device is running in a VM.
+ if crossystem 'inside_vm?1'; then
+ debug_msg "Device is a VM, skipping firmware checks"
+ return $FLAGS_TRUE
+ fi
+
+ validity_check_live_firmware || return $FLAGS_FALSE
+ validity_check_crossystem_flags || return $FLAGS_FALSE
+ return $FLAGS_TRUE
+}
+
# Main
# ----------------------------------------------------------------------------
main() {
@@ -536,9 +550,7 @@ main() {
sleep 1
done
echo ""
- elif ! validity_check_live_firmware ||
- ! validity_check_live_partitions ||
- ! validity_check_crossystem_flags; then
+ elif ! validity_check; then
die "IMAGE ${FLAGS_image} IS NOT MODIFIED."
fi
fi