aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/security/vboot/Kconfig9
-rw-r--r--src/security/vboot/bootmode.c17
2 files changed, 26 insertions, 0 deletions
diff --git a/src/security/vboot/Kconfig b/src/security/vboot/Kconfig
index d5b5de291e..e2a3f20792 100644
--- a/src/security/vboot/Kconfig
+++ b/src/security/vboot/Kconfig
@@ -221,6 +221,15 @@ config VBOOT_FWID_VERSION
This is the second part of the FWID written to various regions of a
vboot firmware image to identify its version.
+config VBOOT_NO_BOARD_SUPPORT
+ bool "Allow the use of vboot without board support"
+ default n
+ help
+ Enable weak functions for get_write_protect_state and
+ get_recovery_mode_switch in order to proceed with refactoring
+ of the vboot2 code base. Later on this code is removed and replaced
+ by interfaces.
+
config RO_REGION_ONLY
string "Additional files that should not be copied to RW"
default ""
diff --git a/src/security/vboot/bootmode.c b/src/security/vboot/bootmode.c
index 834bc481e1..05098b4304 100644
--- a/src/security/vboot/bootmode.c
+++ b/src/security/vboot/bootmode.c
@@ -169,3 +169,20 @@ int vboot_developer_mode_enabled(void)
return 0;
}
+
+#if IS_ENABLED(CONFIG_VBOOT_NO_BOARD_SUPPORT)
+/**
+ * TODO: Create flash protection interface which implements get_write_protect_state.
+ * get_recovery_mode_switch should be implemented as default function.
+ */
+int __attribute__((weak)) get_write_protect_state(void)
+{
+ return 0;
+}
+
+int __attribute__((weak)) get_recovery_mode_switch(void)
+{
+ return 0;
+}
+
+#endif