source: rtems/c/src/lib/libbsp/i386/pc386/Makefile.am @ f770fcb

Last change on this file since f770fcb was f770fcb, checked in by Joel Sherrill <joel@…>, on Mar 3, 2016 at 4:36:24 PM

Add shared PCI support and enhance pc386 to support non-legacy PCI configuration space

This patch fundamentally results from enhancements to the pc386 BSP
to support systems which do NOT have the legacy PCI BIOS. The
patch adds support for detecting when legacy PCI BIOS is not
present and then using IO space to access to PCI Configuration Space.
This resulted in dynamically selected between two implementations
of PCI and refactoring out the shared methods.

This patch adds shared implementations of pci_bus_count() and
pci_find_device(). Subsequent patches will remove implementations
of these methods in other BSPs where possible.

  • Property mode set to 100644
File size: 7.6 KB
Line 
1##
2##
3
4ACLOCAL_AMFLAGS = -I ../../../../aclocal
5
6# FIXME: We must not include *.cfg
7include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
8
9CLEANFILES =
10
11include $(top_srcdir)/../../../../automake/compile.am
12
13include_bspdir = $(includedir)/bsp
14
15dist_project_lib_DATA = bsp_specs
16
17include_HEADERS = include/bsp.h
18include_HEADERS += include/tm27.h
19
20nodist_include_HEADERS = include/bspopts.h
21nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
22DISTCLEANFILES = include/bspopts.h
23
24noinst_PROGRAMS =
25
26SUBDIRS = . tools
27
28include_bsp_HEADERS  = ../../i386/shared/irq/irq.h
29include_bsp_HEADERS += ../../i386/shared/irq/irq_asm.h
30include_bsp_HEADERS += ../../i386/shared/comm/tty_drv.h
31include_bsp_HEADERS += ../../i386/shared/realmode_int/realmode_int.h
32include_bsp_HEADERS += ../../shared/include/irq-generic.h
33include_bsp_HEADERS += ../../shared/include/irq-info.h
34include_bsp_HEADERS += console/rtd316.h
35include_bsp_HEADERS += console/exar17d15x.h
36include_bsp_HEADERS += include/tblsizes.h
37
38if HAS_SMP
39include_bsp_HEADERS += ../../i386/shared/irq/apic.h
40include_bsp_HEADERS += ../../i386/shared/smp/smp-imps.h
41endif
42
43include_HEADERS += include/crt.h
44nodist_include_HEADERS += ../../shared/include/coverhd.h
45
46noinst_LIBRARIES = libbspstart.a
47libbspstart_a_SOURCES = start/start.S
48project_lib_DATA = start.$(OBJEXT)
49
50EXTRA_DIST = start/start16.S
51start16.$(OBJEXT): start/start16.S
52        $(CPPASCOMPILE) $(AM_CPPFLAGS) -DHEADERADDR=$(HEADERADDR) -o $@ -c $<
53
54start16-elf32.$(OBJEXT): start16.$(OBJEXT)
55        $(LD) -N -T $(top_srcdir)/startup/linkcmds -Ttext $(START16ADDR) -e start16 -nostdlib \
56          --oformat=elf32-i386 \
57        -o $@ $<
58
59start16.bin: start16-elf32.$(OBJEXT)
60        $(OBJCOPY) -O binary $< $@
61CLEANFILES += start16.bin
62
63project_lib_DATA += start16.bin
64
65dist_project_lib_DATA += startup/linkcmds
66
67noinst_LIBRARIES += libbsp.a
68libbsp_a_SOURCES =
69
70# clock
71if RTEMS_EDISON
72libbsp_a_SOURCES += ../../shared/clock_driver_simidle.c
73else
74libbsp_a_SOURCES += clock/ckinit.c
75endif
76libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
77libbsp_a_SOURCES += clock/todcfg.c
78libbsp_a_SOURCES += ../../shared/tod.c
79
80include_rtemsdir = $(includedir)/rtems
81include_rtems_HEADERS  =
82
83if RTEMS_VGA
84include_rtems_HEADERS += console/keyboard.h
85include_rtems_HEADERS += console/kd.h
86include_rtems_HEADERS += console/ps2_drv.h
87include_rtems_HEADERS += console/vgacons.h
88libbsp_a_SOURCES += console/inch.c
89libbsp_a_SOURCES += console/outch.c
90libbsp_a_SOURCES += console/defkeymap.c
91libbsp_a_SOURCES += console/keyboard.c
92libbsp_a_SOURCES += console/pc_keyb.c
93libbsp_a_SOURCES += console/ps2_mouse.c
94libbsp_a_SOURCES += console/vgainit.c
95libbsp_a_SOURCES += console/vt.c
96libbsp_a_SOURCES += console/videoAsm.S
97libbsp_a_SOURCES += console/kbd_parser.c
98libbsp_a_SOURCES += console/vgacons.c
99include_bsp_HEADERS += console/fb_default_mode.h
100if USE_VGA
101libbsp_a_SOURCES += console/fb_vga.c
102endif
103if USE_CIRRUS_GD5446
104libbsp_a_SOURCES += console/fb_cirrus.c
105endif
106if USE_VBE_RM
107include_bsp_HEADERS += include/vbe3.h
108include_HEADERS += include/edid.h
109include_bsp_HEADERS += include/fb_vesa.h
110libbsp_a_SOURCES += console/fb_vesa_rm.c
111endif
112endif
113
114# console (non-graphics support)
115if RTEMS_EDISON
116libbsp_a_SOURCES += console/console_edison.c
117endif
118include_HEADERS += ../../i386/shared/comm/i386_io.h
119include_rtems_HEADERS += ../../shared/console_private.h
120libbsp_a_SOURCES += console/serial_mouse_config.c
121libbsp_a_SOURCES += ../../i386/shared/comm/uart.c
122libbsp_a_SOURCES += ../../i386/shared/comm/tty_drv.c
123libbsp_a_SOURCES += ../../i386/shared/realmode_int/realmode_int.c
124libbsp_a_SOURCES += ../../shared/console.c
125libbsp_a_SOURCES += console/console_select.c
126libbsp_a_SOURCES += ../../shared/console_read.c
127libbsp_a_SOURCES += ../../shared/console_write.c
128libbsp_a_SOURCES += console/console_control.c
129libbsp_a_SOURCES += console/conscfg.c
130libbsp_a_SOURCES += console/printk_support.c
131libbsp_a_SOURCES += console/exar17d15x.c
132libbsp_a_SOURCES += console/rtd316.c
133
134# gdb
135libbsp_a_SOURCES += ../../i386/shared/comm/i386-stub.c
136libbsp_a_SOURCES += ../../i386/shared/comm/i386-stub-glue.c
137libbsp_a_SOURCES += ../../i386/shared/comm/gdb_glue.c
138
139# gnat
140libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
141
142# pci
143libbsp_a_SOURCES += ../../i386/shared/pci/pcibios.c
144libbsp_a_SOURCES += ../../i386/shared/pci/pci_io.c
145libbsp_a_SOURCES += ../../shared/pci/pci_bus_count.c
146libbsp_a_SOURCES += ../../shared/pci/pci_find_device.c
147
148include_HEADERS += ../../i386/shared/comm/uart.h
149# startup
150libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
151libbsp_a_SOURCES += startup/bsp_fatal_halt.c
152libbsp_a_SOURCES += startup/bspgetworkarea.c
153libbsp_a_SOURCES += startup/bspidle.S
154libbsp_a_SOURCES += startup/bspstart.c
155libbsp_a_SOURCES += startup/bspcmdline.c
156libbsp_a_SOURCES += ../../shared/bspclean.c
157libbsp_a_SOURCES += startup/bspreset.c
158libbsp_a_SOURCES += ../../i386/shared/irq/idt.c
159libbsp_a_SOURCES += ../../i386/shared/irq/irq.c
160libbsp_a_SOURCES += ../../i386/shared/irq/irq_init.c
161libbsp_a_SOURCES += ../../shared/bootcard.c
162libbsp_a_SOURCES += ../../shared/sbrk.c
163libbsp_a_SOURCES += startup/ldsegs.S
164libbsp_a_SOURCES += ../../i386/shared/irq/irq_asm.S
165libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c
166libbsp_a_SOURCES += ../../shared/src/irq-generic.c
167libbsp_a_SOURCES += ../../shared/src/irq-legacy.c
168libbsp_a_SOURCES += ../../shared/src/irq-info.c
169libbsp_a_SOURCES += ../../shared/src/irq-shell.c
170libbsp_a_SOURCES += ../../shared/src/irq-server.c
171
172# timer
173libbsp_a_SOURCES += timer/timer.c timer/timerisr.S
174
175if HAS_IDE
176# ide
177libbsp_a_SOURCES += ide/ide.c
178libbsp_a_SOURCES += ide/idecfg.c
179endif
180
181if HAS_SMP
182libbsp_a_SOURCES += ../../i386/shared/smp/getcpuid.c
183libbsp_a_SOURCES += ../../i386/shared/smp/smp-imps.c
184
185project_lib_DATA += appstart.$(OBJEXT)
186appcpustart.$(OBJEXT): start/start16.S
187        $(CPPASCOMPILE) $(AM_CPPFLAGS) -DSMP_SECONDARY_CORE -o $@ -c $<
188
189appstart.$(OBJEXT): appcpustart.$(OBJEXT)
190        $(LD) -N -T $(top_srcdir)/startup/linkcmds \
191            -Ttext 0x70000 -e app_processor_start -nostdlib \
192            -o appstart_tmp.exe $<
193        $(OBJCOPY) -O binary appstart_tmp.exe appstart.bin
194        $(OBJCOPY) -I binary -O elf32-i386 -B i386 appstart.bin $@
195endif
196
197if HAS_NETWORKING
198ne2000_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
199noinst_PROGRAMS += ne2000.rel
200ne2000_rel_SOURCES = ne2000/ne2000.c
201ne2000_rel_CPPFLAGS = $(AM_CPPFLAGS) $(ne2000_CPPFLAGS)
202ne2000_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
203endif
204
205if HAS_NETWORKING
206# This driver needs to be reworked for the BSD stack.
207# We only install wd80x3.h if HAS_NETWORKING was defined
208include_HEADERS += include/wd80x3.h
209
210wd8003_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
211noinst_PROGRAMS += wd8003.rel
212wd8003_rel_SOURCES = wd8003/wd8003.c
213wd8003_rel_SOURCES += include/wd80x3.h
214wd8003_rel_CPPFLAGS = $(AM_CPPFLAGS) $(wd8003_CPPFLAGS)
215wd8003_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
216endif
217
218if HAS_NETWORKING
2193c509_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
220noinst_PROGRAMS += 3c509.rel
2213c509_rel_SOURCES = 3c509/3c509.c
2223c509_rel_SOURCES += 3c509/3c509.h
2233c509_rel_SOURCES += 3c509/elink.c
2243c509_rel_SOURCES += 3c509/elink.h
2253c509_rel_CPPFLAGS = $(AM_CPPFLAGS) $(3c509_CPPFLAGS)
2263c509_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
227endif
228
229libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/cache.rel
230libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/page.rel
231libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/score.rel
232
233if HAS_SMP
234libbsp_a_LIBADD += appstart.$(OBJEXT)
235endif
236
237# We only build the Network library if HAS_NETWORKING was defined
238# dec21140 is supported via libchip
239if HAS_NETWORKING
240libbsp_a_LIBADD += ne2000.rel
241libbsp_a_LIBADD += wd8003.rel
242libbsp_a_LIBADD += 3c509.rel
243endif
244
245EXTRA_DIST += HOWTO
246EXTRA_DIST += README.dec21140
247EXTRA_DIST += STATUS
248EXTRA_DIST += times_i486dx
249EXTRA_DIST += times_p5
250
251include $(srcdir)/preinstall.am
252include $(top_srcdir)/../../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.