Add CONFIG_GENERATE_* for tables so that the user can select which tables not
[coreboot.git] / src / mainboard / tyan / s2892 / Config.lb
1 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
2 default CONFIG_XIP_ROM_SIZE = 64 * 1024
3 include /config/nofailovercalculation.lb
4 default CONFIG_ROM_PAYLOAD = 1
5
6 arch i386 end
7
8
9 ##
10 ## Build the objects we have code for in this directory.
11 ##
12
13 driver mainboard.o
14
15 #dir /drivers/ati/ragexl
16
17 #needed by irq_tables and mptable and acpi_tables
18 object get_bus_conf.o
19
20 if CONFIG_GENERATE_MP_TABLE object mptable.o end
21 if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
22 #object reset.o
23
24 if CONFIG_GENERATE_ACPI_TABLES
25         object acpi_tables.o
26         makerule dsdt.c
27                 depends "$(CONFIG_MAINBOARD)/dsdt.dsl"
28                 action  "iasl -p $(CURDIR)/dsdt -tc $(CONFIG_MAINBOARD)/dsdt.dsl"
29                 action  "mv dsdt.hex dsdt.c"
30         end
31         object ./dsdt.o
32         #./ssdt.o is moved to northbridge/amd/amdk8/Config.lb
33         #./fadt.o is moved to southbridge/nvidia/ck804/Config.lb
34 end
35
36 if CONFIG_USE_INIT
37         makerule ./auto.o
38                 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
39                 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
40         end
41 else
42         makerule ./auto.inc
43                 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
44                 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
45                 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
46                 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
47         end
48 end
49
50 ##
51 ## Build our 16 bit and 32 bit coreboot entry code
52 ##
53 if CONFIG_USE_FALLBACK_IMAGE
54         mainboardinit cpu/x86/16bit/entry16.inc
55         ldscript /cpu/x86/16bit/entry16.lds
56 end
57
58 mainboardinit cpu/x86/32bit/entry32.inc
59
60         if CONFIG_USE_INIT
61                 ldscript /cpu/x86/32bit/entry32.lds
62         end
63
64         if CONFIG_USE_INIT
65                 ldscript /cpu/amd/car/cache_as_ram.lds
66         end
67
68 ##
69 ## Build our reset vector (This is where coreboot is entered)
70 ##
71 if CONFIG_USE_FALLBACK_IMAGE
72         mainboardinit cpu/x86/16bit/reset16.inc
73         ldscript /cpu/x86/16bit/reset16.lds
74 else
75         mainboardinit cpu/x86/32bit/reset32.inc
76         ldscript /cpu/x86/32bit/reset32.lds
77 end
78
79 ##
80 ## Include an id string (For safe flashing)
81 ##
82 mainboardinit southbridge/nvidia/ck804/id.inc
83 ldscript /southbridge/nvidia/ck804/id.lds
84
85 ##
86 ## ROMSTRAP table for CK804
87 ##
88 if CONFIG_USE_FALLBACK_IMAGE
89         mainboardinit southbridge/nvidia/ck804/romstrap.inc
90         ldscript /southbridge/nvidia/ck804/romstrap.lds
91 end
92
93         ##
94         ## Setup Cache-As-Ram
95         ##
96         mainboardinit cpu/amd/car/cache_as_ram.inc
97
98 ###
99 ### This is the early phase of coreboot startup
100 ### Things are delicate and we test to see if we should
101 ### failover to another image.
102 ###
103 if CONFIG_USE_FALLBACK_IMAGE
104                 ldscript /arch/i386/lib/failover.lds
105 end
106
107 ###
108 ### O.k. We aren't just an intermediary anymore!
109 ###
110
111 ##
112 ## Setup RAM
113 ##
114         if CONFIG_USE_INIT
115                 initobject auto.o
116         else
117                 mainboardinit ./auto.inc
118         end
119
120 ##
121 ## Include the secondary Configuration files
122 ##
123 config chip.h
124
125 include devicetree.cb