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