Hi,
attached patch enables kconfig based builds for a couple more boards. As usual, this merely passes build and a validity check that all variables are defined that are defined by newconfig (but not necessarily the same value).
The larger part of this (which is why I stopped porting more boards and want to get this out first) is that I moved the -O2 flag for romcc invocations into ROMCCFLAGS, as rca/rm4100 wants -O only.
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Acked-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
On Wed, Oct 07, 2009 at 02:06:46PM +0200, Patrick Georgi wrote:
attached patch enables kconfig based builds for a couple more boards. As usual, this merely passes build and a validity check that all variables are defined that are defined by newconfig (but not necessarily the same value).
The larger part of this (which is why I stopped porting more boards and want to get this out first) is that I moved the -O2 flag for romcc invocations into ROMCCFLAGS,
That's OK.
as rca/rm4100 wants -O only.
This should be investigated, though. I believe pretty much _all_ those -O or -O2 lines are copy-paste anyway, nobody really ever thought about which of them is appropriate for the resp. board.
Apart from possible romcc bugs I cannot think about a reason to not use the -O2 option for all boards per default. Is there such a bug? I can test -O vs. -O2 on some boards later, if needed.
(the -mcpu option is board-/cpu-dependent of course, and must stay configurable)
Index: src/mainboard/bcom/winnetp680/Kconfig
--- src/mainboard/bcom/winnetp680/Kconfig (Revision 0) +++ src/mainboard/bcom/winnetp680/Kconfig (Revision 0)
[...]
+config RAMBASE
- hex
- default 0x4000
- depends on BOARD_BCOM_WINNETP680
This is also something we should look into later. I'd use the new default for RAMBASE whereever possible, unless some boards have problems with that (which we should find out).
I can do some tests on boards which used 0x4000 earlier.
Index: src/mainboard/bcom/winnetp680/Makefile.inc
--- src/mainboard/bcom/winnetp680/Makefile.inc (Revision 0) +++ src/mainboard/bcom/winnetp680/Makefile.inc (Revision 0) @@ -0,0 +1,61 @@
[...]
+initobj-y += crt0.o +obj-y += mainboard.o +obj-$(CONFIG_HAVE_PIRQ_TABLE) += irq_tables.o +obj-$(CONFIG_HAVE_MP_TABLE) += mptable.o
+obj-$(CONFIG_HAVE_ACPI_TABLES) += fadt.o +obj-$(CONFIG_HAVE_ACPI_TABLES) += dsdt.o +obj-$(CONFIG_HAVE_ACPI_TABLES) += acpi_tables.o
+ldscript-y += ../../../../src/arch/i386/init/ldscript_fallback_cbfs.lb +ldscript-y += ../../../../src/cpu/x86/16bit/entry16.lds +ldscript-y += ../../../../src/cpu/x86/16bit/reset16.lds +ldscript-y += ../../../../src/arch/i386/lib/id.lds +ldscript-y += ../../../../src/arch/i386/lib/failover.lds
+crt0-y += ../../../../src/cpu/x86/16bit/entry16.inc +crt0-y += ../../../../src/cpu/x86/32bit/entry32.inc +crt0-y += ../../../../src/cpu/x86/16bit/reset16.inc +crt0-y += ../../../../src/arch/i386/lib/id.inc +crt0-y += ../../../../src/cpu/x86/fpu/enable_fpu.inc +crt0-y += ../../../../src/cpu/x86/mmx/enable_mmx.inc +crt0-y += auto.inc +crt0-y += ../../../../src/cpu/x86/mmx/disable_mmx.inc
+ifdef POST_EVALUATION
+$(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/dsdt.c
- $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@
+$(obj)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl
- iasl -p dsdt -tc $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl
- mv dsdt.hex $@
+$(obj)/mainboard/$(MAINBOARDDIR)/auto.inc: $(src)/mainboard/$(MAINBOARDDIR)/auto.c $(obj)/option_table.h
- $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/auto.c -o $@
- perl -e 's/.rodata/.rom.data/g' -pi $@
- perl -e 's/.text/.section .rom.text/g' -pi $@
+endif
Long-term this should move into a global file as it's pretty much the same for all boards.
Index: src/mainboard/gigabyte/ga_2761gxdk/Kconfig
--- src/mainboard/gigabyte/ga_2761gxdk/Kconfig (Revision 0) +++ src/mainboard/gigabyte/ga_2761gxdk/Kconfig (Revision 0) @@ -0,0 +1,148 @@
[...]
- select HAVE_HIGH_TABLES
Global option, should probably not be per-board.
Index: src/mainboard/newisys/khepri/Kconfig
--- src/mainboard/newisys/khepri/Kconfig (Revision 0) +++ src/mainboard/newisys/khepri/Kconfig (Revision 0) @@ -0,0 +1,123 @@ +config BOARD_NEWISYS_KHEPRI
- bool "Khepri"
"2100 Server (SUN Fire v20z)" as per wiki (not sure if "Khepri" is the official vendor name, if yes we should also adapt the wiki table).
+config CONSOLE_VGA
- bool
- default y
- depends on BOARD_NEWISYS_KHEPRI
+config PCI_ROM_RUN
- bool
- default y
- depends on BOARD_NEWISYS_KHEPRI
Should be dropped, global options.
Uwe.
Am Mittwoch, den 07.10.2009, 16:18 +0200 schrieb Uwe Hermann:
as rca/rm4100 wants -O only.
This should be investigated, though. I believe pretty much _all_ those -O or -O2 lines are copy-paste anyway, nobody really ever thought about which of them is appropriate for the resp. board.
Apart from possible romcc bugs I cannot think about a reason to not use the -O2 option for all boards per default. Is there such a bug?
romcc crashes, so yes, a bug. Some other board requires quite a specific romcc option, so there are more such special cases. Fixing romcc bugs will be a nice task once the tree settled down a bit.
Index: src/mainboard/bcom/winnetp680/Kconfig
--- src/mainboard/bcom/winnetp680/Kconfig (Revision 0) +++ src/mainboard/bcom/winnetp680/Kconfig (Revision 0)
[...]
+config RAMBASE
- hex
- default 0x4000
- depends on BOARD_BCOM_WINNETP680
This is also something we should look into later. I'd use the new default for RAMBASE whereever possible, unless some boards have problems with that (which we should find out).
I can do some tests on boards which used 0x4000 earlier.
At least those boards with their own vgabios.c (pretty much all via chipsets) must be <1MB due to the way their VGABIOS stuff is implemented. Stefan and I tried to replace that with x86emu (or any of the common vga things), but didn't succeed so far.
Index: src/mainboard/bcom/winnetp680/Makefile.inc
--- src/mainboard/bcom/winnetp680/Makefile.inc (Revision 0) +++ src/mainboard/bcom/winnetp680/Makefile.inc (Revision 0) @@ -0,0 +1,61 @@
[...]
+initobj-y += crt0.o +obj-y += mainboard.o +obj-$(CONFIG_HAVE_PIRQ_TABLE) += irq_tables.o +obj-$(CONFIG_HAVE_MP_TABLE) += mptable.o
+obj-$(CONFIG_HAVE_ACPI_TABLES) += fadt.o +obj-$(CONFIG_HAVE_ACPI_TABLES) += dsdt.o +obj-$(CONFIG_HAVE_ACPI_TABLES) += acpi_tables.o
+ldscript-y += ../../../../src/arch/i386/init/ldscript_fallback_cbfs.lb +ldscript-y += ../../../../src/cpu/x86/16bit/entry16.lds +ldscript-y += ../../../../src/cpu/x86/16bit/reset16.lds +ldscript-y += ../../../../src/arch/i386/lib/id.lds +ldscript-y += ../../../../src/arch/i386/lib/failover.lds
+crt0-y += ../../../../src/cpu/x86/16bit/entry16.inc +crt0-y += ../../../../src/cpu/x86/32bit/entry32.inc +crt0-y += ../../../../src/cpu/x86/16bit/reset16.inc +crt0-y += ../../../../src/arch/i386/lib/id.inc +crt0-y += ../../../../src/cpu/x86/fpu/enable_fpu.inc +crt0-y += ../../../../src/cpu/x86/mmx/enable_mmx.inc +crt0-y += auto.inc +crt0-y += ../../../../src/cpu/x86/mmx/disable_mmx.inc
+ifdef POST_EVALUATION
+$(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/dsdt.c
- $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@
+$(obj)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl
- iasl -p dsdt -tc $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl
- mv dsdt.hex $@
+$(obj)/mainboard/$(MAINBOARDDIR)/auto.inc: $(src)/mainboard/$(MAINBOARDDIR)/auto.c $(obj)/option_table.h
- $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $(src)/mainboard/$(MAINBOARDDIR)/auto.c -o $@
- perl -e 's/.rodata/.rom.data/g' -pi $@
- perl -e 's/.text/.section .rom.text/g' -pi $@
+endif
Long-term this should move into a global file as it's pretty much the same for all boards.
Yes, that's on my TODO for a while. The ACPI related things require some file renaming, which I wanted to wait for until newconfig is gone (no need to waste time on adapting that one, too)
Patrick
Uwe Hermann wrote:
Index: src/mainboard/newisys/khepri/Kconfig
--- src/mainboard/newisys/khepri/Kconfig (Revision 0) +++ src/mainboard/newisys/khepri/Kconfig (Revision 0) @@ -0,0 +1,123 @@ +config BOARD_NEWISYS_KHEPRI
- bool "Khepri"
"2100 Server (SUN Fire v20z)" as per wiki (not sure if "Khepri" is the official vendor name, if yes we should also adapt the wiki table).
The vendor name is Newisys. http://www.amd.com/us-en/assets/content_type/DownloadableAssets/2100-e1.pdf
The company was bought by Sanmina-SCI a couple of years back. I believe they designed the SUN x4100, too.
Stefan
On Fri, Oct 09, 2009 at 02:05:56AM +0200, Stefan Reinauer wrote:
Uwe Hermann wrote:
Index: src/mainboard/newisys/khepri/Kconfig
--- src/mainboard/newisys/khepri/Kconfig (Revision 0) +++ src/mainboard/newisys/khepri/Kconfig (Revision 0) @@ -0,0 +1,123 @@ +config BOARD_NEWISYS_KHEPRI
- bool "Khepri"
"2100 Server (SUN Fire v20z)" as per wiki (not sure if "Khepri" is the official vendor name, if yes we should also adapt the wiki table).
The vendor name is Newisys. http://www.amd.com/us-en/assets/content_type/DownloadableAssets/2100-e1.pdf
Oops, sorry, I meant to say "official board name" not "official vendor name".
Is "2100 Server (SUN Fire v20z)" the full, correct name, or should we change it?
Uwe.
Uwe Hermann wrote:
On Fri, Oct 09, 2009 at 02:05:56AM +0200, Stefan Reinauer wrote:
Uwe Hermann wrote:
Index: src/mainboard/newisys/khepri/Kconfig
--- src/mainboard/newisys/khepri/Kconfig (Revision 0) +++ src/mainboard/newisys/khepri/Kconfig (Revision 0) @@ -0,0 +1,123 @@ +config BOARD_NEWISYS_KHEPRI
- bool "Khepri"
"2100 Server (SUN Fire v20z)" as per wiki (not sure if "Khepri" is the official vendor name, if yes we should also adapt the wiki table).
The vendor name is Newisys. http://www.amd.com/us-en/assets/content_type/DownloadableAssets/2100-e1.pdf
Oops, sorry, I meant to say "official board name" not "official vendor name".
Is "2100 Server (SUN Fire v20z)" the full, correct name, or should we change it?
I think 2100 (Sun Fire v20z) would be enough, but it's also fine as it is..
Patrick Georgi wrote:
+++ src/mainboard/gigabyte/ga_2761gxdk/Kconfig (Revision 0) @@ -0,0 +1,148 @@ +config BOARD_GIGABYTE_GA_2761GXDK
- bool "GA-2761GXDK"
- select ARCH_X86
- select CPU_AMD_K8
- select CPU_AMD_SOCKET_AM2
- select NORTHBRIDGE_AMD_AMDK8
- select NORTHBRIDGE_AMD_AMDK8_ROOT_COMPLEX
- select SOUTHBRIDGE_SIS_SIS966
- select SUPERIO_ITE_IT8716F
..
+config MAX_CPUS
- int
- default 2
- depends on BOARD_GIGABYTE_GA_2761GXDK
+config MAX_PHYSICAL_CPUS
- int
- default 1
- depends on BOARD_GIGABYTE_GA_2761GXDK
Does it make sense to set these CPU options in socket Kconfigs?
+++ src/mainboard/rca/rm4100/Makefile.inc (Revision 0) @@ -0,0 +1,4 @@ +ROMCCFLAGS=-mcpu=p3 -O
..
+++ src/mainboard/iei/nova4899r/Makefile.inc (Arbeitskopie) @@ -18,6 +18,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ##
-ROMCCFLAGS := -mcpu=i386 +ROMCCFLAGS := -mcpu=i386 -O2
The same question for -mcpu in ROMCCFLAGS? Couldn't that also be set in socket Kconfigs?
//Peter