Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36924 )
Change subject: lib/fmap: Allow disabling all output in fmap cache ......................................................................
lib/fmap: Allow disabling all output in fmap cache
Some devices like google/meep are _very_ tight on space in the bootblock and the strings are enough to make it spill over, so compile them out.
Change-Id: I1b96a6c3563e12435d6927c6e2f91a9458badac3 Signed-off-by: Patrick Georgi pgeorgi@google.com --- M src/lib/Kconfig M src/lib/fmap.c 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/36924/1
diff --git a/src/lib/Kconfig b/src/lib/Kconfig index cb1e4a5..2db0fcd 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -68,3 +68,8 @@ def_bool y
endif + +config SILENT_FMAP_CACHE + bool + help + Disable all console output in fmap cache code to save some space. diff --git a/src/lib/fmap.c b/src/lib/fmap.c index 4b4179c..8f47adb 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -32,10 +32,14 @@ static int fmap_print_once CAR_GLOBAL; static struct mem_region_device fmap_cache CAR_GLOBAL;
+#if CONFIG(SILENT_FMAP_CACHE) +#define print_once(...) do { } while (0) +#else #define print_once(...) do { \ if (!car_get_var(fmap_print_once)) \ printk(__VA_ARGS__); \ } while (0) +#endif
DECLARE_OPTIONAL_REGION(fmap_cache);