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>
Reviewed-on: http://review.coreboot.org/12479
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Ben Gardner
2015-11-19 10:48:47 -06:00
committed by Martin Roth
parent 9c6d2b8f4c
commit aa5f5b153f
2 changed files with 9 additions and 14 deletions

View File

@ -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.