source: rtems-libbsd/Makefile.todo @ 81fc57d

5-freebsd-12
Last change on this file since 81fc57d was 7c68f4e, checked in by Sichen Zhao <1473996754@…>, on Nov 8, 2017 at 1:43:32 PM

Port BBB sd driver files to RTEMS.

So BBB can mount and read eMMC and SD card.

  • Property mode set to 100644
File size: 8.2 KB
Line 
1LOCAL_INC = rtemsbsd/include/rtems/bsd/local
2
3LOCAL_SRC = rtemsbsd/local
4
5FREEBSD_SRC = freebsd-org
6
7TOOLS = freebsd-org/sys/tools
8
9GENERATED =
10GENERATED += $(LOCAL_INC)/usb_if.h
11GENERATED += $(LOCAL_SRC)/usb_if.c
12GENERATED += $(LOCAL_INC)/bus_if.h
13GENERATED += $(LOCAL_SRC)/bus_if.c
14GENERATED += $(LOCAL_INC)/device_if.h
15GENERATED += $(LOCAL_SRC)/device_if.c
16GENERATED += $(LOCAL_INC)/usbdevs_data.h
17GENERATED += $(LOCAL_INC)/usbdevs.h
18GENERATED += $(LOCAL_INC)/ifdi_if.h
19GENERATED += $(LOCAL_SRC)/ifdi_if.c
20GENERATED += $(LOCAL_INC)/miibus_if.h
21GENERATED += $(LOCAL_SRC)/miibus_if.c
22GENERATED += $(LOCAL_INC)/miidevs.h
23GENERATED += $(LOCAL_INC)/ofw_if.h
24GENERATED += $(LOCAL_SRC)/ofw_if.c
25GENERATED += $(LOCAL_INC)/ofw_bus_if.h
26GENERATED += $(LOCAL_SRC)/ofw_bus_if.c
27GENERATED += $(LOCAL_INC)/pci_if.h
28GENERATED += $(LOCAL_SRC)/pci_if.c
29GENERATED += $(LOCAL_INC)/pcib_if.h
30GENERATED += $(LOCAL_SRC)/pcib_if.c
31GENERATED += $(LOCAL_INC)/mmcbr_if.h
32GENERATED += $(LOCAL_SRC)/mmcbr_if.c
33GENERATED += $(LOCAL_INC)/mmcbus_if.h
34GENERATED += $(LOCAL_SRC)/mmcbus_if.c
35GENERATED += $(LOCAL_SRC)/rtwn-rtl8192cfwT.c
36GENERATED += $(LOCAL_SRC)/rtwn-rtl8188eufw.c
37GENERATED += $(LOCAL_SRC)/runfw.c
38GENERATED += $(LOCAL_INC)/sdhci_if.h
39GENERATED += $(LOCAL_SRC)/sdhci_if.c
40GENERATED += $(LOCAL_INC)/gpiobus_if.h
41GENERATED += $(LOCAL_SRC)/gpiobus_if.c
42GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h
43GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c
44GENERATED += freebsd/contrib/libpcap/grammar.h
45GENERATED += freebsd/contrib/libpcap/grammar.c
46GENERATED += freebsd/contrib/libpcap/pcap_version.h
47GENERATED += freebsd/contrib/libpcap/scanner.h
48GENERATED += freebsd/contrib/libpcap/scanner.c
49
50all: $(GENERATED)
51
52$(LOCAL_INC)/usbdevs.h: $(FREEBSD_SRC)/sys/dev/usb/usbdevs
53        awk -f $(TOOLS)/usbdevs2h.awk $< -h
54        mv usbdevs.h $@
55
56$(LOCAL_INC)/usbdevs_data.h: $(FREEBSD_SRC)/sys/dev/usb/usbdevs
57        awk -f $(TOOLS)/usbdevs2h.awk $< -d
58        mv usbdevs_data.h $@
59
60$(LOCAL_INC)/usb_if.h: $(FREEBSD_SRC)/sys/dev/usb/usb_if.m
61        awk -f $(TOOLS)/makeobjops.awk $< -h
62        mv usb_if.h $@
63
64$(LOCAL_SRC)/usb_if.c: $(FREEBSD_SRC)/sys/dev/usb/usb_if.m
65        awk -f $(TOOLS)/makeobjops.awk $< -c
66        mv usb_if.c $@
67
68$(LOCAL_INC)/bus_if.h: $(FREEBSD_SRC)/sys/kern/bus_if.m
69        awk -f $(TOOLS)/makeobjops.awk $< -h
70        mv bus_if.h $@
71
72$(LOCAL_SRC)/bus_if.c: $(FREEBSD_SRC)/sys/kern/bus_if.m
73        awk -f $(TOOLS)/makeobjops.awk $< -c
74        mv bus_if.c $@
75
76$(LOCAL_INC)/device_if.h: $(FREEBSD_SRC)/sys/kern/device_if.m
77        awk -f $(TOOLS)/makeobjops.awk $< -h
78        mv device_if.h $@
79
80$(LOCAL_SRC)/device_if.c: $(FREEBSD_SRC)/sys/kern/device_if.m
81        awk -f $(TOOLS)/makeobjops.awk $< -c
82        mv device_if.c $@
83
84$(LOCAL_INC)/ifdi_if.h: $(FREEBSD_SRC)/sys/net/ifdi_if.m
85        awk -f $(TOOLS)/makeobjops.awk $< -h
86        mv ifdi_if.h $@
87
88$(LOCAL_SRC)/ifdi_if.c: $(FREEBSD_SRC)/sys/net/ifdi_if.m
89        awk -f $(TOOLS)/makeobjops.awk $< -c
90        mv ifdi_if.c $@
91
92$(LOCAL_INC)/miidevs.h: $(FREEBSD_SRC)/sys/dev/mii/miidevs
93        awk -f $(TOOLS)/miidevs2h.awk $<
94        mv miidevs.h $@
95
96$(LOCAL_INC)/miibus_if.h: $(FREEBSD_SRC)/sys/dev/mii/miibus_if.m
97        awk -f $(TOOLS)/makeobjops.awk $< -h
98        mv miibus_if.h $@
99
100$(LOCAL_SRC)/miibus_if.c: $(FREEBSD_SRC)/sys/dev/mii/miibus_if.m
101        awk -f $(TOOLS)/makeobjops.awk $< -c
102        mv miibus_if.c $@
103
104$(LOCAL_INC)/pci_if.h: $(FREEBSD_SRC)/sys/dev/pci/pci_if.m
105        awk -f $(TOOLS)/makeobjops.awk $< -h
106        mv pci_if.h $@
107
108$(LOCAL_SRC)/pci_if.c: $(FREEBSD_SRC)/sys/dev/pci/pci_if.m
109        awk -f $(TOOLS)/makeobjops.awk $< -c
110        mv pci_if.c $@
111
112$(LOCAL_INC)/pcib_if.h: $(FREEBSD_SRC)/sys/dev/pci/pcib_if.m
113        awk -f $(TOOLS)/makeobjops.awk $< -h
114        mv pcib_if.h $@
115
116$(LOCAL_SRC)/pcib_if.c: $(FREEBSD_SRC)/sys/dev/pci/pcib_if.m
117        awk -f $(TOOLS)/makeobjops.awk $< -c
118        mv pcib_if.c $@
119
120$(LOCAL_INC)/mmcbus_if.h: $(FREEBSD_SRC)/sys/dev/mmc/mmcbus_if.m
121        awk -f $(TOOLS)/makeobjops.awk $< -h
122        mv mmcbus_if.h $@
123
124$(LOCAL_SRC)/mmcbus_if.c: $(FREEBSD_SRC)/sys/dev/mmc/mmcbus_if.m
125        awk -f $(TOOLS)/makeobjops.awk $< -c
126        mv mmcbus_if.c $@
127
128$(LOCAL_INC)/mmcbr_if.h: $(FREEBSD_SRC)/sys/dev/mmc/mmcbr_if.m
129        awk -f $(TOOLS)/makeobjops.awk $< -h
130        mv mmcbr_if.h $@
131
132$(LOCAL_SRC)/mmcbr_if.c: $(FREEBSD_SRC)/sys/dev/mmc/mmcbr_if.m
133        awk -f $(TOOLS)/makeobjops.awk $< -c
134        mv mmcbr_if.c $@
135
136$(LOCAL_INC)/ofw_if.h: $(FREEBSD_SRC)/sys/dev/ofw/ofw_if.m
137        awk -f $(TOOLS)/makeobjops.awk $< -h
138        mv ofw_if.h $@
139
140$(LOCAL_SRC)/ofw_if.c: $(FREEBSD_SRC)/sys/dev/ofw/ofw_if.m
141        awk -f $(TOOLS)/makeobjops.awk $< -c
142        mv ofw_if.c $@
143
144$(LOCAL_INC)/ofw_bus_if.h: $(FREEBSD_SRC)/sys/dev/ofw/ofw_bus_if.m
145        awk -f $(TOOLS)/makeobjops.awk $< -h
146        mv ofw_bus_if.h $@
147
148$(LOCAL_SRC)/ofw_bus_if.c: $(FREEBSD_SRC)/sys/dev/ofw/ofw_bus_if.m
149        awk -f $(TOOLS)/makeobjops.awk $< -c
150        mv ofw_bus_if.c $@
151
152$(LOCAL_INC)/if_dwc_if.h: $(FREEBSD_SRC)/sys/dev/dwc/if_dwc_if.m
153        awk -f $(TOOLS)/makeobjops.awk $< -h
154        mv if_dwc_if.h $@
155
156$(LOCAL_SRC)/if_dwc_if.c: $(FREEBSD_SRC)/sys/dev/dwc/if_dwc_if.m
157        awk -f $(TOOLS)/makeobjops.awk $< -c
158        mv if_dwc_if.c $@
159
160$(LOCAL_INC)/gpio_if.h: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m
161        awk -f $(TOOLS)/makeobjops.awk $< -h
162        mv gpio_if.h $@
163
164$(LOCAL_INC)/gpiobus_if.h: $(FREEBSD_SRC)/sys/dev/gpio/gpiobus_if.m
165        awk -f $(TOOLS)/makeobjops.awk $< -h
166        mv gpiobus_if.h $@
167
168$(LOCAL_SRC)/gpiobus_if.c: $(FREEBSD_SRC)/sys/dev/gpio/gpiobus_if.m
169        awk -f $(TOOLS)/makeobjops.awk $< -c
170        sed -i gpiobus_if.c \
171            -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \
172            -e 's|#include "gpiobus_if.h"|#include <rtems/bsd/local/gpiobus_if.h>|'
173        mv gpiobus_if.c $@
174
175$(LOCAL_INC)/sdhci_if.h: $(FREEBSD_SRC)/sys/dev/sdhci/sdhci_if.m
176        awk -f $(TOOLS)/makeobjops.awk $< -h
177        mv sdhci_if.h $@
178
179$(LOCAL_SRC)/sdhci_if.c: $(FREEBSD_SRC)/sys/dev/sdhci/sdhci_if.m
180        awk -f $(TOOLS)/makeobjops.awk $< -c
181        sed -i sdhci_if.c \
182            -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \
183            -e 's|#include "sdhci_if.h"|#include <rtems/bsd/local/sdhci_if.h>|'
184        mv sdhci_if.c $@
185
186$(LOCAL_SRC)/gpio_if.c: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m
187        awk -f $(TOOLS)/makeobjops.awk $< -c
188        mv gpio_if.c $@
189
190$(LOCAL_SRC)/rtwn-rtl8192cfwT.c: $(FREEBSD_SRC)/sys/contrib/dev/rtwn/rtwn-rtl8192cfwT.fw.uu
191        uudecode -o /dev/stdout $< | python firmware-gen.py \
192            -l "$(FREEBSD_SRC)/sys/contrib/dev/rtwn/LICENSE" \
193            rtwn-rtl8192cfwT - $@
194
195$(LOCAL_SRC)/rtwn-rtl8188eufw.c: $(FREEBSD_SRC)/sys/contrib/dev/rtwn/rtwn-rtl8188eufw.fw.uu
196        uudecode -o /dev/stdout $< | python firmware-gen.py \
197            -l "$(FREEBSD_SRC)/sys/contrib/dev/rtwn/LICENSE" \
198            rtwn-rtl8188eufw - $@
199
200$(LOCAL_SRC)/runfw.c: $(FREEBSD_SRC)/sys/contrib/dev/run/rt2870.fw.uu
201        uudecode -o /dev/stdout $< | python firmware-gen.py \
202            -l "$(FREEBSD_SRC)/sys/contrib/dev/run/LICENSE" \
203            runfw - $@
204
205freebsd/usr.bin/netstat/nl_symbols.c: $(FREEBSD_SRC)/usr.bin/netstat/nlist_symbols
206        awk '\
207            BEGIN { \
208                print "#include <sys/param.h>"; \
209                print "#include <nlist.h>"; \
210                print "const struct nlist nl[] = {"; \
211            } \
212            !/^\#/ { printf("\t{ .n_name = \"%s\" },\n", $$2); } \
213            END { print "\t{ .n_name = NULL },\n};" } \
214            ' < $< > $@ || rm -f $@
215
216freebsd/usr.bin/netstat/nl_defs.h: $(FREEBSD_SRC)/usr.bin/netstat/nlist_symbols
217        awk '\
218            BEGIN { \
219                print "#include <nlist.h>"; \
220                print "extern const struct nlist nl[];"; \
221                i = 0; \
222            } \
223            !/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
224            < $< > $@ || rm -f $@
225
226rtemsbsd/include/machine/rtems-bsd-regdomain.h: $(FREEBSD_SRC)/etc/regdomain.xml
227        rtems-bin2c -H $< $@
228
229rtemsbsd/rtems/rtems-bsd-regdomain.c: $(FREEBSD_SRC)/etc/regdomain.xml
230        rtems-bin2c -C $< $@
231
232freebsd/contrib/libpcap/grammar.h: freebsd/contrib/libpcap/grammar.c
233
234freebsd/contrib/libpcap/grammar.c: freebsd-org/contrib/libpcap/grammar.y
235        cd freebsd-org/contrib/libpcap && yacc -p pcap_ -o grammar.c -d grammar.y
236        mv freebsd-org/contrib/libpcap/grammar.h freebsd/contrib/libpcap/grammar.h
237        mv freebsd-org/contrib/libpcap/grammar.c $@
238
239freebsd/contrib/libpcap/pcap_version.h: freebsd-org/contrib/libpcap/VERSION
240        freebsd-org/contrib/libpcap/gen_version_header.sh $< freebsd-org/contrib/libpcap/pcap_version.h.in $@
241
242freebsd/contrib/libpcap/scanner.h: freebsd/contrib/libpcap/scanner.c
243
244freebsd/contrib/libpcap/scanner.c: freebsd-org/contrib/libpcap/scanner.l
245        cd freebsd-org/contrib/libpcap && lex -P pcap_ --header-file=scanner.h --nounput -o scanner.c scanner.l
246        mv freebsd-org/contrib/libpcap/scanner.h freebsd/contrib/libpcap/scanner.h
247        mv freebsd-org/contrib/libpcap/scanner.c $@
248
249clean:
250        rm $(GENERATED)
Note: See TracBrowser for help on using the repository browser.