2 # Linux 2.4 kernel target for the OpenWRT project
4 include $(TOPDIR
)/rules.mk
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
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
22 PKG_BUILD_DIR
:= $(LINUX_BUILD_DIR
)/linux-modules
25 KERNEL_IPKG
:=$(LINUX_BUILD_DIR
)/kernel_
$(LINUX_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
26 KERNEL_IDIR
:=$(LINUX_BUILD_DIR
)/kernel-ipkg
28 KPKG_MAKEOPTS
:= IPKG
="$(IPKG_KERNEL)" \
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)"
36 include $(LINUX_KCONFIG
)
38 INSTALL_TARGETS
:= $(KERNEL_IPKG
)
53 include ..
/netfilter.mk
57 $(eval
$(call KMOD_template
,ATM
,atm
,\
58 $(MODULES_DIR
)/kernel
/net
/atm
/atm.o \
59 $(MODULES_DIR
)/kernel
/net
/atm
/br2684.o \
62 $(eval
$(call KMOD_template
,GRE
,gre
,\
63 $(MODULES_DIR
)/kernel
/net
/ipv4
/ip_gre.o \
66 $(eval
$(call KMOD_template
,IMQ
,imq
,\
67 $(MODULES_DIR
)/kernel
/net
/*/netfilter
/*IMQ
*.o \
68 $(MODULES_DIR
)/kernel
/drivers
/net
/imq.o \
71 $(eval
$(call KMOD_template
,IPV6
,ipv6
,\
72 $(MODULES_DIR
)/kernel
/net
/ipv6
/ipv6.o \
73 ,CONFIG_IPV6
,,20,ipv6
))
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 \
82 $(eval
$(call KMOD_template
,MPPE
,mppe
,\
83 $(MODULES_DIR
)/kernel
/drivers
/net
/ppp_mppe_mppc.o \
84 ,CONFIG_PPP_MPPE_MPPC
))
86 $(eval
$(call KMOD_template
,PPPOATM
,pppoatm
,\
87 $(MODULES_DIR
)/kernel
/net
/atm
/pppoatm.o \
90 $(eval
$(call KMOD_template
,PPPOE
,pppoe
,\
91 $(MODULES_DIR
)/kernel
/drivers
/net
/pppoe.o \
94 ifneq ($(wildcard $(MODULES_DIR
)/kernel
/net
/sched
/*.o
),)
97 $(eval
$(call KMOD_template
,SCHED
,sched
,\
98 $(MODULES_DIR
)/kernel
/net
/sched
/*.o \
101 $(eval
$(call KMOD_template
,TUN
,tun
,\
102 $(MODULES_DIR
)/kernel
/drivers
/net
/tun.o \
103 ,CONFIG_TUN
,,20,tun
))
105 $(eval
$(call KMOD_template
,RING
,ring
,\
106 $(MODULES_DIR
)/kernel
/net
/ring
/ring.o \
107 ,CONFIG_RING
,,20,ring
))
110 # Filtering / Firewalling
112 $(eval
$(call KMOD_template
,ARPTABLES
,arptables
,\
113 $(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/arp
*.o \
114 ,CONFIG_IP_NF_ARPTABLES
))
116 $(eval
$(call KMOD_template
,EBTABLES
,ebtables
,\
117 $(MODULES_DIR
)/kernel
/net
/bridge
/netfilter
/*.o \
118 ,CONFIG_BRIDGE_NF_EBTABLES
))
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
))
124 $(eval
$(call KMOD_template
,IPT_CONNTRACK
,ipt-conntrack
,\
125 $(foreach mod
,$(IPT_CONNTRACK-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
128 $(eval
$(call KMOD_template
,IPT_EXTRA
,ipt-extra
,\
129 $(foreach mod
,$(IPT_EXTRA-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
132 $(eval
$(call KMOD_template
,IPT_FILTER
,ipt-filter
,\
133 $(foreach mod
,$(IPT_FILTER-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
136 $(eval
$(call KMOD_template
,IPT_IPOPT
,ipt-ipopt
,\
137 $(foreach mod
,$(IPT_IPOPT-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
140 $(eval
$(call KMOD_template
,IPT_IPSEC
,ipt-ipsec
,\
141 $(foreach mod
,$(IPT_IPSEC-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
144 $(eval
$(call KMOD_template
,IPT_NAT
,ipt-nat
,\
145 $(foreach mod
,$(IPT_NAT-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
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
)))
152 $(eval
$(call KMOD_template
,IPT_QUEUE
,ipt-queue
,\
153 $(foreach mod
,$(IPT_QUEUE-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
156 $(eval
$(call KMOD_template
,IPT_ULOG
,ipt-ulog
,\
157 $(foreach mod
,$(IPT_ULOG-m
),$(MODULES_DIR
)/kernel
/net
/ipv4
/netfilter
/$(mod
).o
) \
160 $(eval
$(call KMOD_template
,IP6TABLES
,ip6tables
,\
161 $(MODULES_DIR
)/kernel
/net
/ipv6
/netfilter
/ip
*.o \
162 ,CONFIG_IP6_NF_IPTABLES
,kmod-ipv6
))
167 $(eval
$(call KMOD_template
,IDE
,ide
,\
168 $(MODULES_DIR
)/kernel
/drivers
/ide
/*.o \
169 $(MODULES_DIR
)/kernel
/drivers
/ide
/*/*.o \
172 $(eval
$(call KMOD_template
,LOOP
,loop
,\
173 $(MODULES_DIR
)/kernel
/drivers
/block
/loop.o \
174 ,CONFIG_BLK_DEV_LOOP
,,20,loop
))
176 $(eval
$(call KMOD_template
,NBD
,nbd
,\
177 $(MODULES_DIR
)/kernel
/drivers
/block
/nbd.o \
178 ,CONFIG_BLK_DEV_NBD
,,20,nbd
))
183 ifneq ($(wildcard $(MODULES_DIR
)/kernel
/crypto
/*.o
),)
186 $(eval
$(call KMOD_template
,CRYPTO
,crypto
,\
187 $(MODULES_DIR
)/kernel
/crypto
/*.o \
193 $(eval
$(call KMOD_template
,FS_CIFS
,fs-cifs
,\
194 $(MODULES_DIR
)/kernel
/fs
/cifs
/cifs.o \
195 ,CONFIG_CIFS
,,30,cifs
))
197 $(eval
$(call KMOD_template
,FS_EXT2
,fs-ext2
,\
198 $(MODULES_DIR
)/kernel
/fs
/ext2
/*.o \
199 ,CONFIG_EXT2_FS
,,30,ext2
))
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
))
206 $(eval
$(call KMOD_template
,FS_HFSPLUS
,fs-hfsplus
,\
207 $(MODULES_DIR
)/kernel
/fs
/hfsplus
/*.o \
208 ,CONFIG_HFSPLUS_FS
,,30,hfsplus
))
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
))
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
))
221 $(eval
$(call KMOD_template
,FS_XFS
,fs-xfs
,\
222 $(MODULES_DIR
)/kernel
/fs
/xfs
/*.o \
223 ,CONFIG_XFS_FS
,,30,xfs
))
228 $(eval
$(call KMOD_template
,PWC
,pwc
,\
229 $(MODULES_DIR
)/kernel
/drivers
/usb
/pwc.o \
230 ,CONFIG_USB_PWC
,kmod-videodev
,63,pwc
))
232 $(eval
$(call KMOD_template
,SOUNDCORE
,soundcore
,\
233 $(MODULES_DIR
)/kernel
/drivers
/sound
/soundcore.o \
234 ,CONFIG_SOUND
,,30,soundcore
))
236 $(eval
$(call KMOD_template
,VIDEODEV
,videodev
,\
237 $(MODULES_DIR
)/kernel
/drivers
/media
/video
/videodev.o \
238 ,CONFIG_VIDEO_DEV
,,62,videodev
))
243 $(eval
$(call KMOD_template
,NET_3C59X
,net-3c59x
,\
244 $(MODULES_DIR
)/kernel
/drivers
/net
/3c59x.o \
245 ,CONFIG_VORTEX
,,10,3c59x
))
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
))
252 $(eval
$(call KMOD_template
,NET_AIRO
,net-airo
,\
253 $(MODULES_DIR
)/kernel
/drivers
/net
/wireless
/airo.o \
254 ,CONFIG_AIRO
,,10,airo
))
256 $(eval
$(call KMOD_template
,NET_B44
,net-b44
,\
257 $(MODULES_DIR
)/kernel
/drivers
/net
/b44.o \
258 ,CONFIG_B44
,,10,b44
))
260 $(eval
$(call KMOD_template
,NET_E100
,net-e100
,\
261 $(MODULES_DIR
)/kernel
/drivers
/net
/e100.o \
262 ,CONFIG_E100
,,10,e100
))
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
))
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
))
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
))
277 $(eval
$(call KMOD_template
,NET_NATSEMI
,net-natsemi
,\
278 $(MODULES_DIR
)/kernel
/drivers
/net
/natsemi.o \
279 ,CONFIG_NATSEMI
,,10,natsemi
))
281 $(eval
$(call KMOD_template
,NET_PRISM54
,net-prism54
,\
282 $(MODULES_DIR
)/kernel
/drivers
/net
/wireless
/prism54
/prism54.o \
283 ,CONFIG_PRISM54
,,10,prism54
))
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
))
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
))
301 $(eval
$(call KMOD_template
,USB
,usb-core
,\
302 $(MODULES_DIR
)/kernel
/drivers
/usb
/usbcore.o \
303 ,CONFIG_USB
,,50,usbcore
))
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
))
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
))
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
))
317 $(eval
$(call KMOD_template
,USB_ACM
,usb-acm
,\
318 $(MODULES_DIR
)/kernel
/drivers
/usb
/acm.o \
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
))
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
))
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
))
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
))
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
))
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
))
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
))
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
))
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
))
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
))
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 \
372 $(eval
$(call KMOD_template
,SOFTDOG
,softdog
,\
373 $(MODULES_DIR
)/kernel
/drivers
/char
/softdog.o \
374 ,CONFIG_SOFT_WATCHDOG
,,95,softdog
))
377 $(TARGETS
): $(PACKAGE_DIR
)
380 mkdir
-p
$(PACKAGE_DIR
)
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
) -
386 ln
-s
$(LINUX_BUILD_DIR
)/linux-
$(LINUX_VERSION
) $(LINUX_DIR
)
387 touch
$(LINUX_DIR
)/.unpacked
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
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
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
407 $(LINUX_DIR
)/vmlinux
: $(LINUX_DIR
)/.depend_done
408 $(MAKE
) -C
$(LINUX_DIR
) ARCH
=$(LINUX_KARCH
) PATH
=$(TARGET_PATH
) $(MAKE_TRACE
)
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
)
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
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/
425 $(STAMP_DIR
)/.linux-compile
: $(LINUX_DIR
)/.modules_done
426 @mkdir
-p
$(STAMP_DIR
)
428 ln
-sf
$(LINUX_BUILD_DIR
)/linux-
$(LINUX_VERSION
) $(LINUX_DIR
)
429 @
$(TRACE
) target
/linux
/package
430 $(MAKE
) -C
$(TOPDIR
)/target
/linux
/package \
435 $(TARGET_MODULES_DIR
):
436 -mkdir
-p
$(TARGET_MODULES_DIR
)
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
; \
445 $(IPKG_BUILD
) $(KERNEL_IDIR
) $(LINUX_BUILD_DIR
) $(MAKE_TRACE
)
447 source
: $(DL_DIR
)/$(LINUX_SOURCE
)
448 prepare
: $(LINUX_DIR
)/.configured
450 $(MAKE
) $(STAMP_DIR
)/.linux-compile
$(MAKE_TRACE
)
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 \
459 @
{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL
) install $(INSTALL_TARGETS
) || true
; } $(MAKE_TRACE
)
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
)
470 if
[ -f
$(LINUX_KERNEL
) ]; then \
471 $(MAKE
) clean $(MAKE_TRACE
); \
473 $(MAKE
) compile
$(MAKE_TRACE
)
476 rm -f
$(STAMP_DIR
)/.linux-compile
477 rm -rf
$(LINUX_BUILD_DIR
)