Support for the Intel ICH7 southbridge.
[coreboot.git] / src / southbridge / intel / i82801gx / Config.lb
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2008 coresystems GmbH
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 config chip.h
22 driver i82801gx.o
23 driver i82801gx_ac97.o
24 driver i82801gx_ide.o
25 driver i82801gx_lpc.o
26 driver i82801gx_nic.o
27 driver i82801gx_pci.o
28 driver i82801gx_pcie.o
29 driver i82801gx_sata.o
30 driver i82801gx_usb.o
31 driver i82801gx_usb_ehci.o
32
33 object i82801gx_reset.o
34 object i82801gx_watchdog.o
35
36 object i82801gx_smi.o
37 object smmrelocate.S
38
39 makerule smmhandler.o
40         depends "$(TOP)/src/southbridge/intel/i82801gx/smmhandler.S" 
41         action  "@$(CC) -c $(CPU_OPT) $(CPPFLAGS) $(CFLAGS) -o $@ $<"
42 end
43
44 makerule smihandler.o
45         depends "$(TOP)/src/southbridge/intel/i82801gx/smihandler.c" 
46         action  "@$(CC) -c $(CPU_OPT) $(CPPFLAGS) $(CFLAGS) -o $@ $<"
47 end
48
49 makerule smm.o
50         depends "smmhandler.o smihandler.o printk.o vtxprintf.o $(LIBGCC_FILE_NAME)" 
51         action  "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ smmhandler.o smihandler.o printk.o vtxprintf.o $(LIBGCC_FILE_NAME)"
52 end
53
54 makerule smm
55         depends "smm.o $(TOP)/src/southbridge/intel/i82801gx/smm.ld ldoptions" 
56         action  "$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static -o smm.elf -T $(TOP)/src/southbridge/intel/i82801gx/smm.ld smm.o"
57         action  "$(CROSS_COMPILE)nm -n smm.elf | sort > smm.map"
58         action  "$(OBJCOPY) -O binary smm.elf smm"
59 end
60
61 makerule smm_bin.c
62         depends "smm"
63         action "(echo 'unsigned char smm[] = {'; od -vtx1 smm | sed -e 's,^[0-9]* *,,' -e 's:[0-9a-f][0-9a-f] :0x&,:g' -e 's:[0-9a-f][0-9a-f]$$:0x&,:'; echo '}; unsigned int smm_len = '; wc -c smm |awk '{print $$1;}' ; echo ';')  > smm_bin.c"
64 end
65
66 object ./smm_bin.o