[coreboot] [PATCH] RFC: autocreate Kconfig from DTS
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Fri Aug 22 03:40:29 CEST 2008
This is a RFC only to show what we could do. Basically, the DTS is now
the only source of hardware description and a converter creates Kconfig
variables from each mainboard DTS.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: corebootv3-Kconfig_from_dts/Kconfig
===================================================================
--- corebootv3-Kconfig_from_dts/Kconfig (Revision 794)
+++ corebootv3-Kconfig_from_dts/Kconfig (Arbeitskopie)
@@ -62,39 +62,16 @@
endmenu
+# Source all northbridge/southbridge/superio Kconfig files:
+
source mainboard/Kconfig
source arch/x86/Kconfig
source lib/Kconfig
source device/Kconfig
# These are used for internal purposes only:
+source build/Kconfig
-# Northbridges:
-config NORTHBRIDGE_AMD_GEODELX
- boolean
-config NORTHBRIDGE_AMD_K8
- boolean
-config NORTHBRIDGE_INTEL_I440BXEMULATION
- boolean
-
-# Southbridges:
-config SOUTHBRIDGE_AMD_CS5536
- boolean
-config SOUTHBRIDGE_INTEL_I82371EB
- boolean
-config SOUTHBRIDGE_NVIDIA_MCP55
- boolean
-
-# Super I/Os:
-config SUPERIO_WINBOND_W83627HF
- boolean
-config SUPERIO_FINTEK_F71805F
- boolean
-config SUPERIO_ITE_IT8716F
- boolean
-
-# Source all northbridge/southbridge/superio Kconfig files:
-
menu "Payload"
config PAYLOAD_ELF_LOADER
Index: corebootv3-Kconfig_from_dts/mainboard/adl/Kconfig
===================================================================
--- corebootv3-Kconfig_from_dts/mainboard/adl/Kconfig (Revision 794)
+++ corebootv3-Kconfig_from_dts/mainboard/adl/Kconfig (Arbeitskopie)
@@ -28,9 +28,6 @@
select ARCH_X86
select CPU_AMD_GEODELX
select OPTION_TABLE
- select NORTHBRIDGE_AMD_GEODELX
- select SOUTHBRIDGE_AMD_CS5536
- select SUPERIO_WINBOND_W83627HF
help
Advanced Digital Logic MSM800SEV mainboard.
Index: corebootv3-Kconfig_from_dts/mainboard/amd/Kconfig
===================================================================
--- corebootv3-Kconfig_from_dts/mainboard/amd/Kconfig (Revision 794)
+++ corebootv3-Kconfig_from_dts/mainboard/amd/Kconfig (Arbeitskopie)
@@ -28,9 +28,6 @@
select ARCH_X86
select CPU_AMD_GEODELX
select OPTION_TABLE
- select NORTHBRIDGE_AMD_GEODELX
- select SOUTHBRIDGE_AMD_CS5536
- select SUPERIO_WINBOND_W83627HF
select PIRQ_TABLE
help
AMD DB800 Geode LX development board.
@@ -40,8 +37,6 @@
select ARCH_X86
select CPU_AMD_GEODELX
select OPTION_TABLE
- select NORTHBRIDGE_AMD_GEODELX
- select SOUTHBRIDGE_AMD_CS5536
select PIRQ_TABLE
help
AMD Norwich Geode LX development board.
@@ -51,7 +46,6 @@
select ARCH_X86
select OPTION_TABLE
select CPU_AMD_K8
- select NORTHBRIDGE_AMD_K8
select IOAPIC
help
AMD Serengeti
Index: corebootv3-Kconfig_from_dts/mainboard/artecgroup/Kconfig
===================================================================
--- corebootv3-Kconfig_from_dts/mainboard/artecgroup/Kconfig (Revision 794)
+++ corebootv3-Kconfig_from_dts/mainboard/artecgroup/Kconfig (Arbeitskopie)
@@ -28,8 +28,6 @@
select ARCH_X86
select CPU_AMD_GEODELX
select OPTION_TABLE
- select NORTHBRIDGE_AMD_GEODELX
- select SOUTHBRIDGE_AMD_CS5536
select PIRQ_TABLE
help
Artec Group DBE61 ThinCan, also known as Linutop 1.
@@ -39,8 +37,6 @@
select ARCH_X86
select CPU_AMD_GEODELX
select OPTION_TABLE
- select NORTHBRIDGE_AMD_GEODELX
- select SOUTHBRIDGE_AMD_CS5536
select PIRQ_TABLE
help
Artec Group DBE62 ThinCan.
Index: corebootv3-Kconfig_from_dts/mainboard/pcengines/Kconfig
===================================================================
--- corebootv3-Kconfig_from_dts/mainboard/pcengines/Kconfig (Revision 794)
+++ corebootv3-Kconfig_from_dts/mainboard/pcengines/Kconfig (Arbeitskopie)
@@ -28,9 +28,6 @@
select ARCH_X86
select CPU_AMD_GEODELX
select OPTION_TABLE
- select NORTHBRIDGE_AMD_GEODELX
- select SOUTHBRIDGE_AMD_CS5536
- select SUPERIO_WINBOND_W83627HF
select PIRQ_TABLE
help
PC Engines ALIX1.C.
@@ -40,8 +37,6 @@
select ARCH_X86
select CPU_AMD_GEODELX
select OPTION_TABLE
- select NORTHBRIDGE_AMD_GEODELX
- select SOUTHBRIDGE_AMD_CS5536
select PIRQ_TABLE
help
PC Engines ALIX.2C3.
Index: corebootv3-Kconfig_from_dts/mainboard/gigabyte/Kconfig
===================================================================
--- corebootv3-Kconfig_from_dts/mainboard/gigabyte/Kconfig (Revision 794)
+++ corebootv3-Kconfig_from_dts/mainboard/gigabyte/Kconfig (Arbeitskopie)
@@ -28,9 +28,6 @@
select ARCH_X86
select OPTION_TABLE
select CPU_AMD_K8
- select NORTHBRIDGE_AMD_K8
- select SOUTHBRIDGE_NVIDIA_MCP55
- select SUPERIO_ITE_IT8716F
select IOAPIC
help
Gigabyte M57SLI
Index: corebootv3-Kconfig_from_dts/mainboard/emulation/Kconfig
===================================================================
--- corebootv3-Kconfig_from_dts/mainboard/emulation/Kconfig (Revision 794)
+++ corebootv3-Kconfig_from_dts/mainboard/emulation/Kconfig (Arbeitskopie)
@@ -29,9 +29,6 @@
select ARCH_X86
select CPU_I586
select OPTION_TABLE
- select NORTHBRIDGE_INTEL_I440BXEMULATION
- select SOUTHBRIDGE_INTEL_I82371EB
- select SUPERIO_WINBOND_W83627HF
help
x86 QEMU variant.
Index: corebootv3-Kconfig_from_dts/create_Kconfig_from_dts
===================================================================
--- corebootv3-Kconfig_from_dts/create_Kconfig_from_dts (Revision 0)
+++ corebootv3-Kconfig_from_dts/create_Kconfig_from_dts (Revision 0)
@@ -0,0 +1,28 @@
+#!/bin/bash
+for a in mainboard/*/*/; do
+ c=`echo $a|tr [[:lower:]]/- [[:upper:]]__|sed "s/^MAIN//;s/_$//"`
+ grep /config/ $a/dts|
+ cut -f 2 -d'"'|
+ sed 's_/[^/]*$__'|
+ tr [[:lower:]]/ [[:upper:]]_|
+ sort -u|
+ while read b; do
+ echo $b $c
+ done
+ done|
+ sort|
+ while read d e; do
+ if [[ x$d != x$oldd ]]; then
+ echo -n "
+
+config $d
+ bool
+ default y
+ depends "
+ else
+ echo -n " || "
+ fi
+ echo -n $e
+ oldd=$d
+ done >$*
+echo >>$*
Property changes: corebootv3-Kconfig_from_dts/create_Kconfig_from_dts
___________________________________________________________________
Name: svn:executable
+ *
Index: corebootv3-Kconfig_from_dts/Makefile
===================================================================
--- corebootv3-Kconfig_from_dts/Makefile (Revision 794)
+++ corebootv3-Kconfig_from_dts/Makefile (Arbeitskopie)
@@ -130,6 +130,8 @@
prepare:
$(Q)mkdir -p $(obj)
+ $(Q)printf "waaah\n"
+ $(Q)./create_Kconfig_from_dts $(obj)/Kconfig
# FIXME: If .config changed, a rebuild is required.
--
http://www.hailfinger.org/
More information about the coreboot
mailing list