Ben Gardner (gardner.ben@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12479
-gerrit
commit 2501d9b78a65e3c3defa3a5a75a2279ed5c6478a Author: Ben Gardner gardner.ben@gmail.com Date: Thu Nov 19 10:48:47 2015 -0600
rules.h: Add ENV_STRING and use it in console_init()
Move the #ifdef chain to set the stage name to rules.h.
Change-Id: I577ddf2de4ef249a1a4ce627bb55608731a9f5ed Signed-off-by: Ben Gardner gardner.ben@gmail.com --- src/console/init.c | 16 ++-------------- src/include/rules.h | 7 +++++++ 2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/console/init.c b/src/console/init.c index 7e7c5ac..8f40abb 100644 --- a/src/console/init.c +++ b/src/console/init.c @@ -43,18 +43,6 @@ void console_init(void)
console_hw_init();
- printk(BIOS_INFO, "\n\ncoreboot-%s%s %s %s starting...\n", - coreboot_version, coreboot_extra_version, coreboot_build, -#if ENV_BOOTBLOCK - "bootblock" -#elif ENV_ROMSTAGE - "romstage" -#elif ENV_RAMSTAGE - "ramstage" -#elif ENV_VERSTAGE - "verstage" -#else - "UNKNOWN" -#endif - ); + printk(BIOS_INFO, "\n\ncoreboot-%s%s %s " ENV_STRING " starting...\n", + coreboot_version, coreboot_extra_version, coreboot_build); } diff --git a/src/include/rules.h b/src/include/rules.h index debb200..6a05ae9 100644 --- a/src/include/rules.h +++ b/src/include/rules.h @@ -26,6 +26,7 @@ #define ENV_SMM 0 #define ENV_VERSTAGE 0 #define ENV_RMODULE 0 +#define ENV_STRING "bootblock"
#elif defined(__ROMSTAGE__) #define ENV_BOOTBLOCK 0 @@ -34,6 +35,7 @@ #define ENV_SMM 0 #define ENV_VERSTAGE 0 #define ENV_RMODULE 0 +#define ENV_STRING "romstage"
#elif defined(__SMM__) #define ENV_BOOTBLOCK 0 @@ -42,6 +44,7 @@ #define ENV_SMM 1 #define ENV_VERSTAGE 0 #define ENV_RMODULE 0 +#define ENV_STRING "smm"
#elif defined(__VERSTAGE__) #define ENV_BOOTBLOCK 0 @@ -50,6 +53,7 @@ #define ENV_SMM 0 #define ENV_VERSTAGE 1 #define ENV_RMODULE 0 +#define ENV_STRING "verstage"
#elif defined(__RAMSTAGE__) #define ENV_BOOTBLOCK 0 @@ -58,6 +62,7 @@ #define ENV_SMM 0 #define ENV_VERSTAGE 0 #define ENV_RMODULE 0 +#define ENV_STRING "ramstage"
#elif defined(__RMODULE__) #define ENV_BOOTBLOCK 0 @@ -66,6 +71,7 @@ #define ENV_SMM 0 #define ENV_VERSTAGE 0 #define ENV_RMODULE 1 +#define ENV_STRING "rmodule"
#else /* @@ -80,6 +86,7 @@ #define ENV_SMM 0 #define ENV_VERSTAGE 0 #define ENV_RMODULE 0 +#define ENV_STRING "UNKNOWN" #endif
/* For romstage and ramstage always build with simple device model, ie.