Added support for ATM (needed by ueagle-atm), USB ATM, and VISOR USB serial controlle...
[openwrt.git] / target / linux / linux-2.4 / Makefile
1 # $Id$
2 # Linux 2.4 kernel target for the OpenWRT project
3
4 include $(TOPDIR)/rules.mk
5 include ../rules.mk
6
7 KERNEL:=2.4
8 LINUX_VERSION:=2.4.32
9 MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
10 LINUX_KCONFIG:=./config/$(BOARD)
11 LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-2.4-$(BOARD)
12 LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root
13 LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux
14
15 LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/sources/
16 LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2
17 LINUX_SOURCE_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)
18 MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
19 TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/lib/modules/$(LINUX_VERSION)
20 IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
21
22 PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
23 PKG_RELEASE := 2
24
25 KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)_$(ARCH).ipk
26 KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
27
28 KPKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \
29 BOARD="$(BOARD)" \
30 TARGET_DIR="$(LINUX_TARGET_DIR)" \
31 BUILD_DIR="$(LINUX_BUILD_DIR)" \
32 KERNEL_DIR="$(LINUX_SOURCE_DIR)" \
33 LINUX_VERSION="$(LINUX_VERSION)" \
34 KERNEL_RELEASE="$(PKG_RELEASE)"
35
36 include $(LINUX_KCONFIG)
37
38 INSTALL_TARGETS := $(KERNEL_IPKG)
39 TARGETS :=
40
41 ifeq ($(BOARD),brcm)
42 include ./broadcom.mk
43 endif
44
45 ifeq ($(BOARD),x86)
46 include ./x86.mk
47 endif
48
49 ifeq ($(BOARD),ar7)
50 include ./ar7.mk
51 endif
52
53 include ../netfilter.mk
54
55 # Networking
56
57 $(eval $(call KMOD_template,ATM,atm,\
58 $(MODULES_DIR)/kernel/net/atm/atm.o \
59 $(MODULES_DIR)/kernel/net/atm/br2684.o \
60 ,CONFIG_ATM,,50,atm))
61
62 $(eval $(call KMOD_template,GRE,gre,\
63 $(MODULES_DIR)/kernel/net/ipv4/ip_gre.o \
64 ,CONFIG_NET_IPGRE))
65
66 $(eval $(call KMOD_template,IMQ,imq,\
67 $(MODULES_DIR)/kernel/net/*/netfilter/*IMQ*.o \
68 $(MODULES_DIR)/kernel/drivers/net/imq.o \
69 ))
70
71 $(eval $(call KMOD_template,IPV6,ipv6,\
72 $(MODULES_DIR)/kernel/net/ipv6/ipv6.o \
73 ,CONFIG_IPV6,,20,ipv6))
74
75 $(eval $(call KMOD_template,PPP,ppp,\
76 $(MODULES_DIR)/kernel/drivers/net/ppp_async.o \
77 $(MODULES_DIR)/kernel/drivers/net/ppp_generic.o \
78 $(MODULES_DIR)/kernel/drivers/net/slhc.o \
79 $(MODULES_DIR)/kernel/drivers/net/pppox.o \
80 ,CONFIG_PPP))
81
82 $(eval $(call KMOD_template,MPPE,mppe,\
83 $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.o \
84 ,CONFIG_PPP_MPPE_MPPC))
85
86 $(eval $(call KMOD_template,PPPOATM,pppoatm,\
87 $(MODULES_DIR)/kernel/net/atm/pppoatm.o \
88 ,CONFIG_PPPOATM))
89
90 $(eval $(call KMOD_template,PPPOE,pppoe,\
91 $(MODULES_DIR)/kernel/drivers/net/pppoe.o \
92 ,CONFIG_PPPOE))
93
94 ifneq ($(wildcard $(MODULES_DIR)/kernel/net/sched/*.o),)
95 CONFIG_SCHED:=m
96 endif
97 $(eval $(call KMOD_template,SCHED,sched,\
98 $(MODULES_DIR)/kernel/net/sched/*.o \
99 ,CONFIG_SCHED))
100
101 $(eval $(call KMOD_template,TUN,tun,\
102 $(MODULES_DIR)/kernel/drivers/net/tun.o \
103 ,CONFIG_TUN,,20,tun))
104
105 $(eval $(call KMOD_template,RING,ring,\
106 $(MODULES_DIR)/kernel/net/ring/ring.o \
107 ,CONFIG_RING,,20,ring))
108
109
110 # Filtering / Firewalling
111
112 $(eval $(call KMOD_template,ARPTABLES,arptables,\
113 $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.o \
114 ,CONFIG_IP_NF_ARPTABLES))
115
116 $(eval $(call KMOD_template,EBTABLES,ebtables,\
117 $(MODULES_DIR)/kernel/net/bridge/netfilter/*.o \
118 ,CONFIG_BRIDGE_NF_EBTABLES))
119
120 # metapackage for compatibility ...
121 $(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\
122 ,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd))
123
124 $(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\
125 $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
126 ))
127
128 $(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\
129 $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
130 ))
131
132 $(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\
133 $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
134 ))
135
136 $(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\
137 $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
138 ))
139
140 $(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\
141 $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
142 ))
143
144 $(eval $(call KMOD_template,IPT_NAT,ipt-nat,\
145 $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
146 ))
147
148 $(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\
149 $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
150 ,,,40,$(IPT_NAT_EXTRA-m)))
151
152 $(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\
153 $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
154 ))
155
156 $(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\
157 $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
158 ))
159
160 $(eval $(call KMOD_template,IP6TABLES,ip6tables,\
161 $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.o \
162 ,CONFIG_IP6_NF_IPTABLES,kmod-ipv6))
163
164
165 # Block devices
166
167 $(eval $(call KMOD_template,IDE,ide,\
168 $(MODULES_DIR)/kernel/drivers/ide/*.o \
169 $(MODULES_DIR)/kernel/drivers/ide/*/*.o \
170 ,CONFIG_IDE))
171
172 $(eval $(call KMOD_template,LOOP,loop,\
173 $(MODULES_DIR)/kernel/drivers/block/loop.o \
174 ,CONFIG_BLK_DEV_LOOP,,20,loop))
175
176 $(eval $(call KMOD_template,NBD,nbd,\
177 $(MODULES_DIR)/kernel/drivers/block/nbd.o \
178 ,CONFIG_BLK_DEV_NBD,,20,nbd))
179
180
181 # Crypto
182
183 ifneq ($(wildcard $(MODULES_DIR)/kernel/crypto/*.o),)
184 CONFIG_CRYPTO:=m
185 endif
186 $(eval $(call KMOD_template,CRYPTO,crypto,\
187 $(MODULES_DIR)/kernel/crypto/*.o \
188 ,CONFIG_CRYPTO))
189
190
191 # Filesystems
192
193 $(eval $(call KMOD_template,FS_CIFS,fs-cifs,\
194 $(MODULES_DIR)/kernel/fs/cifs/cifs.o \
195 ,CONFIG_CIFS,,30,cifs))
196
197 $(eval $(call KMOD_template,FS_EXT2,fs-ext2,\
198 $(MODULES_DIR)/kernel/fs/ext2/*.o \
199 ,CONFIG_EXT2_FS,,30,ext2))
200
201 $(eval $(call KMOD_template,FS_EXT3,fs-ext3,\
202 $(MODULES_DIR)/kernel/fs/ext3/*.o \
203 $(MODULES_DIR)/kernel/fs/jbd/*.o \
204 ,CONFIG_EXT3_FS,,30,jbd ext3))
205
206 $(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\
207 $(MODULES_DIR)/kernel/fs/hfsplus/*.o \
208 ,CONFIG_HFSPLUS_FS,,30,hfsplus))
209
210 $(eval $(call KMOD_template,FS_NFS,fs-nfs,\
211 $(MODULES_DIR)/kernel/fs/lockd/*.o \
212 $(MODULES_DIR)/kernel/fs/nfs/*.o \
213 $(MODULES_DIR)/kernel/net/sunrpc/*.o \
214 ,CONFIG_NFS_FS,,30,sunrpc lockd nfs))
215
216 $(eval $(call KMOD_template,FS_VFAT,fs-vfat,\
217 $(MODULES_DIR)/kernel/fs/vfat/vfat.o \
218 $(MODULES_DIR)/kernel/fs/fat/fat.o \
219 ,CONFIG_VFAT_FS,,30,fat vfat))
220
221 $(eval $(call KMOD_template,FS_XFS,fs-xfs,\
222 $(MODULES_DIR)/kernel/fs/xfs/*.o \
223 ,CONFIG_XFS_FS,,30,xfs))
224
225
226 # Multimedia
227
228 $(eval $(call KMOD_template,PWC,pwc,\
229 $(MODULES_DIR)/kernel/drivers/usb/pwc.o \
230 ,CONFIG_USB_PWC,kmod-videodev,63,pwc))
231
232 $(eval $(call KMOD_template,SOUNDCORE,soundcore,\
233 $(MODULES_DIR)/kernel/drivers/sound/soundcore.o \
234 ,CONFIG_SOUND,,30,soundcore))
235
236 $(eval $(call KMOD_template,VIDEODEV,videodev,\
237 $(MODULES_DIR)/kernel/drivers/media/video/videodev.o \
238 ,CONFIG_VIDEO_DEV,,62,videodev))
239
240
241 # Network devices
242
243 $(eval $(call KMOD_template,NET_3C59X,net-3c59x,\
244 $(MODULES_DIR)/kernel/drivers/net/3c59x.o \
245 ,CONFIG_VORTEX,,10,3c59x))
246
247 $(eval $(call KMOD_template,NET_8139TOO,net-8139too,\
248 $(MODULES_DIR)/kernel/drivers/net/8139too.o \
249 $(MODULES_DIR)/kernel/drivers/net/mii.o \
250 ,CONFIG_8139TOO,,10,mii 8139too))
251
252 $(eval $(call KMOD_template,NET_AIRO,net-airo,\
253 $(MODULES_DIR)/kernel/drivers/net/wireless/airo.o \
254 ,CONFIG_AIRO,,10,airo))
255
256 $(eval $(call KMOD_template,NET_B44,net-b44,\
257 $(MODULES_DIR)/kernel/drivers/net/b44.o \
258 ,CONFIG_B44,,10,b44))
259
260 $(eval $(call KMOD_template,NET_E100,net-e100,\
261 $(MODULES_DIR)/kernel/drivers/net/e100.o \
262 ,CONFIG_E100,,10,e100))
263
264 $(eval $(call KMOD_template,NET_HERMES,net-hermes,\
265 $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.o \
266 $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.o \
267 ,CONFIG_HERMES,,10,hermes orinoco))
268
269 $(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\
270 $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.o \
271 ,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci))
272
273 $(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\
274 $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.o \
275 ,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx))
276
277 $(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\
278 $(MODULES_DIR)/kernel/drivers/net/natsemi.o \
279 ,CONFIG_NATSEMI,,10,natsemi))
280
281 $(eval $(call KMOD_template,NET_PRISM54,net-prism54,\
282 $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.o \
283 ,CONFIG_PRISM54,,10,prism54))
284
285
286 # PCMCIA/CardBus
287
288 $(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\
289 $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.o \
290 $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.o \
291 $(MODULES_DIR)/kernel/drivers/pcmcia/ds.o \
292 ,CONFIG_PCMCIA,,50,pcmcia_core yenta_socket ds))
293
294 $(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\
295 $(MODULES_DIR)/kernel/drivers/char/pcmcia/serial_cs.o \
296 ,CONFIG_PCMCIA_SERIAL_CS,kmod-pcmcia-core,51,serial_cs))
297
298
299 # USB
300
301 $(eval $(call KMOD_template,USB,usb-core,\
302 $(MODULES_DIR)/kernel/drivers/usb/usbcore.o \
303 ,CONFIG_USB,,50,usbcore))
304
305 $(eval $(call KMOD_template,USB_OHCI,usb-ohci,\
306 $(MODULES_DIR)/kernel/drivers/usb/host/usb-ohci.o \
307 ,CONFIG_USB_OHCI,kmod-usb-core,60,usb-ohci))
308
309 $(eval $(call KMOD_template,USB_UHCI,usb-uhci,\
310 $(MODULES_DIR)/kernel/drivers/usb/host/uhci.o \
311 ,CONFIG_USB_UHCI_ALT,kmod-usb-core,60,uhci))
312
313 $(eval $(call KMOD_template,USB2,usb2,\
314 $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.o \
315 ,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd))
316
317 $(eval $(call KMOD_template,USB_ACM,usb-acm,\
318 $(MODULES_DIR)/kernel/drivers/usb/acm.o \
319 ,CONFIG_USB_ACM))
320
321 $(eval $(call KMOD_template,USB_AUDIO,usb-audio,\
322 $(MODULES_DIR)/kernel/drivers/usb/audio.o \
323 ,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio))
324
325 $(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
326 $(MODULES_DIR)/kernel/drivers/usb/printer.o \
327 ,CONFIG_USB_PRINTER,kmod-usb-core,60,printer))
328
329 $(eval $(call KMOD_template,USB_SERIAL,usb-serial,\
330 $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \
331 ,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial))
332
333 $(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\
334 $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \
335 ,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa))
336
337 $(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\
338 $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \
339 ,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio))
340
341 $(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\
342 $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \
343 ,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232))
344
345 $(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\
346 $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \
347 ,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303))
348
349 $(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\
350 $(MODULES_DIR)/kernel/drivers/usb/serial/visor.o \
351 ,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61,visor))
352
353 $(eval $(call KMOD_template,USB_STORAGE,usb-storage,\
354 $(MODULES_DIR)/kernel/drivers/scsi/*.o \
355 $(MODULES_DIR)/kernel/drivers/usb/storage/*.o \
356 ,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage))
357
358
359 # Misc. devices
360
361 $(eval $(call KMOD_template,AX25,ax25,\
362 $(MODULES_DIR)/kernel/net/ax25/ax25.o \
363 $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \
364 ,CONFIG_AX25,,90,ax25 mkiss))
365
366 $(eval $(call KMOD_template,BLUETOOTH,bluetooth,\
367 $(MODULES_DIR)/kernel/net/bluetooth/*.o \
368 $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/*.o \
369 $(MODULES_DIR)/kernel/drivers/bluetooth/*.o \
370 ,CONFIG_BLUEZ))
371
372 $(eval $(call KMOD_template,SOFTDOG,softdog,\
373 $(MODULES_DIR)/kernel/drivers/char/softdog.o \
374 ,CONFIG_SOFT_WATCHDOG,,95,softdog))
375
376
377 $(TARGETS): $(PACKAGE_DIR)
378
379 $(PACKAGE_DIR):
380 mkdir -p $(PACKAGE_DIR)
381
382 $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
383 -mkdir -p $(LINUX_BUILD_DIR)
384 bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
385 rm -f $(LINUX_DIR)
386 ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
387 touch $(LINUX_DIR)/.unpacked
388
389 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
390 $(PATCH) $(LINUX_DIR) ./patches/generic $(MAKE_TRACE)
391 [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) $(MAKE_TRACE)
392 touch $(LINUX_DIR)/.patched
393
394 $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
395 -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
396 $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
397 $(LINUX_DIR)/Makefile \
398 $(LINUX_DIR)/arch/*/Makefile
399 $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
400 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h $(MAKE_TRACE)
401 touch $(LINUX_DIR)/.configured
402
403 $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
404 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) dep $(MAKE_TRACE)
405 touch $(LINUX_DIR)/.depend_done
406
407 $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done
408 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(MAKE_TRACE)
409
410 $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
411 $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ $(MAKE_TRACE)
412 touch -c $(LINUX_KERNEL)
413
414 $(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE)
415 rm -rf $(LINUX_BUILD_DIR)/modules
416 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) modules $(MAKE_TRACE)
417 $(MAKE) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE)
418 touch $(LINUX_DIR)/.modules_done
419
420 $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
421 mkdir -p $(STAGING_DIR)/include
422 tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
423 tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
424
425 $(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
426 @mkdir -p $(STAMP_DIR)
427 @$(MAKE) $(TARGETS)
428 ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
429 @$(TRACE) target/linux/package
430 $(MAKE) -C $(TOPDIR)/target/linux/package \
431 $(KPKG_MAKEOPTS) \
432 compile
433 touch $@
434
435 $(TARGET_MODULES_DIR):
436 -mkdir -p $(TARGET_MODULES_DIR)
437
438 $(KERNEL_IPKG):
439 rm -rf $(KERNEL_IDIR)
440 mkdir -p $(KERNEL_IDIR)/etc
441 $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) $(ARCH)
442 if [ -f ./config/$(BOARD).modules ]; then \
443 cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
444 fi
445 $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE)
446
447 source: $(DL_DIR)/$(LINUX_SOURCE)
448 prepare: $(LINUX_DIR)/.configured
449 compile:
450 $(MAKE) $(STAMP_DIR)/.linux-compile $(MAKE_TRACE)
451
452 install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
453 rm -rf $(LINUX_BUILD_DIR)/root*
454 cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
455 echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
456 $(MAKE) -C $(TOPDIR)/target/linux/package \
457 $(KPKG_MAKEOPTS) \
458 install
459 @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE)
460
461 mostlyclean:
462 rm -f $(STAMP_DIR)/.linux-compile
463 rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
464 rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
465 $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE_TRACE)
466 rm -f $(LINUX_KERNEL) $(LINUX_IMAGE)
467
468 rebuild:
469 -$(MAKE) mostlyclean
470 if [ -f $(LINUX_KERNEL) ]; then \
471 $(MAKE) clean $(MAKE_TRACE); \
472 fi
473 $(MAKE) compile $(MAKE_TRACE)
474
475 clean:
476 rm -f $(STAMP_DIR)/.linux-compile
477 rm -rf $(LINUX_BUILD_DIR)
478 rm -f $(TARGETS)
This page took 0.077389 seconds and 5 git commands to generate.