fix flash map driver for squashfs images for wrt54gs
[openwrt.git] / openwrt / 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
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/yenta_socket.o \
287 $(MODULES_DIR)/kernel/drivers/pcmcia/ds.o \
288 ,CONFIG_PCMCIA,,50,pcmcia_core yenta_socket ds))
289
290 $(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\
291 $(MODULES_DIR)/kernel/drivers/char/pcmcia/serial_cs.o \
292 ,CONFIG_PCMCIA_SERIAL_CS,kmod-pcmcia-core,51,serial_cs))
293
294
295 # USB
296
297 $(eval $(call KMOD_template,USB,usb-core,\
298 $(MODULES_DIR)/kernel/drivers/usb/usbcore.o \
299 ,CONFIG_USB,,50,usbcore))
300
301 $(eval $(call KMOD_template,USB_OHCI,usb-ohci,\
302 $(MODULES_DIR)/kernel/drivers/usb/host/usb-ohci.o \
303 ,CONFIG_USB_OHCI,kmod-usb-core,60,usb-ohci))
304
305 $(eval $(call KMOD_template,USB_UHCI,usb-uhci,\
306 $(MODULES_DIR)/kernel/drivers/usb/host/uhci.o \
307 ,CONFIG_USB_UHCI_ALT,kmod-usb-core,60,uhci))
308
309 $(eval $(call KMOD_template,USB2,usb2,\
310 $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.o \
311 ,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd))
312
313 $(eval $(call KMOD_template,USB_ACM,usb-acm,\
314 $(MODULES_DIR)/kernel/drivers/usb/acm.o \
315 ,CONFIG_USB_ACM))
316
317 $(eval $(call KMOD_template,USB_AUDIO,usb-audio,\
318 $(MODULES_DIR)/kernel/drivers/usb/audio.o \
319 ,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio))
320
321 $(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
322 $(MODULES_DIR)/kernel/drivers/usb/printer.o \
323 ,CONFIG_USB_PRINTER,kmod-usb-core,60,printer))
324
325 $(eval $(call KMOD_template,USB_SERIAL,usb-serial,\
326 $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \
327 ,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial))
328
329 $(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\
330 $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \
331 ,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa))
332
333 $(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\
334 $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \
335 ,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio))
336
337 $(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\
338 $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \
339 ,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232))
340
341 $(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\
342 $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \
343 ,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303))
344
345 $(eval $(call KMOD_template,USB_STORAGE,usb-storage,\
346 $(MODULES_DIR)/kernel/drivers/scsi/*.o \
347 $(MODULES_DIR)/kernel/drivers/usb/storage/*.o \
348 ,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage))
349
350
351 # Misc. devices
352
353 $(eval $(call KMOD_template,AX25,ax25,\
354 $(MODULES_DIR)/kernel/net/ax25/ax25.o \
355 $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \
356 ,CONFIG_AX25,,90,ax25 mkiss))
357
358 $(eval $(call KMOD_template,BLUETOOTH,bluetooth,\
359 $(MODULES_DIR)/kernel/net/bluetooth/*.o \
360 $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/*.o \
361 $(MODULES_DIR)/kernel/drivers/bluetooth/*.o \
362 ,CONFIG_BLUEZ))
363
364
365 $(TARGETS): $(PACKAGE_DIR)
366
367 $(PACKAGE_DIR):
368 mkdir -p $(PACKAGE_DIR)
369
370 $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
371 -mkdir -p $(LINUX_BUILD_DIR)
372 bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
373 rm -f $(LINUX_DIR)
374 ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
375 touch $(LINUX_DIR)/.unpacked
376
377 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
378 $(PATCH) $(LINUX_DIR) ./patches/generic $(MAKE_TRACE)
379 [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) $(MAKE_TRACE)
380 touch $(LINUX_DIR)/.patched
381
382 $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
383 -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
384 $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
385 $(LINUX_DIR)/Makefile \
386 $(LINUX_DIR)/arch/*/Makefile
387 $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
388 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h $(MAKE_TRACE)
389 touch $(LINUX_DIR)/.configured
390
391 $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
392 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) dep $(MAKE_TRACE)
393 touch $(LINUX_DIR)/.depend_done
394
395 $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done
396 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(MAKE_TRACE)
397
398 $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
399 $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ $(MAKE_TRACE)
400 touch -c $(LINUX_KERNEL)
401
402 $(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE)
403 rm -rf $(LINUX_BUILD_DIR)/modules
404 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) modules $(MAKE_TRACE)
405 $(MAKE) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE)
406 touch $(LINUX_DIR)/.modules_done
407
408 $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
409 mkdir -p $(STAGING_DIR)/include
410 tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
411 tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
412
413 $(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
414 @mkdir -p $(STAMP_DIR)
415 @$(MAKE) $(TARGETS)
416 ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
417 @$(TRACE) target/linux/package
418 $(MAKE) -C $(TOPDIR)/target/linux/package \
419 $(KPKG_MAKEOPTS) \
420 compile
421 touch $@
422
423 $(TARGET_MODULES_DIR):
424 -mkdir -p $(TARGET_MODULES_DIR)
425
426 $(KERNEL_IPKG):
427 rm -rf $(KERNEL_IDIR)
428 mkdir -p $(KERNEL_IDIR)/etc
429 $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) $(ARCH)
430 if [ -f ./config/$(BOARD).modules ]; then \
431 cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
432 fi
433 $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE)
434
435 source: $(DL_DIR)/$(LINUX_SOURCE)
436 prepare: $(LINUX_DIR)/.configured
437 compile:
438 $(MAKE) $(STAMP_DIR)/.linux-compile $(MAKE_TRACE)
439
440 install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
441 rm -rf $(LINUX_BUILD_DIR)/root*
442 cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
443 echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
444 $(MAKE) -C $(TOPDIR)/target/linux/package \
445 $(KPKG_MAKEOPTS) \
446 install
447 @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE)
448
449 mostlyclean:
450 rm -f $(STAMP_DIR)/.linux-compile
451 rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
452 rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
453 $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE_TRACE)
454 rm -f $(LINUX_KERNEL) $(LINUX_IMAGE)
455
456 rebuild:
457 -$(MAKE) mostlyclean
458 if [ -f $(LINUX_KERNEL) ]; then \
459 $(MAKE) clean $(MAKE_TRACE); \
460 fi
461 $(MAKE) compile $(MAKE_TRACE)
462
463 clean:
464 rm -f $(STAMP_DIR)/.linux-compile
465 rm -rf $(LINUX_BUILD_DIR)
466 rm -f $(TARGETS)
This page took 0.065873 seconds and 5 git commands to generate.