Am Samstag, den 08.05.2010, 10:25 +0200 schrieb Stefan Reinauer:
On 5/8/10 12:13 AM, Patrick Georgi wrote:
-#initobj-y += serial.o +initobj-$(CONFIG_USE_DCACHE_RAM) += serial.o subdirs-y += vga
Awesome... the less .c file includes we have in romstage.c the better..
This way works in the case of converting code that was previously always compiled in.
But how should we handle things in case of other conditions?
We could stuff all of the initobjs into an initobj.a, and use that for linking. ld will only pick up the object files that are actually needed then. This means we probably compile a serial port thingy too many, but they're rather small.
For chipset specific stuff (once we get there), it can be initobj-$(CONFIG_SOUTHBRIDGE_X_Y) += ...
Patrick