Patchwork kconfig: Allow per-board VGA BIOS file name and PCI ID defaults

login
register
about
Submitter Uwe Hermann
Date 2009-10-25 16:45:00
Message ID <20091025164459.GT22827@greenwood>
Download mbox | patch
Permalink /patch/486/
State Rejected
Headers show

Comments

Uwe Hermann - 2009-10-25 16:45:00
See patch.

Build- and boot-tested on VIA pc2500e, build-tested on GIGABYTE
GA-M57SLI-S4 to make sure that boards which don't override these options
continue to build.


Uwe.
Peter Stuge - 2009-10-26 01:24:36
Uwe Hermann wrote:
> Allow per-board VGA BIOS file name and PCI ID defaults.

NAK actually. For one, please talk about the relationship between the
proposed VGA_BIOS_{FILE,ID} and the previous
FALLBACK_VGA_BIOS_{FILE,ID} ?

Also I assume there will at one point be NORMAL_*, right?


If the purpose is strictly to provide a useful default for each board
then I think VGA_BIOS_FILE should be dropped, because the VGA BIOS
only really has a well known filename for QEMU.


The PCI ID isn't really a board property. Most of the time the it is
a function of the northbridge, but sometimes it IS set by the board.

Can Kconfig deal with a single value being set in more than one
place? How is precedence determined? Even if it can, that method
feels kind of ugly.

Can a single value get it's default from one of several other values,
depending on settings, with a particular precedence specified?

NB must be able to set VGA_PCI_ID. Board must also be able to set
VGA_PCI_ID. If neither have set it, there can be no VGA BIOS and
the option should not even be visible in the menu. If only NB has
set an ID, use that ID. If only board, or both NB and board have set
ID, then use the board ID.


//Peter

Patch

Allow per-board VGA BIOS file name and PCI ID defaults.

Of course, the user can still override those defaults, if needed.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>

Index: src/Kconfig
===================================================================
--- src/Kconfig	(Revision 4851)
+++ src/Kconfig	(Arbeitskopie)
@@ -360,6 +360,16 @@ 
 
 endmenu
 
+# Default VGA BIOS file name, can be overridden in src/mainboard/*/Κconfig.
+config VGA_BIOS_FILE
+	string
+	default "vgabios.bin"
+
+# Default VGA BIOS ID, can be overridden in src/mainboard/*/Κconfig.
+config VGA_BIOS_ID
+	string
+	default "1106,3230"
+
 menu "VGA BIOS"
 
 config VGA_BIOS
@@ -374,14 +384,14 @@ 
 config FALLBACK_VGA_BIOS_FILE
 	string "VGA BIOS path and filename"
 	depends on VGA_BIOS
-	default "vgabios.bin"
+	default VGA_BIOS_FILE
 	help
 	  The path and filename of the file to use as VGA BIOS.
 
 config FALLBACK_VGA_BIOS_ID
 	string "VGA BIOS ID"
 	depends on VGA_BIOS
-	default "1106,3230"
+	default VGA_BIOS_ID
 	help
 	  The comma-separated PCI vendor and device ID that would associate
 	  your VGA BIOS to your video card.
Index: src/mainboard/via/pc2500e/Kconfig
===================================================================
--- src/mainboard/via/pc2500e/Kconfig	(Revision 4851)
+++ src/mainboard/via/pc2500e/Kconfig	(Arbeitskopie)
@@ -47,3 +47,13 @@ 
 	default 0xaa51
 	depends on BOARD_VIA_PC2500E
 
+config VGA_BIOS_FILE
+	string
+	default "M14CRT.ROM"
+	depends on BOARD_VIA_PC2500E
+
+config VGA_BIOS_ID
+	string
+	default "1106,3344"
+	depends on BOARD_VIA_PC2500E
+