[coreboot] r3472 - trunk/payloads/coreinfo

svn at coreboot.org svn at coreboot.org
Tue Aug 5 16:36:21 CEST 2008


Author: uwe
Date: 2008-08-05 16:36:20 +0200 (Tue, 05 Aug 2008)
New Revision: 3472

Modified:
   trunk/payloads/coreinfo/Kconfig
   trunk/payloads/coreinfo/coreinfo.c
Log:
Move out some hardcoded strings in coreinfo to become Kconfig variables.
This is useful for use with (e.g.) Bayou in order let the user customize the
payload name, description, version, etc.

For instance, instead of using stock coreinfo and calling the payload
"coreinfo" and the Bayou menu item "Show system information" a user might
only be interested in an NVRAM dump payload. Thus, he/she can enable
only the NVRAM coreinfo module via Kconfig, and tell Kconfig to call
the payload "NVRAMdumper" and the Bayou menu item "Show NVRAM contents".

This is build-tested, and tested against Bayou in QEMU.

Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Jordan Crouse <jordan.crouse at amd.com>



Modified: trunk/payloads/coreinfo/Kconfig
===================================================================
--- trunk/payloads/coreinfo/Kconfig	2008-08-04 21:02:07 UTC (rev 3471)
+++ trunk/payloads/coreinfo/Kconfig	2008-08-05 14:36:20 UTC (rev 3472)
@@ -36,6 +36,30 @@
 
 	  This option will increase the ELF file size by ca. 256 bytes.
 
+config PAYLOAD_INFO_NAME
+	string "Payload name"
+	default "coreinfo"
+	help
+	  The name of this payload for use in (e.g.) Bayou.
+
+config PAYLOAD_INFO_LISTNAME
+	string "Payload menu entry name"
+	default "System Information"
+	help
+	  The name of this payload's menu entry for use in (e.g.) Bayou.
+
+config PAYLOAD_INFO_DESC
+	string "Payload description"
+	default "Display information about the system"
+	help
+	  The description of this payload for use in (e.g.) Bayou.
+
+config PAYLOAD_INFO_VERSION
+	string "Payload version"
+	default "0.1"
+	help
+	  The version number of this payload.
+
 endmenu
 
 menu "Modules"

Modified: trunk/payloads/coreinfo/coreinfo.c
===================================================================
--- trunk/payloads/coreinfo/coreinfo.c	2008-08-04 21:02:07 UTC (rev 3471)
+++ trunk/payloads/coreinfo/coreinfo.c	2008-08-05 14:36:20 UTC (rev 3472)
@@ -221,7 +221,7 @@
 {
 	int key;
 
-	center(0, "coreinfo v0.1");
+	center(0, CONFIG_PAYLOAD_INFO_NAME " " CONFIG_PAYLOAD_INFO_VERSION);
 	refresh();
 
 	print_menu();
@@ -301,6 +301,6 @@
 	return 0;
 }
 
-PAYLOAD_INFO(name, "coreinfo");
-PAYLOAD_INFO(listname, "System Information");
-PAYLOAD_INFO(desc, "Display information about the system");
+PAYLOAD_INFO(name, CONFIG_PAYLOAD_INFO_NAME);
+PAYLOAD_INFO(listname, CONFIG_PAYLOAD_INFO_LISTNAME);
+PAYLOAD_INFO(desc, CONFIG_PAYLOAD_INFO_DESC);





More information about the coreboot mailing list