[coreboot] [PATCH]unify mainboard makefiles

Patrick Georgi patrick at georgi-clan.de
Fri Feb 26 23:38:43 CET 2010


after moving crt0s and lscripts away from the mainboards' Makefiles,
those Makefiles are rather simple now, with more opportunities to move
out things.

Attached patch does:
- make HAVE_HARD_RESET match what newconfig did
- introduce BOARD_HAS_HARD_RESET and use it if a board provides
hard_reset in $(MAINBOARDDIR)/reset.c, instead of some chipset component
- move a couple of rules out of the mainboards' Makefiles into
	initobj-y += crt0.o
	obj-y += mainboard.o
	obj-$(CONFIG_GENERATE_MP_TABLE) += mptable.o
	obj-$(CONFIG_GENERATE_PIRQ_TABLE) += irq_tables.o
	obj-$(CONFIG_BOARD_HAS_HARD_RESET) += reset.o
- remove Makefile.incs that are empty (or comment-only) after these
changes, incl. Makefile.romccboard.inc (and references to it)
- Make include not fail if file doesn't exist.

reset.o used to be HAVE_HARD_RESET, but to make this rule more
universal, that new variable had to be introduced.

The rationale for this work is that it unifies the mainboard layout,
which leads to less cargo cult when creating a new board, which we
usually start by copying from a similar one.
It also makes it easier to do global changes, as more common
functionality is in common files.

It's build tested and has no regression vs. current HEAD (ie. the same
two boards fail for the same reason) and is boot tested on kontron/986lcd-m.

Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>

Future work in this area: Move ROMCCFLAGS into Kconfig or global
Makefiles, same for the ACPI related rules. Many more
mainboard-Makefiles can be removed then.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 20100226-2-unify-mainboards
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100226/ce796238/attachment.ksh>

More information about the coreboot mailing list