Am 25.09.2010 21:30, schrieb Peter Stuge:
Also, what should we call them? This is a brilliant opportunity to rename them - we have: initobj (rename to romstage-src?) obj (rename to ramstage-src?) driver (rename to driver-src?) smmobj (rename to smm-src?)
I like the suggested names. Big improvement!
Okay, that part is done and passed abuild and boot test on kontron/986lcd-m. The build system now requires you to refer to source files in the Makefile.incs, and uses the following variables: - in Makefile.inc: romstage-y ramstage-y driver-y smm-y
- global source lists (with full paths): romstage-srcs ramstage-srcs driver-srcs smm-srcs
- global object lists (with full paths): romstage-objs ramstage-objs driver-objs smm-objs
object file names are mangled similarily: for foo.{c,S,asl,...} it's foo.romstage.o foo.ramstage.o foo.driver.o foo.smm.o
This does away with the somewhat unobvious behaviour of the build system that required users to declare "uart8250.o", while "uart8250.initobj.o" was built. It also gives some more intuitive names for files.
Further improvements to naming and placement of files are possible, as some things are still somewhat non-sensical - mostly, because it was brought over from the old build system without much thought.
I attached a complete patch and three patches to apply on top of each other, signifying various steps in the process, for easier review. I'd want to commit them in one go to avoid having three significantly different build system setups (before, intermediate, after).
20100929-1-rework-buildsystem: complete patch
01-rename-obj-variables.diff: rename obj-y to ramstage-y, etc. but still let them list object files. Rename object files from foo.initobj.o to foo.romstage.o etc. (except ramstage files which are still just foo.o)
02-rename-ramstage-obj-files.diff: rename foo.o (of ramstage variety) to foo.ramstage.o
03-sources-in-make.diff: Use source files in Makefiles instead of object files. This also significantly changes the Makefile.inc parser in the toplevel Makefile.
04-remove-acpi-in-epiam700.diff: via/epia-m700 stubbed out ACPI. Just drop it completely.
With this in place, I'll work next at moving .c-#includes out of romcc romstages by using romstage-srcs instead.
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Patrick