mainboard sub-type support
Ronald G. Minnich
rminnich at lanl.gov
Mon Feb 3 19:10:01 CET 2003
We have a mainboard called the p4dpe-g2. It seems to be almost identical
to the p4dpe.
I was faced with several options:
- have a directory named p4dpe and a directory p4dpe-g2, with
almost identical files
- Have a directory for the p4dpe, with #ifdef G2 in many files
- an interesting trick that works:
have a directory p4dpe, and a directory p4dpe/g2
Populate p4dpe/g2 with the files:
cmos.layout, Config, mainboard.c, irq_tables.c, and mptable.c
in other words, the files that will change with mainboard revs
This last option works. The only change to the config file to build a -g2
motherboard is to change the line:
Now this is kind of interesting. For a vendor like supermicro that spins
lots of boards that are very similar, we can take this further: have
for the p4dpr
for the p4dpe. These are similar boards, lots of shared code, and this
structure shows that.
Comments? is this good, bad, or indifferent?
More information about the coreboot