[coreboot] [PATCH] v3 mainboard Kconfig cleanup

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Jul 11 15:06:53 CEST 2008


On 10.07.2008 03:15, Carl-Daniel Hailfinger wrote:
> Hi!
>
> Right now, our Kconfig files in the mainboard/ directory in the v3 tree
> are not exactly in the best shape.
> - MAINBOARD_NAME is claimed to be the mainboard name, but it is used
> exclusively as mainboard directory.
> - MAINBOARD_NAME is set in mainboard/$VENDOR/$BOARD/Kconfig to
> $VENDOR/$BOARD, but mainboard/$VENDOR/Kconfig already hardcodes
> $VENDOR/$BOARD as board path.
> - MAINBOARD_NAME has a help text which will never be displayed to the user.
>   

Final patch. The diffstat is encouraging: A total of 200 lines have been
removed completely.

Per-board Kconfig files have been deleted, the remnants making sense
have been merged into per-vendor Kconfig files and the never-shown help
texts have been removed.

If there are ever some real per-board options and not just tricks to
make the makefiles behave, we can resurrect the per-board Kconfig files.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/adl/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/adl/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/adl/Kconfig	(working copy)
@@ -36,5 +36,8 @@
 
 endchoice
 
-source "mainboard/adl/msm800sev/Kconfig"
+config MAINBOARD_DIR
+	string
+	default adl/msm800sev
+	depends BOARD_ADL_MSM800SEV
 
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/adl/msm800sev/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/adl/msm800sev/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/adl/msm800sev/Kconfig	(working copy)
@@ -1,28 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default adl/msm800sev
-	depends BOARD_ADL_MSM800SEV
-	help
-	  This is the name for the Advanced Digital Logic MSM800SEV mainboard.
-
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/Kconfig	(working copy)
@@ -48,6 +48,13 @@
 
 endchoice
 
-source "mainboard/amd/db800/Kconfig"
-source "mainboard/amd/norwich/Kconfig"
+config MAINBOARD_DIR
+	string
+	default amd/db800
+	depends BOARD_AMD_DB800
 
+config MAINBOARD_DIR
+	string
+	default amd/norwich
+	depends BOARD_AMD_NORWICH
+
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/norwich/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/norwich/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/norwich/Kconfig	(working copy)
@@ -1,28 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default amd/norwich
-	depends BOARD_AMD_NORWICH
-	help
-	  This is the default mainboard name.
-
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/db800/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/db800/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/amd/db800/Kconfig	(working copy)
@@ -1,28 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default amd/db800
-	depends BOARD_AMD_DB800
-	help
-	  This is the default mainboard name.
-
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/Kconfig	(working copy)
@@ -47,5 +47,12 @@
 
 endchoice
 
-source "mainboard/artecgroup/dbe61/Kconfig"
-source "mainboard/artecgroup/dbe62/Kconfig"
+config MAINBOARD_DIR
+	string
+	default artecgroup/dbe61
+	depends BOARD_ARTECGROUP_DBE61
+
+config MAINBOARD_DIR
+	string
+	default artecgroup/dbe62
+	depends BOARD_ARTECGROUP_DBE62
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/dbe61/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/dbe61/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/dbe61/Kconfig	(working copy)
@@ -1,28 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default artecgroup/dbe61
-	depends BOARD_ARTECGROUP_DBE61
-	help
-	  This is the default mainboard name.
-
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/dbe62/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/dbe62/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/artecgroup/dbe62/Kconfig	(working copy)
@@ -1,28 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-## Copyright (C) 2007 Ronald G. Minnich <rminnich at gmail.com>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default artecgroup/dbe62
-	depends BOARD_ARTECGROUP_DBE62
-	help
-	  This is the default mainboard name.
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/Kconfig	(working copy)
@@ -48,6 +48,12 @@
 
 endchoice
 
-source "mainboard/pcengines/alix1c/Kconfig"
-source "mainboard/pcengines/alix2c3/Kconfig"
+config MAINBOARD_DIR
+	string
+	default pcengines/alix1c
+	depends BOARD_PCENGINES_ALIX1C
 
+config MAINBOARD_DIR
+	string
+	default pcengines/alix2c3
+	depends BOARD_PCENGINES_ALIX2C3
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix1c/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix1c/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix1c/Kconfig	(working copy)
@@ -1,28 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-## Copyright (C) 2007 Ronald G. Minnich <rminnich at gmail.com>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default pcengines/alix1c
-	depends BOARD_PCENGINES_ALIX1C
-	help
-	  This is the default mainboard name.
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix1c/defconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix1c/defconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix1c/defconfig	(working copy)
@@ -20,7 +20,7 @@
 # CONFIG_VENDOR_ARTECGROUP is not set
 # CONFIG_VENDOR_EMULATION is not set
 CONFIG_VENDOR_PCENGINES=y
-CONFIG_MAINBOARD_NAME="pcengines/alix1c"
+CONFIG_MAINBOARD_DIR="pcengines/alix1c"
 CONFIG_BOARD_PCENGINES_ALIX1C=y
 # CONFIG_COREBOOT_ROMSIZE_KB_128 is not set
 # CONFIG_COREBOOT_ROMSIZE_KB_256 is not set
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix2c3/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix2c3/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix2c3/Kconfig	(working copy)
@@ -1,28 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-## Copyright (C) 2007 Ronald G. Minnich <rminnich at gmail.com>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default pcengines/alix2c3
-	depends BOARD_PCENGINES_ALIX2C3
-	help
-	  This is the default mainboard name.
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix2c3/defconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix2c3/defconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/pcengines/alix2c3/defconfig	(working copy)
@@ -19,7 +19,7 @@
 # CONFIG_VENDOR_ARTECGROUP is not set
 # CONFIG_VENDOR_EMULATION is not set
 CONFIG_VENDOR_PCENGINES=y
-CONFIG_MAINBOARD_NAME="pcengines/alix2c3"
+CONFIG_MAINBOARD_DIR="pcengines/alix2c3"
 # CONFIG_BOARD_PCENGINES_ALIX1C is not set
 CONFIG_BOARD_PCENGINES_ALIX2C3=y
 # CONFIG_COREBOOT_ROMSIZE_KB_128 is not set
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/Kconfig	(working copy)
@@ -37,5 +37,8 @@
 
 endchoice
 
-source "mainboard/emulation/qemu-x86/Kconfig"
+config MAINBOARD_DIR
+	string
+	default emulation/qemu-x86
+	depends BOARD_EMULATION_QEMU_X86
 
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/qemu-x86/Kconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/qemu-x86/Kconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/qemu-x86/Kconfig	(working copy)
@@ -1,29 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright (C) 2007 coresystems GmbH
-## (Written by Stefan Reinauer <stepan at coresystems.de> for coresystems GmbH)
-## Copyright (C) 2007 Uwe Hermann <uwe at hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-config MAINBOARD_NAME
-	string
-	default emulation/qemu-x86
-	depends BOARD_EMULATION_QEMU_X86
-	help
-	  This is the default mainboard name.
-
Index: corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/qemu-x86/defconfig
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/qemu-x86/defconfig	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/mainboard/emulation/qemu-x86/defconfig	(working copy)
@@ -19,7 +19,7 @@
 # CONFIG_VENDOR_ARTECGROUP is not set
 CONFIG_VENDOR_EMULATION=y
 # CONFIG_VENDOR_PCENGINES is not set
-CONFIG_MAINBOARD_NAME="emulation/qemu-x86"
+CONFIG_MAINBOARD_DIR="emulation/qemu-x86"
 CONFIG_BOARD_EMULATION_QEMU_X86=y
 # CONFIG_COREBOOT_ROMSIZE_KB_128 is not set
 CONFIG_COREBOOT_ROMSIZE_KB_256=y
Index: corebootv3-mainboard_Kconfig_cleanup/Makefile
===================================================================
--- corebootv3-mainboard_Kconfig_cleanup/Makefile	(revision 694)
+++ corebootv3-mainboard_Kconfig_cleanup/Makefile	(working copy)
@@ -81,7 +81,7 @@
 	$(Q)printf "  DONE\n"
 
 ARCH:=$(shell echo $(CONFIG_ARCH))
-MAINBOARDDIR=$(shell echo $(CONFIG_MAINBOARD_NAME))
+MAINBOARDDIR=$(shell echo $(CONFIG_MAINBOARD_DIR))
 export MAINBOARDDIR
 
 COREBOOTINCLUDE    :=   -I$(src) -Iinclude \



-- 
http://www.hailfinger.org/





More information about the coreboot mailing list