backport netfilter modules split introduced by changeset:2083 in whiterussian (fix...
[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.30
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
106 # Filtering / Firewalling
107
108 $(eval $(call KMOD_template,ARPTABLES,arptables,\
109 $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.o \
110 ,CONFIG_IP_NF_ARPTABLES))
111
112 $(eval $(call KMOD_template,EBTABLES,ebtables,\
113 $(MODULES_DIR)/kernel/net/bridge/netfilter/*.o \
114 ,CONFIG_BRIDGE_NF_EBTABLES))
115
116 # metapackage for compatibility ...
117 $(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\
118 ,,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))
119
120 $(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\
121 $(foreach mod,$(IPKG_KMOD_IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
122 ))
123
124 $(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\
125 $(foreach mod,$(IPKG_KMOD_IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
126 ))
127
128 $(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\
129 $(foreach mod,$(IPKG_KMOD_IPT_FILTER-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
130 ))
131
132 $(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\
133 $(foreach mod,$(IPKG_KMOD_IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
134 ))
135
136 $(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\
137 $(foreach mod,$(IPKG_KMOD_IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
138 ))
139
140 $(eval $(call KMOD_template,IPT_NAT,ipt-nat,\
141 $(foreach mod,$(IPKG_KMOD_IPT_NAT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
142 ))
143
144 $(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\
145 $(foreach mod,$(IPKG_KMOD_IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
146 ,,,40,$(IPKG_KMOD_IPT_NAT_EXTRA-m)))
147
148 $(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\
149 $(foreach mod,$(IPKG_KMOD_IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
150 ))
151
152 $(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\
153 $(foreach mod,$(IPKG_KMOD_IPT_ULOG-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \
154 ))
155
156 $(eval $(call KMOD_template,IP6TABLES,ip6tables,\
157 $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.o \
158 ,CONFIG_IP6_NF_IPTABLES,kmod-ipv6))
159
160
161 # Block devices
162
163 $(eval $(call KMOD_template,IDE,ide,\
164 $(MODULES_DIR)/kernel/drivers/ide/*.o \
165 $(MODULES_DIR)/kernel/drivers/ide/*/*.o \
166 ,CONFIG_IDE))
167
168 $(eval $(call KMOD_template,LOOP,loop,\
169 $(MODULES_DIR)/kernel/drivers/block/loop.o \
170 ,CONFIG_BLK_DEV_LOOP,,20,loop))
171
172 $(eval $(call KMOD_template,NBD,nbd,\
173 $(MODULES_DIR)/kernel/drivers/block/nbd.o \
174 ,CONFIG_BLK_DEV_NBD,,20,nbd))
175
176
177 # Crypto
178
179 ifneq ($(wildcard $(MODULES_DIR)/kernel/crypto/*.o),)
180 CONFIG_CRYPTO:=m
181 endif
182 $(eval $(call KMOD_template,CRYPTO,crypto,\
183 $(MODULES_DIR)/kernel/crypto/*.o \
184 ,CONFIG_CRYPTO))
185
186
187 # Filesystems
188
189 $(eval $(call KMOD_template,FS_CIFS,fs-cifs,\
190 $(MODULES_DIR)/kernel/fs/cifs/cifs.o \
191 ,CONFIG_CIFS,,30,cifs))
192
193 $(eval $(call KMOD_template,FS_EXT2,fs-ext2,\
194 $(MODULES_DIR)/kernel/fs/ext2/*.o \
195 ,CONFIG_EXT2_FS,,30,ext2))
196
197 $(eval $(call KMOD_template,FS_EXT3,fs-ext3,\
198 $(MODULES_DIR)/kernel/fs/ext3/*.o \
199 $(MODULES_DIR)/kernel/fs/jbd/*.o \
200 ,CONFIG_EXT3_FS,,30,jbd ext3))
201
202 $(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\
203 $(MODULES_DIR)/kernel/fs/hfsplus/*.o \
204 ,CONFIG_HFSPLUS_FS,,30,hfsplus))
205
206 $(eval $(call KMOD_template,FS_NFS,fs-nfs,\
207 $(MODULES_DIR)/kernel/fs/lockd/*.o \
208 $(MODULES_DIR)/kernel/fs/nfs/*.o \
209 $(MODULES_DIR)/kernel/net/sunrpc/*.o \
210 ,CONFIG_NFS_FS,,30,sunrpc lockd nfs))
211
212 $(eval $(call KMOD_template,FS_VFAT,fs-vfat,\
213 $(MODULES_DIR)/kernel/fs/vfat/vfat.o \
214 $(MODULES_DIR)/kernel/fs/fat/fat.o \
215 ,CONFIG_VFAT_FS,,30,fat vfat))
216
217 $(eval $(call KMOD_template,FS_XFS,fs-xfs,\
218 $(MODULES_DIR)/kernel/fs/xfs/*.o \
219 ,CONFIG_XFS_FS,,30,xfs))
220
221
222 # Multimedia
223
224 $(eval $(call KMOD_template,PWC,pwc,\
225 $(MODULES_DIR)/kernel/drivers/usb/pwc.o \
226 ,CONFIG_USB_PWC,kmod-videodev,63,pwc))
227
228 $(eval $(call KMOD_template,SOUNDCORE,soundcore,\
229 $(MODULES_DIR)/kernel/drivers/sound/soundcore.o \
230 ,CONFIG_SOUND,,30,soundcore))
231
232 $(eval $(call KMOD_template,VIDEODEV,videodev,\
233 $(MODULES_DIR)/kernel/drivers/media/video/videodev.o \
234 ,CONFIG_VIDEO_DEV,,62,videodev))
235
236
237 # Network devices
238
239 $(eval $(call KMOD_template,NET_3C59X,net-3c59x,\
240 $(MODULES_DIR)/kernel/drivers/net/3c59x.o \
241 ,CONFIG_VORTEX,,10,3c59x))
242
243 $(eval $(call KMOD_template,NET_8139TOO,net-8139too,\
244 $(MODULES_DIR)/kernel/drivers/net/8139too.o \
245 $(MODULES_DIR)/kernel/drivers/net/mii.o \
246 ,CONFIG_8139TOO,,10,mii 8139too))
247
248 $(eval $(call KMOD_template,NET_AIRO,net-airo,\
249 $(MODULES_DIR)/kernel/drivers/net/wireless/airo.o \
250 ,CONFIG_AIRO,,10,airo))
251
252 $(eval $(call KMOD_template,NET_B44,net-b44,\
253 $(MODULES_DIR)/kernel/drivers/net/b44.o \
254 ,CONFIG_B44,,10,b44))
255
256 $(eval $(call KMOD_template,NET_E100,net-e100,\
257 $(MODULES_DIR)/kernel/drivers/net/e100.o \
258 ,CONFIG_E100,,10,e100))
259
260 $(eval $(call KMOD_template,NET_HERMES,net-hermes,\
261 $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.o \
262 $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.o \
263 ,CONFIG_HERMES,,10,hermes orinoco))
264
265 $(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\
266 $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.o \
267 ,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci))
268
269 $(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\
270 $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.o \
271 ,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx))
272
273 $(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\
274 $(MODULES_DIR)/kernel/drivers/net/natsemi.o \
275 ,CONFIG_NATSEMI,,10,natsemi))
276
277 $(eval $(call KMOD_template,NET_PRISM54,net-prism54,\
278 $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.o \
279 ,CONFIG_PRISM54,,10,prism54))
280
281
282 # PCMCIA/CardBus
283
284 $(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\
285 $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.o \
286 $(MODULES_DIR)/kernel/drivers/pcmcia/ds.o \
287 $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.o \
288 ,CONFIG_PCMCIA,,50,pcmcia_core))
289
290
291 # USB
292
293 $(eval $(call KMOD_template,USB,usb-core,\
294 $(MODULES_DIR)/kernel/drivers/usb/usbcore.o \
295 ,CONFIG_USB,,50,usbcore))
296
297 $(eval $(call KMOD_template,USB_OHCI,usb-ohci,\
298 $(MODULES_DIR)/kernel/drivers/usb/host/usb-ohci.o \
299 ,CONFIG_USB_OHCI,kmod-usb-core,60,usb-ohci))
300
301 $(eval $(call KMOD_template,USB_UHCI,usb-uhci,\
302 $(MODULES_DIR)/kernel/drivers/usb/host/uhci.o \
303 ,CONFIG_USB_UHCI_ALT,kmod-usb-core,60,uhci))
304
305 $(eval $(call KMOD_template,USB2,usb2,\
306 $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.o \
307 ,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd))
308
309 $(eval $(call KMOD_template,USB_ACM,usb-acm,\
310 $(MODULES_DIR)/kernel/drivers/usb/acm.o \
311 ,CONFIG_USB_ACM))
312
313 $(eval $(call KMOD_template,USB_AUDIO,usb-audio,\
314 $(MODULES_DIR)/kernel/drivers/usb/audio.o \
315 ,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio))
316
317 $(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
318 $(MODULES_DIR)/kernel/drivers/usb/printer.o \
319 ,CONFIG_USB_PRINTER,kmod-usb-core,60,printer))
320
321 $(eval $(call KMOD_template,USB_SERIAL,usb-serial,\
322 $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \
323 ,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial))
324
325 $(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\
326 $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \
327 ,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa))
328
329 $(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\
330 $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \
331 ,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio))
332
333 $(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\
334 $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \
335 ,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232))
336
337 $(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\
338 $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \
339 ,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303))
340
341 $(eval $(call KMOD_template,USB_STORAGE,usb-storage,\
342 $(MODULES_DIR)/kernel/drivers/scsi/*.o \
343 $(MODULES_DIR)/kernel/drivers/usb/storage/*.o \
344 ,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage))
345
346
347 # Misc. devices
348
349 $(eval $(call KMOD_template,AX25,ax25,\
350 $(MODULES_DIR)/kernel/net/ax25/ax25.o \
351 $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \
352 ,CONFIG_AX25,,90,ax25 mkiss))
353
354 $(eval $(call KMOD_template,BLUETOOTH,bluetooth,\
355 $(MODULES_DIR)/kernel/net/bluetooth/*.o \
356 $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/*.o \
357 $(MODULES_DIR)/kernel/drivers/bluetooth/*.o \
358 ,CONFIG_BLUEZ))
359
360
361 $(TARGETS): $(PACKAGE_DIR)
362
363 $(PACKAGE_DIR):
364 mkdir -p $(PACKAGE_DIR)
365
366 $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
367 -mkdir -p $(LINUX_BUILD_DIR)
368 bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
369 rm -f $(LINUX_DIR)
370 ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
371 touch $(LINUX_DIR)/.unpacked
372
373 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
374 $(PATCH) $(LINUX_DIR) ./patches/generic $(MAKE_TRACE)
375 [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) $(MAKE_TRACE)
376 touch $(LINUX_DIR)/.patched
377
378 $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
379 -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
380 $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
381 $(LINUX_DIR)/Makefile \
382 $(LINUX_DIR)/arch/*/Makefile
383 $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
384 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h $(MAKE_TRACE)
385 touch $(LINUX_DIR)/.configured
386
387 $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
388 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) dep $(MAKE_TRACE)
389 touch $(LINUX_DIR)/.depend_done
390
391 $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done
392 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(MAKE_TRACE)
393
394 $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
395 $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ $(MAKE_TRACE)
396 touch -c $(LINUX_KERNEL)
397
398 $(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE)
399 rm -rf $(LINUX_BUILD_DIR)/modules
400 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) modules $(MAKE_TRACE)
401 $(MAKE) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE)
402 touch $(LINUX_DIR)/.modules_done
403
404 $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
405 mkdir -p $(STAGING_DIR)/include
406 tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
407 tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
408
409 $(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
410 @mkdir -p $(STAMP_DIR)
411 @$(MAKE) $(TARGETS)
412 ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
413 @$(TRACE) target/linux/package
414 $(MAKE) -C $(TOPDIR)/target/linux/package \
415 $(KPKG_MAKEOPTS) \
416 compile
417 touch $@
418
419 $(TARGET_MODULES_DIR):
420 -mkdir -p $(TARGET_MODULES_DIR)
421
422 $(KERNEL_IPKG):
423 rm -rf $(KERNEL_IDIR)
424 mkdir -p $(KERNEL_IDIR)/etc
425 $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(PKG_RELEASE) $(ARCH)
426 echo 'Package: kernel-$(LINUX_VERSION)-$(BOARD)' >> $(KERNEL_IDIR)/CONTROL/control
427 if [ -f ./config/$(BOARD).modules ]; then \
428 cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
429 fi
430 $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE)
431
432 source: $(DL_DIR)/$(LINUX_SOURCE)
433 prepare: $(LINUX_DIR)/.configured
434 compile:
435 $(MAKE) $(STAMP_DIR)/.linux-compile $(MAKE_TRACE)
436
437 install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
438 rm -rf $(LINUX_BUILD_DIR)/root*
439 cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
440 echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
441 $(MAKE) -C $(TOPDIR)/target/linux/package \
442 $(KPKG_MAKEOPTS) \
443 install
444 @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE)
445
446 mostlyclean:
447 rm -f $(STAMP_DIR)/.linux-compile
448 rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
449 rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
450 $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE_TRACE)
451 rm -f $(LINUX_KERNEL) $(LINUX_IMAGE)
452
453 rebuild:
454 -$(MAKE) mostlyclean
455 if [ -f $(LINUX_KERNEL) ]; then \
456 $(MAKE) clean $(MAKE_TRACE); \
457 fi
458 $(MAKE) compile $(MAKE_TRACE)
459
460 clean:
461 rm -f $(STAMP_DIR)/.linux-compile
462 rm -rf $(LINUX_BUILD_DIR)
463 rm -f $(TARGETS)
This page took 0.080247 seconds and 5 git commands to generate.