[coreboot] [PATCH]more kconfig

Uwe Hermann uwe at hermann-uwe.de
Wed Oct 7 16:18:02 CEST 2009


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.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org




More information about the coreboot mailing list