David Hendricks ([email protected]) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1962
-gerrit commit 3a7e42f9090e91695d2fd9181c944fd224d813f8 Author: David Hendricks <[email protected]> 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 <[email protected]> --- src/console/console.c | 10 ++++++++++ src/include/pc80/mc146818rtc.h | 2 ++ 2 files changed, 12 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) diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h index ee1473b..15d35bb 100644 --- a/src/include/pc80/mc146818rtc.h +++ b/src/include/pc80/mc146818rtc.h @@ -167,6 +167,8 @@ static inline void cmos_write32(u8 offset, u32 value) } #endif +#define get_option(a,b) -1 + #if !defined(__ROMCC__) void rtc_init(int invalid); void rtc_check_update_cmos_date(u8 has_century); -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

