aboutsummaryrefslogtreecommitdiff
path: root/src/vboot/vboot_common.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2017-03-17 14:29:10 -0700
committerJulius Werner <jwerner@chromium.org>2017-03-28 22:17:00 +0200
commit5fc7c2896ae0d628903144041ff13349c79f2619 (patch)
tree8b4d65dd9a0f8062847278940615061bb74b0831 /src/vboot/vboot_common.h
parentb04cc6b90204d55096a56d4f3cd707148a634c97 (diff)
vboot: Compile bootmode.c conditionally based on CONFIG_VBOOT
Currently, src/vboot/bootmode.c gets compiled even if vboot is disabled. It seems that this was only done to support calling certain developer/recovery mode functions in this case. There is no reason to compile the whole file for that -- we can just differentiate with a stub in the header instead, which is what other parts of coreboot usually do for cases like this. Change-Id: If83e1b3e0f34f75c2395b4c464651e373724b2e6 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/18982 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/vboot/vboot_common.h')
-rw-r--r--src/vboot/vboot_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vboot/vboot_common.h b/src/vboot/vboot_common.h
index aa01f28944..8421ecb640 100644
--- a/src/vboot/vboot_common.h
+++ b/src/vboot/vboot_common.h
@@ -104,8 +104,14 @@ void verstage_main(void);
void verstage_mainboard_init(void);
/* Check boot modes */
+#if IS_ENABLED(CONFIG_VBOOT)
int vboot_developer_mode_enabled(void);
int vboot_recovery_mode_enabled(void);
int vboot_recovery_mode_memory_retrain(void);
+#else /* !CONFIG_VBOOT */
+static inline int vboot_developer_mode_enabled(void) { return 0; }
+static inline int vboot_recovery_mode_enabled(void) { return 0; }
+static inline int vboot_recovery_mode_memory_retrain(void) { return 0; }
+#endif
#endif /* __VBOOT_VBOOT_COMMON_H__ */