David Hendricks (dhendrix@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1962
-gerrit
commit 36b42ec9bb4ba9349ed2f132c9711f1b0a389257 Author: David Hendricks dhendrix@chromium.org Date: Fri Nov 30 19:16:50 2012 -0800
Conditionally include mc146818rtc in console.c
get_option() is used to get a config option (debug loglevel) from CMOS. However, not all machines have CMOS, so define a dummy inline function that will return an error code so the caller (console_init()) will use the default loglevel.
Change-Id: I6adf371d79164178f40a83f7608289a6a7673357 Signed-off-by: David Hendricks dhendrix@chromium.org --- src/console/console.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/src/console/console.c b/src/console/console.c index 8f60f04..d5f25a5 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -24,7 +24,17 @@
#ifndef __PRE_RAM__ #include <string.h> + +/* + * FIXME: get_option() needs to be abstracted better so that other non-volatile + * storage can be used. This will benefit machines without CMOS as well as those + * without a battery-backed CMOS (e.g. some laptops). + */ +#ifdef HAVE_CMOS_DEFAULT #include <pc80/mc146818rtc.h> +#else +static inline int get_option(void *dest, const char *name) { return -1; } +#endif
/* initialize the console */ void console_init(void)