aboutsummaryrefslogtreecommitdiff
path: root/resources/libreboot/patch/misc/0009-chromeos-Allow-disabling-vboot-firmware-verification.patch
blob: 6df76360a886b4854fd90bce173f106bb9812044 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From a5dba25113e8bd989b74763baabd7a07931fa314 Mon Sep 17 00:00:00 2001
From: Paul Kocialkowski <contact@paulk.fr>
Date: Sun, 9 Aug 2015 10:23:38 +0200
Subject: [PATCH 9/9] chromeos: Allow disabling vboot firmware verification
 when ChromeOS is enabled

Some ChromeOS bindings might be wanted without using vboot verification, for
instance to boot up depthcharge from the version of Coreboot installed in the
write-protected part of the SPI flash (without jumping to a RW firmware).

Vboot firmware verification is still selected by default when ChromeOS is
enabled, but this allows more flexibility since vboot firmware verification is
no longer a hard requirement for ChromeOS (that this particular use case still
allows booting ChromeOS).

In the future, it would make sense to have all the separate components that
CONFIG_CHROMEOS enables have their own config options, so that they can be
enabled separately.

Change-Id: Ia4057a56838aa05dcf3cb250ae1a27fd91402ddb
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 src/vendorcode/google/chromeos/Kconfig        | 2 +-
 src/vendorcode/google/chromeos/vboot2/Kconfig | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index 8309d19..694e0d7 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -31,7 +31,6 @@ config CHROMEOS
 	select BOOTMODE_STRAPS
 	select ELOG
 	select COLLECT_TIMESTAMPS
-	select VBOOT_VERIFY_FIRMWARE
 	help
 	  Enable ChromeOS specific features like the GPIO sub table in
 	  the coreboot table. NOTE: Enabling this option on an unsupported
@@ -129,6 +128,7 @@ config VIRTUAL_DEV_SWITCH
 
 config VBOOT_VERIFY_FIRMWARE
 	bool "Verify firmware with vboot."
+	default y if CHROMEOS
 	default n
 	depends on HAVE_HARD_RESET
 	help
diff --git a/src/vendorcode/google/chromeos/vboot2/Kconfig b/src/vendorcode/google/chromeos/vboot2/Kconfig
index 930b009..610a847 100644
--- a/src/vendorcode/google/chromeos/vboot2/Kconfig
+++ b/src/vendorcode/google/chromeos/vboot2/Kconfig
@@ -16,6 +16,8 @@
 ## Foundation, Inc.
 ##
 
+if VBOOT_VERIFY_FIRMWARE
+
 config VBOOT_STARTS_IN_BOOTBLOCK
 	bool "Vboot starts verifying in bootblock"
 	default n
@@ -133,3 +135,5 @@ config VBOOT_DYNAMIC_WORK_BUFFER
 	  ram to allocate the vboot work buffer. That means vboot verification
 	  is after memory init and requires main memory to back the work
 	  buffer.
+
+endif # VBOOT_VERIFY_FIRMWARE
-- 
1.9.1