summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/Config.in55
-rw-r--r--target/linux/Makefile10
-rw-r--r--target/linux/ar531x-2.4/Makefile17
-rw-r--r--target/linux/ar531x-2.4/config (renamed from target/linux/linux-2.4/config/ar531x)0
-rw-r--r--target/linux/ar531x-2.4/patches/000-atheros-support.patch (renamed from target/linux/linux-2.4/patches/ar531x/000-atheros-support.patch)0
-rw-r--r--target/linux/ar7-2.4/Makefile (renamed from target/linux/linux-2.4/ar7.mk)65
-rw-r--r--target/linux/ar7-2.4/config (renamed from target/linux/linux-2.4/config/ar7)0
-rw-r--r--target/linux/ar7-2.4/patches/000-ar7_support.patch (renamed from target/linux/linux-2.4/patches/ar7/000-ar7_support.patch)0
-rw-r--r--target/linux/ar7-2.4/patches/001-flash_map.patch (renamed from target/linux/linux-2.4/patches/ar7/001-flash_map.patch)0
-rw-r--r--target/linux/ar7-2.4/patches/002-led_driver.patch (renamed from target/linux/linux-2.4/patches/ar7/002-led_driver.patch)0
-rw-r--r--target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch (renamed from target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch)0
-rw-r--r--target/linux/ar7-2.4/patches/004-atm_driver.patch (renamed from target/linux/linux-2.4/patches/ar7/004-atm_driver.patch)0
-rw-r--r--target/linux/ar7-2.4/patches/005-wdt_driver.patch (renamed from target/linux/linux-2.4/patches/ar7/005-wdt_driver.patch)0
-rw-r--r--target/linux/ar7-2.4/patches/006-sched_use_tsc.patch (renamed from target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch)0
-rw-r--r--target/linux/brcm-2.4/Config.in18
-rw-r--r--target/linux/brcm-2.4/Makefile (renamed from target/linux/linux-2.4/broadcom.mk)48
-rw-r--r--target/linux/brcm-2.4/config (renamed from target/linux/linux-2.4/config/brcm)1
-rw-r--r--target/linux/brcm-2.4/patches/001-bcm47xx.patch (renamed from target/linux/linux-2.4/patches/brcm/001-bcm47xx.patch)49
-rw-r--r--target/linux/brcm-2.4/patches/002-wl_fix.patch (renamed from target/linux/linux-2.4/patches/brcm/002-wl_fix.patch)0
-rw-r--r--target/linux/brcm-2.4/patches/003-bcm47xx_cache_fixes.patch (renamed from target/linux/linux-2.4/patches/brcm/003-bcm47xx_cache_fixes.patch)0
-rw-r--r--target/linux/brcm-2.4/patches/004-flash-map.patch (renamed from target/linux/linux-2.4/patches/brcm/004-flash-map.patch)0
-rw-r--r--target/linux/brcm-2.4/patches/005-bluetooth_sco_buffer_align.patch (renamed from target/linux/linux-2.4/patches/brcm/005-bluetooth_sco_buffer_align.patch)0
-rw-r--r--target/linux/brcm-2.4/patches/006-ide_workaround.patch (renamed from target/linux/linux-2.4/patches/brcm/006-ide_workaround.patch)0
-rw-r--r--target/linux/brcm-2.4/patches/007-sched_use_tsc.patch (renamed from target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch)0
-rw-r--r--target/linux/brcm-2.6/Makefile19
-rw-r--r--target/linux/brcm-2.6/config (renamed from target/linux/linux-2.6/config/brcm)0
-rw-r--r--target/linux/brcm-2.6/patches/001-bcm947xx.patch (renamed from target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch)0
-rw-r--r--target/linux/brcm-2.6/patches/002-flash-map.patch (renamed from target/linux/linux-2.6/patches/brcm/002-flash-map.patch)0
-rw-r--r--target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch (renamed from target/linux/linux-2.6/patches/brcm/003-bcm4710_cache_fixes.patch)0
-rw-r--r--target/linux/generic-2.4/README (renamed from target/linux/linux-2.4/README)0
-rw-r--r--target/linux/generic-2.4/modules.mk (renamed from target/linux/linux-2.4/Makefile)155
-rw-r--r--target/linux/generic-2.4/patches/000-linux_mips.patch (renamed from target/linux/linux-2.4/patches/generic/000-linux_mips.patch)0
-rw-r--r--target/linux/generic-2.4/patches/001-squashfs.patch (renamed from target/linux/linux-2.4/patches/generic/001-squashfs.patch)0
-rw-r--r--target/linux/generic-2.4/patches/002-squashfs_lzma.patch (renamed from target/linux/linux-2.4/patches/generic/002-squashfs_lzma.patch)0
-rw-r--r--target/linux/generic-2.4/patches/003-jffs2_compression.patch (renamed from target/linux/linux-2.4/patches/generic/003-jffs2_compression.patch)0
-rw-r--r--target/linux/generic-2.4/patches/004-exec_pagesize.patch (renamed from target/linux/linux-2.4/patches/generic/004-exec_pagesize.patch)0
-rw-r--r--target/linux/generic-2.4/patches/005-mtd_flashtypes.patch (renamed from target/linux/linux-2.4/patches/generic/005-mtd_flashtypes.patch)0
-rw-r--r--target/linux/generic-2.4/patches/006-gcc4_fixes.patch (renamed from target/linux/linux-2.4/patches/generic/006-gcc4_fixes.patch)0
-rw-r--r--target/linux/generic-2.4/patches/007-more_gcc4_fixes.patch (renamed from target/linux/linux-2.4/patches/generic/007-more_gcc4_fixes.patch)0
-rw-r--r--target/linux/generic-2.4/patches/050-build_flags.patch (renamed from target/linux/linux-2.4/patches/generic/050-build_flags.patch)0
-rw-r--r--target/linux/generic-2.4/patches/106-mppe_mppc.patch (renamed from target/linux/linux-2.4/patches/generic/106-mppe_mppc.patch)0
-rw-r--r--target/linux/generic-2.4/patches/107-cifs.patch (renamed from target/linux/linux-2.4/patches/generic/107-cifs.patch)0
-rw-r--r--target/linux/generic-2.4/patches/108-optional_aout_support.patch (renamed from target/linux/linux-2.4/patches/generic/108-optional_aout_support.patch)0
-rw-r--r--target/linux/generic-2.4/patches/109-ipsec_nat_traversal.patch (renamed from target/linux/linux-2.4/patches/generic/109-ipsec_nat_traversal.patch)0
-rw-r--r--target/linux/generic-2.4/patches/110-netdev_random_core.patch (renamed from target/linux/linux-2.4/patches/generic/110-netdev_random_core.patch)0
-rw-r--r--target/linux/generic-2.4/patches/112-bridging_performance.patch (renamed from target/linux/linux-2.4/patches/generic/112-bridging_performance.patch)0
-rw-r--r--target/linux/generic-2.4/patches/113-even_more_gcc4_stuff.patch (renamed from target/linux/linux-2.4/patches/generic/113-even_more_gcc4_stuff.patch)0
-rw-r--r--target/linux/generic-2.4/patches/200-i4l.patch (renamed from target/linux/linux-2.4/patches/generic/200-i4l.patch)0
-rw-r--r--target/linux/generic-2.4/patches/201-hfc_usb_backport.patch (renamed from target/linux/linux-2.4/patches/generic/201-hfc_usb_backport.patch)0
-rw-r--r--target/linux/generic-2.4/patches/202-pl2303_backport.patch (renamed from target/linux/linux-2.4/patches/generic/202-pl2303_backport.patch)0
-rw-r--r--target/linux/generic-2.4/patches/203-hfsplus_fix.patch (renamed from target/linux/linux-2.4/patches/generic/203-hfsplus_fix.patch)0
-rw-r--r--target/linux/generic-2.4/patches/204-net_b44.patch (renamed from target/linux/linux-2.4/patches/generic/204-net_b44.patch)0
-rw-r--r--target/linux/generic-2.4/patches/206-gcc_3.4_fixes.patch (renamed from target/linux/linux-2.4/patches/generic/206-gcc_3.4_fixes.patch)0
-rw-r--r--target/linux/generic-2.4/patches/208-usb2_fix.patch (renamed from target/linux/linux-2.4/patches/generic/208-usb2_fix.patch)0
-rw-r--r--target/linux/generic-2.4/patches/209-build_fixes.patch (renamed from target/linux/linux-2.4/patches/generic/209-build_fixes.patch)0
-rw-r--r--target/linux/generic-2.4/patches/210-fix-irq-serial.patch (renamed from target/linux/linux-2.4/patches/generic/210-fix-irq-serial.patch)0
-rw-r--r--target/linux/generic-2.4/patches/212-htb_time_fix.patch (renamed from target/linux/linux-2.4/patches/generic/212-htb_time_fix.patch)0
-rw-r--r--target/linux/generic-2.4/patches/213-htb_disable_hysteresis.patch (renamed from target/linux/linux-2.4/patches/generic/213-htb_disable_hysteresis.patch)0
-rw-r--r--target/linux/generic-2.4/patches/222-sound.patch (renamed from target/linux/linux-2.4/patches/generic/222-sound.patch)0
-rw-r--r--target/linux/generic-2.4/patches/223-pf_ring.patch (renamed from target/linux/linux-2.4/patches/generic/223-pf_ring.patch)0
-rw-r--r--target/linux/generic-2.4/patches/224-atm_hotplug.patch (renamed from target/linux/linux-2.4/patches/generic/224-atm_hotplug.patch)0
-rw-r--r--target/linux/generic-2.4/patches/601-netfilter_ipp2p.patch (renamed from target/linux/linux-2.4/patches/generic/601-netfilter_ipp2p.patch)0
-rw-r--r--target/linux/generic-2.4/patches/602-netfilter_layer7_1.5nbd.patch (renamed from target/linux/linux-2.4/patches/generic/602-netfilter_layer7_1.5nbd.patch)0
-rw-r--r--target/linux/generic-2.4/patches/603-netfilter_nat_pptp.patch (renamed from target/linux/linux-2.4/patches/generic/603-netfilter_nat_pptp.patch)0
-rw-r--r--target/linux/generic-2.4/patches/604-netfilter_maxconn.patch (renamed from target/linux/linux-2.4/patches/generic/604-netfilter_maxconn.patch)0
-rw-r--r--target/linux/generic-2.4/patches/605-netfilter_TTL.patch (renamed from target/linux/linux-2.4/patches/generic/605-netfilter_TTL.patch)0
-rw-r--r--target/linux/generic-2.4/patches/606-netfilter_NETMAP.patch (renamed from target/linux/linux-2.4/patches/generic/606-netfilter_NETMAP.patch)0
-rw-r--r--target/linux/generic-2.4/patches/607-netfilter_connmark.patch (renamed from target/linux/linux-2.4/patches/generic/607-netfilter_connmark.patch)0
-rw-r--r--target/linux/generic-2.4/patches/608-netfilter_ipset.patch (renamed from target/linux/linux-2.4/patches/generic/608-netfilter_ipset.patch)0
-rw-r--r--target/linux/generic-2.4/patches/609-netfilter_string.patch (renamed from target/linux/linux-2.4/patches/generic/609-netfilter_string.patch)0
-rw-r--r--target/linux/generic-2.4/patches/610-netfilter_connbytes.patch (renamed from target/linux/linux-2.4/patches/generic/610-netfilter_connbytes.patch)0
-rw-r--r--target/linux/generic-2.4/patches/611-netfilter_condition.patch (renamed from target/linux/linux-2.4/patches/generic/611-netfilter_condition.patch)0
-rw-r--r--target/linux/generic-2.4/patches/612-netfilter_quota.patch (renamed from target/linux/linux-2.4/patches/generic/612-netfilter_quota.patch)0
-rw-r--r--target/linux/generic-2.4/patches/613-netfilter_nat_sip.patch (renamed from target/linux/linux-2.4/patches/generic/613-netfilter_nat_sip.patch)0
-rw-r--r--target/linux/generic-2.4/patches/614-netfilter_nat_h323.patch (renamed from target/linux/linux-2.4/patches/generic/614-netfilter_nat_h323.patch)0
-rw-r--r--target/linux/generic-2.4/patches/615-netfilter_nat_mms.patch (renamed from target/linux/linux-2.4/patches/generic/615-netfilter_nat_mms.patch)0
-rw-r--r--target/linux/generic-2.4/patches/616-netfilter_imq.patch (renamed from target/linux/linux-2.4/patches/generic/616-netfilter_imq.patch)0
-rw-r--r--target/linux/generic-2.4/patches/617-netfilter_nat_rtsp.patch (renamed from target/linux/linux-2.4/patches/generic/617-netfilter_nat_rtsp.patch)0
-rw-r--r--target/linux/generic-2.4/patches/618-netfilter_time.patch (renamed from target/linux/linux-2.4/patches/generic/618-netfilter_time.patch)0
-rw-r--r--target/linux/generic-2.6/modules.mk (renamed from target/linux/linux-2.6/Makefile)151
-rw-r--r--target/linux/generic-2.6/patches/000-reenable_devfs.patch (renamed from target/linux/linux-2.6/patches/generic/000-reenable_devfs.patch)0
-rw-r--r--target/linux/generic-2.6/patches/001-squashfs.patch (renamed from target/linux/linux-2.6/patches/generic/001-squashfs.patch)0
-rw-r--r--target/linux/generic-2.6/patches/002-squashfs_lzma.patch (renamed from target/linux/linux-2.6/patches/generic/002-squashfs_lzma.patch)0
-rw-r--r--target/linux/generic-2.6/patches/003-net-b44-1.patch (renamed from target/linux/linux-2.6/patches/generic/003-net-b44-1.patch)0
-rw-r--r--target/linux/generic-2.6/patches/003-net-b44-2.patch (renamed from target/linux/linux-2.6/patches/generic/003-net-b44-2.patch)0
-rw-r--r--target/linux/generic-2.6/patches/004-extra_optimization.patch (renamed from target/linux/linux-2.6/patches/generic/004-extra_optimization.patch)0
-rw-r--r--target/linux/generic-2.6/patches/100-netfilter_layer7.patch (renamed from target/linux/linux-2.6/patches/generic/100-netfilter_layer7.patch)0
-rw-r--r--target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch (renamed from target/linux/linux-2.6/patches/generic/102-openswan-2.4.0.kernel-2.6-natt.patch)0
-rw-r--r--target/linux/generic-2.6/patches/103-netfilter-ipset.patch (renamed from target/linux/linux-2.6/patches/generic/103-netfilter-ipset.patch)0
-rw-r--r--target/linux/generic-2.6/patches/104-pf_ring.patch (renamed from target/linux/linux-2.6/patches/generic/104-pf_ring.patch)0
-rw-r--r--target/linux/generic-2.6/patches/105-netfilter_time.patch (renamed from target/linux/linux-2.6/patches/generic/105-netfilter_time.patch)0
-rw-r--r--target/linux/kernel.mk117
-rw-r--r--target/linux/linux-2.4/x86.mk15
-rw-r--r--target/linux/linux-2.6/x86.mk10
-rw-r--r--target/linux/package/Makefile29
-rw-r--r--target/linux/package/alsa/Config.in4
-rw-r--r--target/linux/package/alsa/Makefile14
-rw-r--r--target/linux/package/bcm43xx-dscape/Makefile11
-rw-r--r--target/linux/package/diag/Config.in3
-rw-r--r--target/linux/package/diag/Makefile8
-rw-r--r--target/linux/package/fuse/Makefile8
-rw-r--r--target/linux/package/hostap/Makefile12
-rw-r--r--target/linux/package/ieee80211-dscape/Makefile11
-rw-r--r--target/linux/package/madwifi/Makefile8
-rw-r--r--target/linux/package/mini_fo/Makefile9
-rw-r--r--target/linux/package/openswan/Makefile10
-rw-r--r--target/linux/package/shfs/Makefile8
-rw-r--r--target/linux/package/spca5xx/Makefile9
-rw-r--r--target/linux/package/switch/Makefile9
-rw-r--r--target/linux/package/ueagle-atm/Makefile9
-rw-r--r--target/linux/package/wlcompat/Makefile10
-rw-r--r--target/linux/rules.mk40
-rw-r--r--target/linux/x86-2.4/Makefile30
-rw-r--r--target/linux/x86-2.4/config (renamed from target/linux/linux-2.4/config/x86)0
-rw-r--r--target/linux/x86-2.4/patches/001-mgeode-cpu.patch (renamed from target/linux/linux-2.4/patches/x86/001-mgeode-cpu.patch)0
-rw-r--r--target/linux/x86-2.4/patches/002-wd1100.patch (renamed from target/linux/linux-2.4/patches/x86/002-wd1100.patch)0
-rw-r--r--target/linux/x86-2.4/patches/003-mgeode-pci.patch (renamed from target/linux/linux-2.4/patches/x86/003-mgeode-pci.patch)0
-rw-r--r--target/linux/x86-2.6/Makefile25
-rw-r--r--target/linux/x86-2.6/config (renamed from target/linux/linux-2.6/config/x86)0
-rw-r--r--target/linux/x86-2.6/patches/scx200-hr-timer-2.6.12-rc6-6.diff (renamed from target/linux/linux-2.6/patches/x86/scx200-hr-timer-2.6.12-rc6-6.diff)0
120 files changed, 388 insertions, 609 deletions
diff --git a/target/linux/Config.in b/target/linux/Config.in
index 4b621231c7..5a6c11a0f1 100644
--- a/target/linux/Config.in
+++ b/target/linux/Config.in
@@ -67,58 +67,8 @@ config BR2_LINUX_PCMCIA_SUPPORT
comment "Device specific modules"
-config BR2_PACKAGE_KMOD_BRCM_ET
- prompt "kmod-brcm-et...................... Broadcom Ethernet Driver"
- tristate
- depends BR2_LINUX_2_4_BRCM
- default m
- help
- Proprietary driver for Broadcom Ethernet chipsets (obsolete)
+source "target/linux/*-2.[46]/Config.in"
-config BR2_PACKAGE_KMOD_BRCM_WL
- prompt "kmod-brcm-wl...................... Broadcom Wireless Network Driver"
- tristate
- depends BR2_LINUX_2_4_BRCM
- default y
- help
- Proprietary driver for Broadcom Wireless chipsets
-
-config BR2_PACKAGE_KMOD_BRCM_WL2
- prompt "kmod-brcm-wl2..................... Broadcom Wireless Network Driver (new)"
- tristate
- depends BR2_LINUX_2_4_BRCM
- default m
- help
- Proprietary driver for Broadcom Wireless chipsets
- New version with Multi-BSS capability
-
-config BR2_PACKAGE_KMOD_CPMAC
- prompt "kmod-cpmac........................ AR7 CPMAC Network Driver"
- tristate
- default y
- depends BR2_LINUX_2_4_AR7
- help
- Driver for the AR7 CPMAC network chip
-
-config BR2_PACKAGE_KMOD_SANGAM_ATM_A
- prompt "kmod-sangam-atm-annex-a........... AR7 Sangam ADSL Driver (Annex A)"
- tristate
- default m
- depends BR2_LINUX_2_4_AR7
- select BR2_PACKAGE_KMOD_ATM
- help
- ATM driver for the Sangam ADSL chip on AR7
- Annex A version
-
-config BR2_PACKAGE_KMOD_SANGAM_ATM_B
- prompt "kmod-sangam-atm-annex-b........... AR7 Sangam ADSL Driver (Annex B)"
- tristate
- default y
- depends BR2_LINUX_2_4_AR7
- select BR2_PACKAGE_KMOD_ATM
- help
- ATM driver for the Sangam ADSL chip on AR7
- Annex B version
comment "Networking modules"
@@ -126,7 +76,7 @@ config BR2_PACKAGE_KMOD_ATM
prompt "kmod-atm.......................... ATM support"
tristate
default y if BR2_LINUX_2_4_AR7
- default m if BR2_LINUX_2_6_BRCM
+ default m
help
ATM support
@@ -164,7 +114,6 @@ config BR2_PACKAGE_KMOD_PPPOATM
prompt "kmod-pppoatm.................... PPPoA (PPP over ATM) kernel support"
tristate
default y if BR2_LINUX_2_4_AR7
- default m if BR2_LINUX_2_6_BRCM
default m
depends BR2_PACKAGE_KMOD_PPP
select BR2_PACKAGE_KMOD_ATM
diff --git a/target/linux/Makefile b/target/linux/Makefile
index 5dfe12ad7f..038983f3aa 100644
--- a/target/linux/Makefile
+++ b/target/linux/Makefile
@@ -10,23 +10,23 @@ define kernel_template
$(1)/$(2)-clean:
@$(TRACE) target/linux/linux-$(1)/clean
- $(MAKE) -C linux-$(1) KERNEL="$(1)" BOARD="$(2)" clean
+ $(MAKE) -C $(2)-$(1) BOARD="$(2)" clean
$(1)/$(2)-prepare:
@$(TRACE) target/linux/linux-$(1)/prepare
- $(MAKE) -C linux-$(1) KERNEL="$(1)" BOARD="$(2)" prepare
+ $(MAKE) -C $(2)-$(1) BOARD="$(2)" prepare
$(1)/$(2)-compile:
@$(TRACE) target/linux/linux-$(1)/compile
- $(MAKE) -C linux-$(1) KERNEL="$(1)" BOARD="$(2)" compile
+ $(MAKE) -C $(2)-$(1) BOARD="$(2)" compile
$(1)/$(2)-rebuild:
@$(TRACE) target/linux/linux-$(1)/rebuild
- $(MAKE) -C linux-$(1) KERNEL="$(1)" BOARD="$(2)" rebuild
+ $(MAKE) -C $(2)-$(1) BOARD="$(2)" rebuild
$(1)/$(2)-install:
@$(TRACE) target/linux/linux-$(1)/install
- $(MAKE) -C linux-$(1) KERNEL="$(1)" BOARD="$(2)" install
+ $(MAKE) -C $(2)-$(1) BOARD="$(2)" install
$(1)/$(2)-image: $(1)/$(2)-install
@$(TRACE) target/linux/image/install
diff --git a/target/linux/ar531x-2.4/Makefile b/target/linux/ar531x-2.4/Makefile
new file mode 100644
index 0000000000..989bcc4582
--- /dev/null
+++ b/target/linux/ar531x-2.4/Makefile
@@ -0,0 +1,17 @@
+include $(TOPDIR)/rules.mk
+
+LINUX_VERSION:=2.4.32
+LINUX_RELEASE:=1
+LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
+
+include ../rules.mk
+include ./config
+include ../generic-$(KERNEL)/modules.mk
+include ../kernel.mk
+
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
+ [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE)
+ @cp config $(LINUX_DIR)/.config
+ touch $@
+
diff --git a/target/linux/linux-2.4/config/ar531x b/target/linux/ar531x-2.4/config
index 77c5beb3c2..77c5beb3c2 100644
--- a/target/linux/linux-2.4/config/ar531x
+++ b/target/linux/ar531x-2.4/config
diff --git a/target/linux/linux-2.4/patches/ar531x/000-atheros-support.patch b/target/linux/ar531x-2.4/patches/000-atheros-support.patch
index de7115b46a..de7115b46a 100644
--- a/target/linux/linux-2.4/patches/ar531x/000-atheros-support.patch
+++ b/target/linux/ar531x-2.4/patches/000-atheros-support.patch
diff --git a/target/linux/linux-2.4/ar7.mk b/target/linux/ar7-2.4/Makefile
index f562f15d66..daa734107d 100644
--- a/target/linux/linux-2.4/ar7.mk
+++ b/target/linux/ar7-2.4/Makefile
@@ -1,13 +1,48 @@
-#############################################################
-# $Id$
-#
-# Makefile for the AR7-specific kernel/driver stuff
-#
-#############################################################
+include $(TOPDIR)/rules.mk
+
+LINUX_VERSION:=2.4.32
+LINUX_RELEASE:=1
+LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
+
+include ../rules.mk
+include ./config
+
+ATM_FIRMWARE_VERSION:=0.4
+ATM_FIRMWARE_DIR=sangam-atm-firmware-$(ATM_FIRMWARE_VERSION)
+
+$(eval $(call KMOD_template,SANGAM_ATM_A,sangam-atm-annex-a,\
+ $(MODULES_DIR)/kernel/drivers/atm/tiatm.o \
+,CONFIG_MIPS_SANGAM_ATM,kmod-atm,60,tiatm, \
+ cp $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_a.bin $$(I_SANGAM_ATM_A)/lib/modules/ar0700xx.bin \
+))
+
+$(eval $(call KMOD_template,SANGAM_ATM_B,sangam-atm-annex-b,\
+ $(MODULES_DIR)/kernel/drivers/atm/tiatm.o \
+,CONFIG_MIPS_SANGAM_ATM,kmod-atm,60,tiatm, \
+ cp $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_b.bin $$(I_SANGAM_ATM_B)/lib/modules/ar0700xx.bin \
+))
+
+$(eval $(call KMOD_template,CPMAC,cpmac,\
+ $(MODULES_DIR)/kernel/drivers/net/avalanche_cpmac/avalanche_cpmac.o \
+,CONFIG_MIPS_AVALANCHE_CPMAC,,10,avalanche_cpmac))
+
+include ../generic-$(KERNEL)/modules.mk
+include ../kernel.mk
+
+
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
+ [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE)
+ @cp config $(LINUX_DIR)/.config
+ touch $@
+
+
+###############################################
+# ATM firmware for the DSL modem
+###############################################
DOWNLOAD_SITE=http://openwrt.org/downloads/sources
# extracted from netgear DG834B V1.0.5 GPL release
-ATM_FIRMWARE_DIR=sangam-atm-firmware-0.4
ATM_FIRMWARE_FILE=$(ATM_FIRMWARE_DIR).tar.gz
ATM_FIRMWARE_MD5SUM=8bfcb31109796502d66b11baaeb2fba6
@@ -29,19 +64,3 @@ drivers-clean:
rm -rf $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)
-$(eval $(call KMOD_template,SANGAM_ATM_A,sangam-atm-annex-a,\
- $(MODULES_DIR)/kernel/drivers/atm/tiatm.o \
-,CONFIG_MIPS_SANGAM_ATM,kmod-atm,60,tiatm, \
- cp $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_a.bin $$(I_SANGAM_ATM_A)/lib/modules/ar0700xx.bin \
-))
-
-$(eval $(call KMOD_template,SANGAM_ATM_B,sangam-atm-annex-b,\
- $(MODULES_DIR)/kernel/drivers/atm/tiatm.o \
-,CONFIG_MIPS_SANGAM_ATM,kmod-atm,60,tiatm, \
- cp $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_b.bin $$(I_SANGAM_ATM_B)/lib/modules/ar0700xx.bin \
-))
-
-$(eval $(call KMOD_template,CPMAC,cpmac,\
- $(MODULES_DIR)/kernel/drivers/net/avalanche_cpmac/avalanche_cpmac.o \
-,CONFIG_MIPS_AVALANCHE_CPMAC,,10,avalanche_cpmac))
-
diff --git a/target/linux/linux-2.4/config/ar7 b/target/linux/ar7-2.4/config
index fb4ede0903..fb4ede0903 100644
--- a/target/linux/linux-2.4/config/ar7
+++ b/target/linux/ar7-2.4/config
diff --git a/target/linux/linux-2.4/patches/ar7/000-ar7_support.patch b/target/linux/ar7-2.4/patches/000-ar7_support.patch
index 0c9c0d3028..0c9c0d3028 100644
--- a/target/linux/linux-2.4/patches/ar7/000-ar7_support.patch
+++ b/target/linux/ar7-2.4/patches/000-ar7_support.patch
diff --git a/target/linux/linux-2.4/patches/ar7/001-flash_map.patch b/target/linux/ar7-2.4/patches/001-flash_map.patch
index 83bc103bef..83bc103bef 100644
--- a/target/linux/linux-2.4/patches/ar7/001-flash_map.patch
+++ b/target/linux/ar7-2.4/patches/001-flash_map.patch
diff --git a/target/linux/linux-2.4/patches/ar7/002-led_driver.patch b/target/linux/ar7-2.4/patches/002-led_driver.patch
index 81fe153cc3..81fe153cc3 100644
--- a/target/linux/linux-2.4/patches/ar7/002-led_driver.patch
+++ b/target/linux/ar7-2.4/patches/002-led_driver.patch
diff --git a/target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch b/target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch
index 42b64584da..42b64584da 100644
--- a/target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch
+++ b/target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch
diff --git a/target/linux/linux-2.4/patches/ar7/004-atm_driver.patch b/target/linux/ar7-2.4/patches/004-atm_driver.patch
index f6a920853a..f6a920853a 100644
--- a/target/linux/linux-2.4/patches/ar7/004-atm_driver.patch
+++ b/target/linux/ar7-2.4/patches/004-atm_driver.patch
diff --git a/target/linux/linux-2.4/patches/ar7/005-wdt_driver.patch b/target/linux/ar7-2.4/patches/005-wdt_driver.patch
index 9b01a353da..9b01a353da 100644
--- a/target/linux/linux-2.4/patches/ar7/005-wdt_driver.patch
+++ b/target/linux/ar7-2.4/patches/005-wdt_driver.patch
diff --git a/target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch b/target/linux/ar7-2.4/patches/006-sched_use_tsc.patch
index 5b64310738..5b64310738 100644
--- a/target/linux/linux-2.4/patches/ar7/006-sched_use_tsc.patch
+++ b/target/linux/ar7-2.4/patches/006-sched_use_tsc.patch
diff --git a/target/linux/brcm-2.4/Config.in b/target/linux/brcm-2.4/Config.in
new file mode 100644
index 0000000000..c344a97e81
--- /dev/null
+++ b/target/linux/brcm-2.4/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_KMOD_BRCM_WL
+ prompt "kmod-brcm-wl...................... Broadcom Wireless Network Driver"
+ tristate
+ depends BR2_LINUX_2_4_BRCM
+ default y
+ help
+ Proprietary driver for Broadcom Wireless chipsets
+
+config BR2_PACKAGE_KMOD_BRCM_WL2
+ prompt "kmod-brcm-wl2..................... Broadcom Wireless Network Driver (new)"
+ tristate
+ depends BR2_LINUX_2_4_BRCM
+ default m
+ help
+ Proprietary driver for Broadcom Wireless chipsets
+ New version with Multi-BSS capability
+
+
diff --git a/target/linux/linux-2.4/broadcom.mk b/target/linux/brcm-2.4/Makefile
index ffd118edea..435b542df3 100644
--- a/target/linux/linux-2.4/broadcom.mk
+++ b/target/linux/brcm-2.4/Makefile
@@ -1,9 +1,11 @@
-#############################################################
-# $Id$
-#
-# Makefile for the proprietary Broadcom drivers
-#
-#############################################################
+include $(TOPDIR)/rules.mk
+
+LINUX_VERSION:=2.4.32
+LINUX_RELEASE:=1
+LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
+
+include ../rules.mk
+include ./config
# broadcom specific kmod packages
$(eval $(call KMOD_template,BRCM_WL,brcm-wl,\
@@ -14,10 +16,6 @@ $(eval $(call KMOD_template,BRCM_WL2,brcm-wl2,\
$(BUILD_DIR)/wl/wl2/wl.o \
,CONFIG_WL,,20,wl))
-$(eval $(call KMOD_template,BRCM_ET,brcm-et,\
- $(MODULES_DIR)/kernel/drivers/net/et/et.o \
-,CONFIG_ET,,10,et))
-
$(eval $(call KMOD_template,LP,lp,\
$(MODULES_DIR)/kernel/drivers/parport/parport.o \
$(MODULES_DIR)/kernel/drivers/parport/parport_splink.o \
@@ -25,20 +23,30 @@ $(eval $(call KMOD_template,LP,lp,\
$(MODULES_DIR)/kernel/drivers/char/ppdev.o \
,CONFIG_PARPORT,,50,parport parport_splink lp))
+include ../generic-$(KERNEL)/modules.mk
+include ../kernel.mk
+
+
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
+ [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE)
+ @cp config $(LINUX_DIR)/.config
+ touch $@
+
+
+###############################################
+# Proprietary driver for BCM43xx
+###############################################
+
LINUX_BINARY_DRIVER_SITE=http://openwrt.org/downloads/sources
# proprietary driver, extracted from Linksys GPL sourcetree WRT54GS 4.70.6
LINUX_BINARY_WL_DRIVER=kernel-binary-wl-0.5.tar.gz
LINUX_BINARY_WL_MD5SUM=78e839842bdc04022bb44469f92b1131
-LINUX_ET_DRIVER=kernel-source-et-0.13.tar.gz
-LINUX_ET_MD5SUM=b2072f26a4f25a7d6bc2669c4fe6419d
$(DL_DIR)/$(LINUX_BINARY_WL_DRIVER):
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_BINARY_WL_DRIVER) $(LINUX_BINARY_WL_MD5SUM) $(LINUX_BINARY_DRIVER_SITE) $(MAKE_TRACE)
-
-$(DL_DIR)/$(LINUX_ET_DRIVER):
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_ET_DRIVER) $(LINUX_ET_MD5SUM) $(LINUX_BINARY_DRIVER_SITE) $(MAKE_TRACE)
-$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) $(DL_DIR)/$(LINUX_ET_DRIVER)
+$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER)
$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.drivers-unpacked
$(LINUX_DIR)/.modules_done: $(LINUX_DIR)/.drivers-unpacked
$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.drivers-installed
@@ -48,12 +56,8 @@ $(LINUX_DIR)/.drivers-unpacked: $(LINUX_DIR)/.unpacked
zcat $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
zcat $(DL_DIR)/$(LINUX_ET_DRIVER) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
# copy binary wlan driver
- mkdir -p $(LINUX_DIR)/drivers/net/{et,wl}
+ mkdir -p $(LINUX_DIR)/drivers/net/wl
cp -fpR $(BUILD_DIR)/wl/*.o $(LINUX_DIR)/drivers/net/wl
- # copy proprietary et source
- cp -fpR $(BUILD_DIR)/et/* $(LINUX_DIR)/drivers/net/et
- mkdir -p $(LINUX_DIR)/arch/mips/bcm947xx/include/
- cp -fpR $(BUILD_DIR)/et/*.h $(LINUX_DIR)/arch/mips/bcm947xx/include/
touch $@
$(LINUX_DIR)/.drivers-installed: $(LINUX_DIR)/.modules_done
@@ -64,4 +68,4 @@ $(LINUX_DIR)/.drivers-installed: $(LINUX_DIR)/.modules_done
linux-dirclean: drivers-clean
drivers-clean:
- rm -rf $(BUILD_DIR)/{wl,et}
+ rm -rf $(BUILD_DIR)/wl
diff --git a/target/linux/linux-2.4/config/brcm b/target/linux/brcm-2.4/config
index 0bfc6b46f2..26d9cd102a 100644
--- a/target/linux/linux-2.4/config/brcm
+++ b/target/linux/brcm-2.4/config
@@ -763,7 +763,6 @@ CONFIG_NET_PCI=y
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_APRICOT is not set
CONFIG_B44=y
-CONFIG_ET=m
# CONFIG_CS89x0 is not set
# CONFIG_TULIP is not set
# CONFIG_DE4X5 is not set
diff --git a/target/linux/linux-2.4/patches/brcm/001-bcm47xx.patch b/target/linux/brcm-2.4/patches/001-bcm47xx.patch
index e616893e9e..9d919156b6 100644
--- a/target/linux/linux-2.4/patches/brcm/001-bcm47xx.patch
+++ b/target/linux/brcm-2.4/patches/001-bcm47xx.patch
@@ -14673,39 +14673,6 @@ diff -Nur linux-2.4.32/drivers/net/Config.in linux-2.4.32-brcm/drivers/net/Confi
source drivers/net/arcnet/Config.in
tristate 'Dummy net driver support' CONFIG_DUMMY
-@@ -173,6 +175,7 @@
-
- dep_tristate ' Apricot Xen-II on board Ethernet' CONFIG_APRICOT $CONFIG_ISA
- dep_tristate ' Broadcom 4400 ethernet support (EXPERIMENTAL)' CONFIG_B44 $CONFIG_PCI $CONFIG_EXPERIMENTAL
-+ dep_tristate ' Proprietary Broadcom 10/100 Ethernet support' CONFIG_ET $CONFIG_PCI
- dep_tristate ' CS89x0 support' CONFIG_CS89x0 $CONFIG_ISA
- dep_tristate ' DECchip Tulip (dc21x4x) PCI support' CONFIG_TULIP $CONFIG_PCI
- if [ "$CONFIG_TULIP" = "y" -o "$CONFIG_TULIP" = "m" ]; then
-diff -Nur linux-2.4.32/drivers/net/et/Makefile linux-2.4.32-brcm/drivers/net/et/Makefile
---- linux-2.4.32/drivers/net/et/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.32-brcm/drivers/net/et/Makefile 2005-12-16 23:39:11.284858000 +0100
-@@ -0,0 +1,21 @@
-+#
-+# Makefile for the Broadcom et driver
-+#
-+# Copyright 2004, Broadcom Corporation
-+# All Rights Reserved.
-+#
-+# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
-+# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
-+# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
-+# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
-+#
-+# $Id: Makefile,v 1.1 2005/03/16 13:50:00 wbx Exp $
-+#
-+
-+EXTRA_CFLAGS := -I$(TOPDIR)/arch/mips/bcm947xx/include -DBCM47XX_CHOPS -DDMA -DBCMDRIVER
-+
-+O_TARGET := et.o
-+obj-y := et_linux.o etc.o etc47xx.o etc_robo.o etc_adm.o
-+obj-m := $(O_TARGET)
-+
-+include $(TOPDIR)/Rules.make
diff -Nur linux-2.4.32/drivers/net/hnd/bcmsrom.c linux-2.4.32-brcm/drivers/net/hnd/bcmsrom.c
--- linux-2.4.32/drivers/net/hnd/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.4.32-brcm/drivers/net/hnd/bcmsrom.c 2005-12-16 23:39:11.284858000 +0100
@@ -21875,26 +21842,22 @@ diff -Nur linux-2.4.32/drivers/net/Makefile linux-2.4.32-brcm/drivers/net/Makefi
obj-y :=
obj-m :=
obj-n :=
-@@ -39,6 +41,9 @@
+@@ -39,6 +41,8 @@
obj-$(CONFIG_ISDN) += slhc.o
endif
+subdir-$(CONFIG_HND) += hnd
-+subdir-$(CONFIG_ET) += et
+subdir-$(CONFIG_WL) += wl
subdir-$(CONFIG_NET_PCMCIA) += pcmcia
subdir-$(CONFIG_NET_WIRELESS) += wireless
subdir-$(CONFIG_TULIP) += tulip
-@@ -69,6 +74,16 @@
+@@ -69,6 +74,13 @@
obj-$(CONFIG_MYRI_SBUS) += myri_sbus.o
obj-$(CONFIG_SUNGEM) += sungem.o
+ifeq ($(CONFIG_HND),y)
+ obj-y += hnd/hnd.o
+endif
-+ifeq ($(CONFIG_ET),y)
-+ obj-y += et/et.o
-+endif
+ifeq ($(CONFIG_WL),y)
+ obj-y += wl/wl.o
+endif
@@ -21902,14 +21865,6 @@ diff -Nur linux-2.4.32/drivers/net/Makefile linux-2.4.32-brcm/drivers/net/Makefi
obj-$(CONFIG_MACE) += mace.o
obj-$(CONFIG_BMAC) += bmac.o
obj-$(CONFIG_GMAC) += gmac.o
-@@ -265,6 +280,7 @@
- endif
- endif
-
-+
- include $(TOPDIR)/Rules.make
-
- clean:
diff -Nur linux-2.4.32/drivers/net/wireless/Config.in linux-2.4.32-brcm/drivers/net/wireless/Config.in
--- linux-2.4.32/drivers/net/wireless/Config.in 2004-11-17 12:54:21.000000000 +0100
+++ linux-2.4.32-brcm/drivers/net/wireless/Config.in 2005-12-16 23:39:11.364863000 +0100
diff --git a/target/linux/linux-2.4/patches/brcm/002-wl_fix.patch b/target/linux/brcm-2.4/patches/002-wl_fix.patch
index ffb82aad35..ffb82aad35 100644
--- a/target/linux/linux-2.4/patches/brcm/002-wl_fix.patch
+++ b/target/linux/brcm-2.4/patches/002-wl_fix.patch
diff --git a/target/linux/linux-2.4/patches/brcm/003-bcm47xx_cache_fixes.patch b/target/linux/brcm-2.4/patches/003-bcm47xx_cache_fixes.patch
index e971e7fdfd..e971e7fdfd 100644
--- a/target/linux/linux-2.4/patches/brcm/003-bcm47xx_cache_fixes.patch
+++ b/target/linux/brcm-2.4/patches/003-bcm47xx_cache_fixes.patch
diff --git a/target/linux/linux-2.4/patches/brcm/004-flash-map.patch b/target/linux/brcm-2.4/patches/004-flash-map.patch
index 06c106bdf0..06c106bdf0 100644
--- a/target/linux/linux-2.4/patches/brcm/004-flash-map.patch
+++ b/target/linux/brcm-2.4/patches/004-flash-map.patch
diff --git a/target/linux/linux-2.4/patches/brcm/005-bluetooth_sco_buffer_align.patch b/target/linux/brcm-2.4/patches/005-bluetooth_sco_buffer_align.patch
index 77ade1c8b2..77ade1c8b2 100644
--- a/target/linux/linux-2.4/patches/brcm/005-bluetooth_sco_buffer_align.patch
+++ b/target/linux/brcm-2.4/patches/005-bluetooth_sco_buffer_align.patch
diff --git a/target/linux/linux-2.4/patches/brcm/006-ide_workaround.patch b/target/linux/brcm-2.4/patches/006-ide_workaround.patch
index 9f8d2ee29d..9f8d2ee29d 100644
--- a/target/linux/linux-2.4/patches/brcm/006-ide_workaround.patch
+++ b/target/linux/brcm-2.4/patches/006-ide_workaround.patch
diff --git a/target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch b/target/linux/brcm-2.4/patches/007-sched_use_tsc.patch
index 5b64310738..5b64310738 100644
--- a/target/linux/linux-2.4/patches/brcm/007-sched_use_tsc.patch
+++ b/target/linux/brcm-2.4/patches/007-sched_use_tsc.patch
diff --git a/target/linux/brcm-2.6/Makefile b/target/linux/brcm-2.6/Makefile
new file mode 100644
index 0000000000..02ed5c49d4
--- /dev/null
+++ b/target/linux/brcm-2.6/Makefile
@@ -0,0 +1,19 @@
+include $(TOPDIR)/rules.mk
+
+LINUX_VERSION:=2.6.15
+LINUX_RELEASE:=1
+LINUX_KERNEL_MD5SUM:=cdf95e00f5111e31f78e1d97304d9522
+
+include ../rules.mk
+include ./config
+
+include ../generic-$(KERNEL)/modules.mk
+include ../kernel.mk
+
+
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
+ [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE)
+ @cp config $(LINUX_DIR)/.config
+ touch $@
+
diff --git a/target/linux/linux-2.6/config/brcm b/target/linux/brcm-2.6/config
index fc4234343a..fc4234343a 100644
--- a/target/linux/linux-2.6/config/brcm
+++ b/target/linux/brcm-2.6/config
diff --git a/target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch b/target/linux/brcm-2.6/patches/001-bcm947xx.patch
index 739590b1cf..739590b1cf 100644
--- a/target/linux/linux-2.6/patches/brcm/001-bcm947xx.patch
+++ b/target/linux/brcm-2.6/patches/001-bcm947xx.patch
diff --git a/target/linux/linux-2.6/patches/brcm/002-flash-map.patch b/target/linux/brcm-2.6/patches/002-flash-map.patch
index b8aeafa602..b8aeafa602 100644
--- a/target/linux/linux-2.6/patches/brcm/002-flash-map.patch
+++ b/target/linux/brcm-2.6/patches/002-flash-map.patch
diff --git a/target/linux/linux-2.6/patches/brcm/003-bcm4710_cache_fixes.patch b/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch
index 76e90584d9..76e90584d9 100644
--- a/target/linux/linux-2.6/patches/brcm/003-bcm4710_cache_fixes.patch
+++ b/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch
diff --git a/target/linux/linux-2.4/README b/target/linux/generic-2.4/README
index 15d95232d7..15d95232d7 100644
--- a/target/linux/linux-2.4/README
+++ b/target/linux/generic-2.4/README
diff --git a/target/linux/linux-2.4/Makefile b/target/linux/generic-2.4/modules.mk
index 3d668fa95e..6aea74203b 100644
--- a/target/linux/linux-2.4/Makefile
+++ b/target/linux/generic-2.4/modules.mk
@@ -1,55 +1,3 @@
-# $Id$
-# Linux 2.4 kernel target for the OpenWRT project
-
-include $(TOPDIR)/rules.mk
-include ../rules.mk
-
-KERNEL:=2.4
-LINUX_VERSION:=2.4.32
-MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
-LINUX_KCONFIG:=./config/$(BOARD)
-LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-2.4-$(BOARD)
-LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root
-LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux
-
-LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/sources/
-LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2
-LINUX_SOURCE_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)
-MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
-TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/lib/modules/$(LINUX_VERSION)
-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
-
-PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
-PKG_RELEASE := 2
-
-KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)_$(ARCH).ipk
-KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
-
-KPKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \
- BOARD="$(BOARD)" \
- TARGET_DIR="$(LINUX_TARGET_DIR)" \
- BUILD_DIR="$(LINUX_BUILD_DIR)" \
- KERNEL_DIR="$(LINUX_SOURCE_DIR)" \
- LINUX_VERSION="$(LINUX_VERSION)" \
- KERNEL_RELEASE="$(PKG_RELEASE)"
-
-include $(LINUX_KCONFIG)
-
-INSTALL_TARGETS := $(KERNEL_IPKG)
-TARGETS :=
-
-ifeq ($(BOARD),brcm)
-include ./broadcom.mk
-endif
-
-ifeq ($(BOARD),x86)
-include ./x86.mk
-endif
-
-ifeq ($(BOARD),ar7)
-include ./ar7.mk
-endif
-
include ../netfilter.mk
# Networking
@@ -374,105 +322,4 @@ $(eval $(call KMOD_template,SOFTDOG,softdog,\
,CONFIG_SOFT_WATCHDOG,,95,softdog))
-$(TARGETS): $(PACKAGE_DIR)
-
-$(PACKAGE_DIR):
- mkdir -p $(PACKAGE_DIR)
-
-$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
- -mkdir -p $(LINUX_BUILD_DIR)
- bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
- rm -f $(LINUX_DIR)
- ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
- touch $(LINUX_DIR)/.unpacked
-
-$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
- $(PATCH) $(LINUX_DIR) ./patches/generic $(MAKE_TRACE)
- [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) $(MAKE_TRACE)
- touch $(LINUX_DIR)/.patched
-
-$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
- -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
- $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
- $(LINUX_DIR)/Makefile \
- $(LINUX_DIR)/arch/*/Makefile
- $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
- $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h $(MAKE_TRACE)
- touch $(LINUX_DIR)/.configured
-
-$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
- $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) dep $(MAKE_TRACE)
- touch $(LINUX_DIR)/.depend_done
-
-$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done
- $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(MAKE_TRACE)
-
-$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
- $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ $(MAKE_TRACE)
- touch -c $(LINUX_KERNEL)
-
-$(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE)
- rm -rf $(LINUX_BUILD_DIR)/modules
- $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) modules $(MAKE_TRACE)
- $(MAKE) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE)
- touch $(LINUX_DIR)/.modules_done
-
-$(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
- mkdir -p $(STAGING_DIR)/include
- tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
- tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
-
-$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
- @mkdir -p $(STAMP_DIR)
- @$(MAKE) $(TARGETS)
- ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
- @$(TRACE) target/linux/package
- $(MAKE) -C $(TOPDIR)/target/linux/package \
- $(KPKG_MAKEOPTS) \
- compile
- touch $@
-
-$(TARGET_MODULES_DIR):
- -mkdir -p $(TARGET_MODULES_DIR)
-
-$(KERNEL_IPKG):
- rm -rf $(KERNEL_IDIR)
- mkdir -p $(KERNEL_IDIR)/etc
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) $(ARCH)
- if [ -f ./config/$(BOARD).modules ]; then \
- cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
- fi
- $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE)
-
-source: $(DL_DIR)/$(LINUX_SOURCE)
-prepare: $(LINUX_DIR)/.configured
-compile:
- $(MAKE) $(STAMP_DIR)/.linux-compile $(MAKE_TRACE)
-
-install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
- rm -rf $(LINUX_BUILD_DIR)/root*
- cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
- echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
- $(MAKE) -C $(TOPDIR)/target/linux/package \
- $(KPKG_MAKEOPTS) \
- install
- @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE)
-
-mostlyclean:
- rm -f $(STAMP_DIR)/.linux-compile
- rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
- rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
- $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE_TRACE)
- rm -f $(LINUX_KERNEL) $(LINUX_IMAGE)
-
-rebuild:
- -$(MAKE) mostlyclean
- if [ -f $(LINUX_KERNEL) ]; then \
- $(MAKE) clean $(MAKE_TRACE); \
- fi
- $(MAKE) compile $(MAKE_TRACE)
-
-clean:
- rm -f $(STAMP_DIR)/.linux-compile
- rm -rf $(LINUX_BUILD_DIR)
- rm -f $(TARGETS)
+
diff --git a/target/linux/linux-2.4/patches/generic/000-linux_mips.patch b/target/linux/generic-2.4/patches/000-linux_mips.patch
index 7fae1eefc6..7fae1eefc6 100644
--- a/target/linux/linux-2.4/patches/generic/000-linux_mips.patch
+++ b/target/linux/generic-2.4/patches/000-linux_mips.patch
diff --git a/target/linux/linux-2.4/patches/generic/001-squashfs.patch b/target/linux/generic-2.4/patches/001-squashfs.patch
index ae6420a383..ae6420a383 100644
--- a/target/linux/linux-2.4/patches/generic/001-squashfs.patch
+++ b/target/linux/generic-2.4/patches/001-squashfs.patch
diff --git a/target/linux/linux-2.4/patches/generic/002-squashfs_lzma.patch b/target/linux/generic-2.4/patches/002-squashfs_lzma.patch
index 570dce99b7..570dce99b7 100644
--- a/target/linux/linux-2.4/patches/generic/002-squashfs_lzma.patch
+++ b/target/linux/generic-2.4/patches/002-squashfs_lzma.patch
diff --git a/target/linux/linux-2.4/patches/generic/003-jffs2_compression.patch b/target/linux/generic-2.4/patches/003-jffs2_compression.patch
index 56c5b3cbc0..56c5b3cbc0 100644
--- a/target/linux/linux-2.4/patches/generic/003-jffs2_compression.patch
+++ b/target/linux/generic-2.4/patches/003-jffs2_compression.patch
diff --git a/target/linux/linux-2.4/patches/generic/004-exec_pagesize.patch b/target/linux/generic-2.4/patches/004-exec_pagesize.patch
index a7b1d04064..a7b1d04064 100644
--- a/target/linux/linux-2.4/patches/generic/004-exec_pagesize.patch
+++ b/target/linux/generic-2.4/patches/004-exec_pagesize.patch
diff --git a/target/linux/linux-2.4/patches/generic/005-mtd_flashtypes.patch b/target/linux/generic-2.4/patches/005-mtd_flashtypes.patch
index 9115b9f611..9115b9f611 100644
--- a/target/linux/linux-2.4/patches/generic/005-mtd_flashtypes.patch
+++ b/target/linux/generic-2.4/patches/005-mtd_flashtypes.patch
diff --git a/target/linux/linux-2.4/patches/generic/006-gcc4_fixes.patch b/target/linux/generic-2.4/patches/006-gcc4_fixes.patch
index 4034d1b48b..4034d1b48b 100644
--- a/target/linux/linux-2.4/patches/generic/006-gcc4_fixes.patch
+++ b/target/linux/generic-2.4/patches/006-gcc4_fixes.patch
diff --git a/target/linux/linux-2.4/patches/generic/007-more_gcc4_fixes.patch b/target/linux/generic-2.4/patches/007-more_gcc4_fixes.patch
index b234c7028c..b234c7028c 100644
--- a/target/linux/linux-2.4/patches/generic/007-more_gcc4_fixes.patch
+++ b/target/linux/generic-2.4/patches/007-more_gcc4_fixes.patch
diff --git a/target/linux/linux-2.4/patches/generic/050-build_flags.patch b/target/linux/generic-2.4/patches/050-build_flags.patch
index 14a207df23..14a207df23 100644
--- a/target/linux/linux-2.4/patches/generic/050-build_flags.patch
+++ b/target/linux/generic-2.4/patches/050-build_flags.patch
diff --git a/target/linux/linux-2.4/patches/generic/106-mppe_mppc.patch b/target/linux/generic-2.4/patches/106-mppe_mppc.patch
index 382b4623f2..382b4623f2 100644
--- a/target/linux/linux-2.4/patches/generic/106-mppe_mppc.patch
+++ b/target/linux/generic-2.4/patches/106-mppe_mppc.patch
diff --git a/target/linux/linux-2.4/patches/generic/107-cifs.patch b/target/linux/generic-2.4/patches/107-cifs.patch
index bdccf4de9f..bdccf4de9f 100644
--- a/target/linux/linux-2.4/patches/generic/107-cifs.patch
+++ b/target/linux/generic-2.4/patches/107-cifs.patch
diff --git a/target/linux/linux-2.4/patches/generic/108-optional_aout_support.patch b/target/linux/generic-2.4/patches/108-optional_aout_support.patch
index 56dc1991cf..56dc1991cf 100644
--- a/target/linux/linux-2.4/patches/generic/108-optional_aout_support.patch
+++ b/target/linux/generic-2.4/patches/108-optional_aout_support.patch
diff --git a/target/linux/linux-2.4/patches/generic/109-ipsec_nat_traversal.patch b/target/linux/generic-2.4/patches/109-ipsec_nat_traversal.patch
index fc4c29d27e..fc4c29d27e 100644
--- a/target/linux/linux-2.4/patches/generic/109-ipsec_nat_traversal.patch
+++ b/target/linux/generic-2.4/patches/109-ipsec_nat_traversal.patch
diff --git a/target/linux/linux-2.4/patches/generic/110-netdev_random_core.patch b/target/linux/generic-2.4/patches/110-netdev_random_core.patch
index 784b65e41c..784b65e41c 100644
--- a/target/linux/linux-2.4/patches/generic/110-netdev_random_core.patch
+++ b/target/linux/generic-2.4/patches/110-netdev_random_core.patch
diff --git a/target/linux/linux-2.4/patches/generic/112-bridging_performance.patch b/target/linux/generic-2.4/patches/112-bridging_performance.patch
index c5d86349d4..c5d86349d4 100644
--- a/target/linux/linux-2.4/patches/generic/112-bridging_performance.patch
+++ b/target/linux/generic-2.4/patches/112-bridging_performance.patch
diff --git a/target/linux/linux-2.4/patches/generic/113-even_more_gcc4_stuff.patch b/target/linux/generic-2.4/patches/113-even_more_gcc4_stuff.patch
index 1b98717882..1b98717882 100644
--- a/target/linux/linux-2.4/patches/generic/113-even_more_gcc4_stuff.patch
+++ b/target/linux/generic-2.4/patches/113-even_more_gcc4_stuff.patch
diff --git a/target/linux/linux-2.4/patches/generic/200-i4l.patch b/target/linux/generic-2.4/patches/200-i4l.patch
index c9833e2a30..c9833e2a30 100644
--- a/target/linux/linux-2.4/patches/generic/200-i4l.patch
+++ b/target/linux/generic-2.4/patches/200-i4l.patch
diff --git a/target/linux/linux-2.4/patches/generic/201-hfc_usb_backport.patch b/target/linux/generic-2.4/patches/201-hfc_usb_backport.patch
index 4ef20fa8ba..4ef20fa8ba 100644
--- a/target/linux/linux-2.4/patches/generic/201-hfc_usb_backport.patch
+++ b/target/linux/generic-2.4/patches/201-hfc_usb_backport.patch
diff --git a/target/linux/linux-2.4/patches/generic/202-pl2303_backport.patch b/target/linux/generic-2.4/patches/202-pl2303_backport.patch
index f889ad2964..f889ad2964 100644
--- a/target/linux/linux-2.4/patches/generic/202-pl2303_backport.patch
+++ b/target/linux/generic-2.4/patches/202-pl2303_backport.patch
diff --git a/target/linux/linux-2.4/patches/generic/203-hfsplus_fix.patch b/target/linux/generic-2.4/patches/203-hfsplus_fix.patch
index 695a2d36b5..695a2d36b5 100644
--- a/target/linux/linux-2.4/patches/generic/203-hfsplus_fix.patch
+++ b/target/linux/generic-2.4/patches/203-hfsplus_fix.patch
diff --git a/target/linux/linux-2.4/patches/generic/204-net_b44.patch b/target/linux/generic-2.4/patches/204-net_b44.patch
index 300bacd004..300bacd004 100644
--- a/target/linux/linux-2.4/patches/generic/204-net_b44.patch
+++ b/target/linux/generic-2.4/patches/204-net_b44.patch
diff --git a/target/linux/linux-2.4/patches/generic/206-gcc_3.4_fixes.patch b/target/linux/generic-2.4/patches/206-gcc_3.4_fixes.patch
index 9cf055346a..9cf055346a 100644
--- a/target/linux/linux-2.4/patches/generic/206-gcc_3.4_fixes.patch
+++ b/target/linux/generic-2.4/patches/206-gcc_3.4_fixes.patch
diff --git a/target/linux/linux-2.4/patches/generic/208-usb2_fix.patch b/target/linux/generic-2.4/patches/208-usb2_fix.patch
index f8e5be12c1..f8e5be12c1 100644
--- a/target/linux/linux-2.4/patches/generic/208-usb2_fix.patch
+++ b/target/linux/generic-2.4/patches/208-usb2_fix.patch
diff --git a/target/linux/linux-2.4/patches/generic/209-build_fixes.patch b/target/linux/generic-2.4/patches/209-build_fixes.patch
index 235ee042a5..235ee042a5 100644
--- a/target/linux/linux-2.4/patches/generic/209-build_fixes.patch
+++ b/target/linux/generic-2.4/patches/209-build_fixes.patch
diff --git a/target/linux/linux-2.4/patches/generic/210-fix-irq-serial.patch b/target/linux/generic-2.4/patches/210-fix-irq-serial.patch
index 630dc04977..630dc04977 100644
--- a/target/linux/linux-2.4/patches/generic/210-fix-irq-serial.patch
+++ b/target/linux/generic-2.4/patches/210-fix-irq-serial.patch
diff --git a/target/linux/linux-2.4/patches/generic/212-htb_time_fix.patch b/target/linux/generic-2.4/patches/212-htb_time_fix.patch
index 7281093b02..7281093b02 100644
--- a/target/linux/linux-2.4/patches/generic/212-htb_time_fix.patch
+++ b/target/linux/generic-2.4/patches/212-htb_time_fix.patch
diff --git a/target/linux/linux-2.4/patches/generic/213-htb_disable_hysteresis.patch b/target/linux/generic-2.4/patches/213-htb_disable_hysteresis.patch
index 5d0ff92662..5d0ff92662 100644
--- a/target/linux/linux-2.4/patches/generic/213-htb_disable_hysteresis.patch
+++ b/target/linux/generic-2.4/patches/213-htb_disable_hysteresis.patch
diff --git a/target/linux/linux-2.4/patches/generic/222-sound.patch b/target/linux/generic-2.4/patches/222-sound.patch
index 351e8c2072..351e8c2072 100644
--- a/target/linux/linux-2.4/patches/generic/222-sound.patch
+++ b/target/linux/generic-2.4/patches/222-sound.patch
diff --git a/target/linux/linux-2.4/patches/generic/223-pf_ring.patch b/target/linux/generic-2.4/patches/223-pf_ring.patch
index 1235e10445..1235e10445 100644
--- a/target/linux/linux-2.4/patches/generic/223-pf_ring.patch
+++ b/target/linux/generic-2.4/patches/223-pf_ring.patch
diff --git a/target/linux/linux-2.4/patches/generic/224-atm_hotplug.patch b/target/linux/generic-2.4/patches/224-atm_hotplug.patch
index c431d8c6bc..c431d8c6bc 100644
--- a/target/linux/linux-2.4/patches/generic/224-atm_hotplug.patch
+++ b/target/linux/generic-2.4/patches/224-atm_hotplug.patch
diff --git a/target/linux/linux-2.4/patches/generic/601-netfilter_ipp2p.patch b/target/linux/generic-2.4/patches/601-netfilter_ipp2p.patch
index 1314ae4fec..1314ae4fec 100644
--- a/target/linux/linux-2.4/patches/generic/601-netfilter_ipp2p.patch
+++ b/target/linux/generic-2.4/patches/601-netfilter_ipp2p.patch
diff --git a/target/linux/linux-2.4/patches/generic/602-netfilter_layer7_1.5nbd.patch b/target/linux/generic-2.4/patches/602-netfilter_layer7_1.5nbd.patch
index 1b0e11a11e..1b0e11a11e 100644
--- a/target/linux/linux-2.4/patches/generic/602-netfilter_layer7_1.5nbd.patch
+++ b/target/linux/generic-2.4/patches/602-netfilter_layer7_1.5nbd.patch
diff --git a/target/linux/linux-2.4/patches/generic/603-netfilter_nat_pptp.patch b/target/linux/generic-2.4/patches/603-netfilter_nat_pptp.patch
index 6c7d6e6f21..6c7d6e6f21 100644
--- a/target/linux/linux-2.4/patches/generic/603-netfilter_nat_pptp.patch
+++ b/target/linux/generic-2.4/patches/603-netfilter_nat_pptp.patch
diff --git a/target/linux/linux-2.4/patches/generic/604-netfilter_maxconn.patch b/target/linux/generic-2.4/patches/604-netfilter_maxconn.patch
index 001ed67b88..001ed67b88 100644
--- a/target/linux/linux-2.4/patches/generic/604-netfilter_maxconn.patch
+++ b/target/linux/generic-2.4/patches/604-netfilter_maxconn.patch
diff --git a/target/linux/linux-2.4/patches/generic/605-netfilter_TTL.patch b/target/linux/generic-2.4/patches/605-netfilter_TTL.patch
index 0aa3c80432..0aa3c80432 100644
--- a/target/linux/linux-2.4/patches/generic/605-netfilter_TTL.patch
+++ b/target/linux/generic-2.4/patches/605-netfilter_TTL.patch
diff --git a/target/linux/linux-2.4/patches/generic/606-netfilter_NETMAP.patch b/target/linux/generic-2.4/patches/606-netfilter_NETMAP.patch
index ccd639181e..ccd639181e 100644
--- a/target/linux/linux-2.4/patches/generic/606-netfilter_NETMAP.patch
+++ b/target/linux/generic-2.4/patches/606-netfilter_NETMAP.patch
diff --git a/target/linux/linux-2.4/patches/generic/607-netfilter_connmark.patch b/target/linux/generic-2.4/patches/607-netfilter_connmark.patch
index 154314dc41..154314dc41 100644
--- a/target/linux/linux-2.4/patches/generic/607-netfilter_connmark.patch
+++ b/target/linux/generic-2.4/patches/607-netfilter_connmark.patch
diff --git a/target/linux/linux-2.4/patches/generic/608-netfilter_ipset.patch b/target/linux/generic-2.4/patches/608-netfilter_ipset.patch
index 8cf5c694d0..8cf5c694d0 100644
--- a/target/linux/linux-2.4/patches/generic/608-netfilter_ipset.patch
+++ b/target/linux/generic-2.4/patches/608-netfilter_ipset.patch
diff --git a/target/linux/linux-2.4/patches/generic/609-netfilter_string.patch b/target/linux/generic-2.4/patches/609-netfilter_string.patch
index c8e1a2d2de..c8e1a2d2de 100644
--- a/target/linux/linux-2.4/patches/generic/609-netfilter_string.patch
+++ b/target/linux/generic-2.4/patches/609-netfilter_string.patch
diff --git a/target/linux/linux-2.4/patches/generic/610-netfilter_connbytes.patch b/target/linux/generic-2.4/patches/610-netfilter_connbytes.patch
index d9761171c6..d9761171c6 100644
--- a/target/linux/linux-2.4/patches/generic/610-netfilter_connbytes.patch
+++ b/target/linux/generic-2.4/patches/610-netfilter_connbytes.patch
diff --git a/target/linux/linux-2.4/patches/generic/611-netfilter_condition.patch b/target/linux/generic-2.4/patches/611-netfilter_condition.patch
index 6c16c29f0c..6c16c29f0c 100644
--- a/target/linux/linux-2.4/patches/generic/611-netfilter_condition.patch
+++ b/target/linux/generic-2.4/patches/611-netfilter_condition.patch
diff --git a/target/linux/linux-2.4/patches/generic/612-netfilter_quota.patch b/target/linux/generic-2.4/patches/612-netfilter_quota.patch
index a0a019c171..a0a019c171 100644
--- a/target/linux/linux-2.4/patches/generic/612-netfilter_quota.patch
+++ b/target/linux/generic-2.4/patches/612-netfilter_quota.patch
diff --git a/target/linux/linux-2.4/patches/generic/613-netfilter_nat_sip.patch b/target/linux/generic-2.4/patches/613-netfilter_nat_sip.patch
index 4f55935b83..4f55935b83 100644
--- a/target/linux/linux-2.4/patches/generic/613-netfilter_nat_sip.patch
+++ b/target/linux/generic-2.4/patches/613-netfilter_nat_sip.patch
diff --git a/target/linux/linux-2.4/patches/generic/614-netfilter_nat_h323.patch b/target/linux/generic-2.4/patches/614-netfilter_nat_h323.patch
index e5f0dfb342..e5f0dfb342 100644
--- a/target/linux/linux-2.4/patches/generic/614-netfilter_nat_h323.patch
+++ b/target/linux/generic-2.4/patches/614-netfilter_nat_h323.patch
diff --git a/target/linux/linux-2.4/patches/generic/615-netfilter_nat_mms.patch b/target/linux/generic-2.4/patches/615-netfilter_nat_mms.patch
index 14e070a64d..14e070a64d 100644
--- a/target/linux/linux-2.4/patches/generic/615-netfilter_nat_mms.patch
+++ b/target/linux/generic-2.4/patches/615-netfilter_nat_mms.patch
diff --git a/target/linux/linux-2.4/patches/generic/616-netfilter_imq.patch b/target/linux/generic-2.4/patches/616-netfilter_imq.patch
index e2e45af882..e2e45af882 100644
--- a/target/linux/linux-2.4/patches/generic/616-netfilter_imq.patch
+++ b/target/linux/generic-2.4/patches/616-netfilter_imq.patch
diff --git a/target/linux/linux-2.4/patches/generic/617-netfilter_nat_rtsp.patch b/target/linux/generic-2.4/patches/617-netfilter_nat_rtsp.patch
index 28bf664423..28bf664423 100644
--- a/target/linux/linux-2.4/patches/generic/617-netfilter_nat_rtsp.patch
+++ b/target/linux/generic-2.4/patches/617-netfilter_nat_rtsp.patch
diff --git a/target/linux/linux-2.4/patches/generic/618-netfilter_time.patch b/target/linux/generic-2.4/patches/618-netfilter_time.patch
index 3593571b46..3593571b46 100644
--- a/target/linux/linux-2.4/patches/generic/618-netfilter_time.patch
+++ b/target/linux/generic-2.4/patches/618-netfilter_time.patch
diff --git a/target/linux/linux-2.6/Makefile b/target/linux/generic-2.6/modules.mk
index f18e25d47c..f450e4b92d 100644
--- a/target/linux/linux-2.6/Makefile
+++ b/target/linux/generic-2.6/modules.mk
@@ -1,56 +1,3 @@
-# $Id$
-# Linux 2.6 kernel target for the OpenWRT project
-
-include $(TOPDIR)/rules.mk
-include ../rules.mk
-
-KERNEL:=2.6
-LINUX_VERSION:=2.6.15
-LINUX_KERNEL_MD5SUM:=cdf95e00f5111e31f78e1d97304d9522
-LINUX_SITE=http://www.fi.kernel.org/pub/linux/kernel/v2.6 \
- http://www.fr.kernel.org/pub/linux/kernel/v2.6 \
- http://www.kernel.org/pub/linux/kernel/v2.6 \
- http://www.de.kernel.org/pub/linux/kernel/v2.6
-MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
-LINUX_KCONFIG:=./config/$(BOARD)
-LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-2.6-$(BOARD)
-LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root
-LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux
-LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
- -e 's/mipsel/mips/' \
- -e 's/powerpc/ppc/' \
- -e 's/sh[234]/sh/' \
- )
-
-LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2
-LINUX_SOURCE_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)
-MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
-TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/lib/modules/$(LINUX_VERSION)
-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
-
-PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
-PKG_RELEASE := 1
-
-KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)_$(ARCH).ipk
-KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
-
-KPKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \
- BOARD="$(BOARD)" \
- TARGET_DIR="$(LINUX_TARGET_DIR)" \
- BUILD_DIR="$(LINUX_BUILD_DIR)" \
- KERNEL_DIR="$(LINUX_SOURCE_DIR)" \
- LINUX_VERSION="$(LINUX_VERSION)" \
- KERNEL_RELEASE="$(PKG_RELEASE)"
-
-include $(LINUX_KCONFIG)
-
-INSTALL_TARGETS := $(KERNEL_IPKG)
-TARGETS :=
-
-ifeq ($(BOARD),x86)
-include ./x86.mk
-endif
-
include ../netfilter.mk
# Networking
@@ -397,101 +344,3 @@ $(eval $(call KMOD_template,BLUETOOTH,bluetooth,\
,CONFIG_BLUEZ))
-$(TARGETS): $(PACKAGE_DIR)
-
-$(PACKAGE_DIR):
- mkdir -p $(PACKAGE_DIR)
-
-$(DL_DIR)/$(LINUX_SOURCE):
- -mkdir -p $(DL_DIR)
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) $(MAKE_TRACE)
-
-$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
- -mkdir -p $(LINUX_BUILD_DIR)
- bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
- rm -f $(LINUX_DIR)
- ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
- touch $(LINUX_DIR)/.unpacked
-
-$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
- $(PATCH) $(LINUX_DIR) ./patches/generic $(MAKE_TRACE)
- [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) $(MAKE_TRACE)
- touch $(LINUX_DIR)/.patched
-
-$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
- -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
- $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig $(MAKE_TRACE)
- touch $(LINUX_DIR)/.configured
-
-$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.configured
- $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(MAKE_TRACE)
-
-$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
- $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ $(MAKE_TRACE)
- touch -c $(LINUX_KERNEL)
-
-$(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE)
- rm -rf $(LINUX_BUILD_DIR)/modules
- $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) modules $(MAKE_TRACE)
- $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE)
- touch $(LINUX_DIR)/.modules_done
-
-$(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
- mkdir -p $(STAGING_DIR)/include
- tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
- tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
-
-$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
- @mkdir -p $(STAMP_DIR)
- @$(MAKE) $(TARGETS)
- ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR)
- @$(TRACE) target/linux/package
- $(MAKE) -C $(TOPDIR)/target/linux/package \
- $(KPKG_MAKEOPTS) \
- compile
- touch $@
-
-$(TARGET_MODULES_DIR):
- -mkdir -p $(TARGET_MODULES_DIR)
-
-$(KERNEL_IPKG):
- rm -rf $(KERNEL_IDIR)
- mkdir -p $(KERNEL_IDIR)/etc
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) $(ARCH)
- if [ -f ./config/$(BOARD).modules ]; then \
- cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
- fi
- $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE)
-
-source: $(DL_DIR)/$(LINUX_SOURCE)
-prepare: $(LINUX_DIR)/.configured
-compile:
- $(MAKE) $(STAMP_DIR)/.linux-compile $(MAKE_TRACE)
-
-install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
- rm -rf $(LINUX_BUILD_DIR)/root*
- cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
- echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
- $(MAKE) -C $(TOPDIR)/target/linux/package \
- $(KPKG_MAKEOPTS) \
- install
- @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE)
-
-mostlyclean:
- rm -f $(STAMP_DIR)/.linux-compile
- rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
- rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
- $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE_TRACE)
- rm -f $(LINUX_KERNEL) $(LINUX_IMAGE)
-
-rebuild:
- -$(MAKE) mostlyclean
- if [ -f $(LINUX_KERNEL) ]; then \
- $(MAKE) clean $(MAKE_TRACE); \
- fi
- $(MAKE) compile $(MAKE_TRACE)
-
-clean:
- rm -f $(STAMP_DIR)/.linux-compile
- rm -rf $(LINUX_BUILD_DIR)
- rm -f $(TARGETS)
diff --git a/target/linux/linux-2.6/patches/generic/000-reenable_devfs.patch b/target/linux/generic-2.6/patches/000-reenable_devfs.patch
index ce98def5da..ce98def5da 100644
--- a/target/linux/linux-2.6/patches/generic/000-reenable_devfs.patch
+++ b/target/linux/generic-2.6/patches/000-reenable_devfs.patch
diff --git a/target/linux/linux-2.6/patches/generic/001-squashfs.patch b/target/linux/generic-2.6/patches/001-squashfs.patch
index f51beaac66..f51beaac66 100644
--- a/target/linux/linux-2.6/patches/generic/001-squashfs.patch
+++ b/target/linux/generic-2.6/patches/001-squashfs.patch
diff --git a/target/linux/linux-2.6/patches/generic/002-squashfs_lzma.patch b/target/linux/generic-2.6/patches/002-squashfs_lzma.patch
index be4c19bd7e..be4c19bd7e 100644
--- a/target/linux/linux-2.6/patches/generic/002-squashfs_lzma.patch
+++ b/target/linux/generic-2.6/patches/002-squashfs_lzma.patch
diff --git a/target/linux/linux-2.6/patches/generic/003-net-b44-1.patch b/target/linux/generic-2.6/patches/003-net-b44-1.patch
index 726ea542a3..726ea542a3 100644
--- a/target/linux/linux-2.6/patches/generic/003-net-b44-1.patch
+++ b/target/linux/generic-2.6/patches/003-net-b44-1.patch
diff --git a/target/linux/linux-2.6/patches/generic/003-net-b44-2.patch b/target/linux/generic-2.6/patches/003-net-b44-2.patch
index 8bfe429698..8bfe429698 100644
--- a/target/linux/linux-2.6/patches/generic/003-net-b44-2.patch
+++ b/target/linux/generic-2.6/patches/003-net-b44-2.patch
diff --git a/target/linux/linux-2.6/patches/generic/004-extra_optimization.patch b/target/linux/generic-2.6/patches/004-extra_optimization.patch
index 805d2f0ea9..805d2f0ea9 100644
--- a/target/linux/linux-2.6/patches/generic/004-extra_optimization.patch
+++ b/target/linux/generic-2.6/patches/004-extra_optimization.patch
diff --git a/target/linux/linux-2.6/patches/generic/100-netfilter_layer7.patch b/target/linux/generic-2.6/patches/100-netfilter_layer7.patch
index 0dd2ccf7cc..0dd2ccf7cc 100644
--- a/target/linux/linux-2.6/patches/generic/100-netfilter_layer7.patch
+++ b/target/linux/generic-2.6/patches/100-netfilter_layer7.patch
diff --git a/target/linux/linux-2.6/patches/generic/102-openswan-2.4.0.kernel-2.6-natt.patch b/target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch
index ab09e3c356..ab09e3c356 100644
--- a/target/linux/linux-2.6/patches/generic/102-openswan-2.4.0.kernel-2.6-natt.patch
+++ b/target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch
diff --git a/target/linux/linux-2.6/patches/generic/103-netfilter-ipset.patch b/target/linux/generic-2.6/patches/103-netfilter-ipset.patch
index 54e2828a16..54e2828a16 100644
--- a/target/linux/linux-2.6/patches/generic/103-netfilter-ipset.patch
+++ b/target/linux/generic-2.6/patches/103-netfilter-ipset.patch
diff --git a/target/linux/linux-2.6/patches/generic/104-pf_ring.patch b/target/linux/generic-2.6/patches/104-pf_ring.patch
index 527e5d5337..527e5d5337 100644
--- a/target/linux/linux-2.6/patches/generic/104-pf_ring.patch
+++ b/target/linux/generic-2.6/patches/104-pf_ring.patch
diff --git a/target/linux/linux-2.6/patches/generic/105-netfilter_time.patch b/target/linux/generic-2.6/patches/105-netfilter_time.patch
index 34257ee93c..34257ee93c 100644
--- a/target/linux/linux-2.6/patches/generic/105-netfilter_time.patch
+++ b/target/linux/generic-2.6/patches/105-netfilter_time.patch
diff --git a/target/linux/kernel.mk b/target/linux/kernel.mk
new file mode 100644
index 0000000000..74490cf6b4
--- /dev/null
+++ b/target/linux/kernel.mk
@@ -0,0 +1,117 @@
+LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2
+LINUX_SITE=http://www.fi.kernel.org/pub/linux/kernel/v$(KERNEL) \
+ http://www.fr.kernel.org/pub/linux/kernel/v$(KERNEL) \
+ http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \
+ http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL)
+
+KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk
+KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
+
+$(TARGETS): $(PACKAGE_DIR)
+
+$(PACKAGE_DIR):
+ mkdir -p $(PACKAGE_DIR)
+
+$(DL_DIR)/$(LINUX_SOURCE):
+ -mkdir -p $(DL_DIR)
+ $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) $(MAKE_TRACE)
+
+$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
+ -mkdir -p $(LINUX_BUILD_DIR)
+ bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) -
+ rm -f $(BUILD_DIR)/linux
+ ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux
+ touch $@
+
+ifeq ($(KERNEL),2.4)
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
+ $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
+ $(LINUX_DIR)/Makefile \
+ $(LINUX_DIR)/arch/*/Makefile
+ $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
+ $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h $(MAKE_TRACE)
+ touch $@
+
+$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
+ $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) dep $(MAKE_TRACE)
+ touch $@
+
+$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done
+else
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
+ $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig $(MAKE_TRACE)
+ touch $@
+endif
+
+$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.configured
+ $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(MAKE_TRACE)
+
+$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
+ $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ $(MAKE_TRACE)
+ touch -c $(LINUX_KERNEL)
+
+$(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) $(LINUX_IMAGE)
+ rm -rf $(LINUX_BUILD_DIR)/modules
+ $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules $(MAKE_TRACE)
+ $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install $(MAKE_TRACE)
+ touch $(LINUX_DIR)/.modules_done
+
+$(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
+ mkdir -p $(STAGING_DIR)/include
+ tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
+ tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
+
+$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
+ @mkdir -p $(STAMP_DIR)
+ @$(MAKE) $(TARGETS)
+ ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux
+ @$(TRACE) target/linux/package
+ $(MAKE) -C $(TOPDIR)/target/linux/package \
+ $(KPKG_MAKEOPTS) \
+ compile
+ touch $@
+
+$(TARGET_MODULES_DIR):
+ -mkdir -p $(TARGET_MODULES_DIR)
+
+$(KERNEL_IPKG):
+ rm -rf $(KERNEL_IDIR)
+ mkdir -p $(KERNEL_IDIR)/etc
+ $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH)
+ if [ -f ./config/$(BOARD).modules ]; then \
+ cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
+ fi
+ $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE)
+
+source: $(DL_DIR)/$(LINUX_SOURCE)
+prepare: $(LINUX_DIR)/.configured
+compile:
+ $(MAKE) $(STAMP_DIR)/.linux-compile $(MAKE_TRACE)
+
+install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
+ rm -rf $(LINUX_BUILD_DIR)/root*
+ cp -fpR $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
+ echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
+ $(MAKE) -C $(TOPDIR)/target/linux/package \
+ $(KPKG_MAKEOPTS) \
+ install
+ @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE)
+
+mostlyclean:
+ rm -f $(STAMP_DIR)/.linux-compile
+ rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
+ rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
+ $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE_TRACE)
+ rm -f $(LINUX_KERNEL) $(LINUX_IMAGE)
+
+rebuild:
+ -$(MAKE) mostlyclean
+ if [ -f $(LINUX_KERNEL) ]; then \
+ $(MAKE) clean $(MAKE_TRACE); \
+ fi
+ $(MAKE) compile $(MAKE_TRACE)
+
+clean:
+ rm -f $(STAMP_DIR)/.linux-compile
+ rm -rf $(LINUX_BUILD_DIR)
+ rm -f $(TARGETS)
diff --git a/target/linux/linux-2.4/x86.mk b/target/linux/linux-2.4/x86.mk
deleted file mode 100644
index 0753b10cce..0000000000
--- a/target/linux/linux-2.4/x86.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# $Id$
-
-# x86 specific kmod packages
-
-$(eval $(call KMOD_template,WD1100,wd1100,\
- $(MODULES_DIR)/kernel/drivers/char/wd1100.o \
-,CONFIG_WD1100))
-
-
-$(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux
- $(MAKE) -C $(LINUX_DIR) TOPDIR=$(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE)
- cp -f $(LINUX_DIR)/arch/i386/boot/bzImage $@
- touch $@
-
-compile: $(LINUX_BUILD_DIR)/bzImage
diff --git a/target/linux/linux-2.6/x86.mk b/target/linux/linux-2.6/x86.mk
deleted file mode 100644
index 12ff4bd510..0000000000
--- a/target/linux/linux-2.6/x86.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# $Id$
-
-# x86 specific kmod packages
-
-$(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux
- $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE)
- cp -f $(LINUX_DIR)/arch/i386/boot/bzImage $@
- touch $@
-
-compile: $(LINUX_BUILD_DIR)/bzImage
diff --git a/target/linux/package/Makefile b/target/linux/package/Makefile
index 3d28ca77e3..a2567ea6bc 100644
--- a/target/linux/package/Makefile
+++ b/target/linux/package/Makefile
@@ -1,11 +1,9 @@
# Main makefile for the packages
include $(TOPDIR)/rules.mk
+include ../rules.mk
-ifneq ($(BOARD),ar7)
-ifneq ($(BOARD)-$(KERNEL),x86-2.6)
+package-y += base-files
package-$(BR2_PACKAGE_KMOD_ALSA) += alsa
-endif
-endif
package-$(BR2_PACKAGE_KMOD_FUSE) += fuse
package-$(BR2_PACKAGE_KMOD_HOSTAP) += hostap
package-$(BR2_PACKAGE_KMOD_BCM43XX_DSCAPE) += bcm43xx-dscape
@@ -17,14 +15,11 @@ package-$(BR2_PACKAGE_KMOD_SHFS) += shfs
package-$(BR2_PACKAGE_KMOD_SPCA5XX) += spca5xx
package-$(BR2_PACKAGE_KMOD_SWITCH) += switch
package-$(BR2_PACKAGE_KMOD_UEAGLE_ATM) += ueagle-atm
-package-y += base-files
-bcm43xx-dscape-compile: ieee80211-dscape-compile
-
-ifeq ($(BOARD)-$(KERNEL),brcm-2.4)
package-$(BR2_PACKAGE_KMOD_DIAG) += diag
package-$(BR2_PACKAGE_KMOD_WLCOMPAT) += wlcompat
+
+bcm43xx-dscape-compile: ieee80211-dscape-compile
wlcompat-compile: base-files-compile
-endif
all: compile install
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
@@ -32,20 +27,12 @@ prepare: $(patsubst %,%-prepare,$(package-y) $(package-m))
compile: $(patsubst %,%-compile,$(package-y) $(package-m))
install: $(patsubst %,%-install,$(package-y))
-MAKEOPTS:= BOARD="$(BOARD)" \
- KERNEL="$(KERNEL)" \
- IPKG="$(IPKG)" \
- TARGET_DIR="$(TARGET_DIR)" \
- BUILD_DIR="$(BUILD_DIR)" \
- KERNEL_DIR="$(KERNEL_DIR)" \
- LINUX_VERSION="$(LINUX_VERSION)" \
- KERNEL_RELEASE="$(KERNEL_RELEASE)"
-
+KPKG_MAKEOPTS += BUILD_DIR="$(LINUX_BUILD_DIR)"
%-prepare:
@$(START_TRACE) "target/linux/package/$(patsubst %-prepare,%,$@)/prepare: "
$(MAKE) -C $(patsubst %-prepare,%,$@) \
- $(MAKEOPTS) \
+ $(KPKG_MAKEOPTS) \
prepare
@$(CMD_TRACE) " done"
@$(END_TRACE)
@@ -53,7 +40,7 @@ MAKEOPTS:= BOARD="$(BOARD)" \
%-compile:
@$(START_TRACE) "target/linux/package/$(patsubst %-compile,%,$@)-compile: "
$(MAKE) -C $(patsubst %-compile,%,$@) \
- $(MAKEOPTS) \
+ $(KPKG_MAKEOPTS) \
compile
@$(CMD_TRACE) " done"
@$(END_TRACE)
@@ -61,7 +48,7 @@ MAKEOPTS:= BOARD="$(BOARD)" \
%-install:
@$(START_TRACE) "target/linux/package/$(patsubst %-install,%,$@)-install: "
$(MAKE) -C $(patsubst %-install,%,$@) \
- $(MAKEOPTS) \
+ $(KPKG_MAKEOPTS) \
install
@$(CMD_TRACE) " done"
@$(END_TRACE)
diff --git a/target/linux/package/alsa/Config.in b/target/linux/package/alsa/Config.in
index 29a4e89e17..df4da0b7d1 100644
--- a/target/linux/package/alsa/Config.in
+++ b/target/linux/package/alsa/Config.in
@@ -1,9 +1,9 @@
config BR2_PACKAGE_KMOD_ALSA
prompt "kmod-alsa......................... Alsa Sound Drivers"
tristate
- default m if CONFIG_DEVEL
- depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_X86 || BR2_LINUX_2_6_BRCM
+ depends BR2_LINUX_2_4_X86 || BR2_LINUX_2_4_BRCM || BR2_LINUX_2_6_X86 || BR2_LINUX_2_6_BRCM
depends BR2_PACKAGE_KMOD_USB_CONTROLLER
select BR2_PACKAGE_KMOD_SOUNDCORE
+ default m if CONFIG_DEVEL
help
Alsa Drivers for USB Soundcards
diff --git a/target/linux/package/alsa/Makefile b/target/linux/package/alsa/Makefile
index 02baa44b34..711ee1fc4c 100644
--- a/target/linux/package/alsa/Makefile
+++ b/target/linux/package/alsa/Makefile
@@ -14,29 +14,25 @@ PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-
include $(TOPDIR)/package/rules.mk
ifeq ($(LINUX_KARCH),i386)
-KERNEL_C_INCS:= -I$(KERNEL_DIR)/include/asm-i386/mach-generic
+KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic
KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
endif
ifeq ($(LINUX_KARCH),mips)
-KERNEL_C_INCS:= -I$(KERNEL_DIR)/include/asm-mips/mach-generic
+KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
endif
-$(eval $(call PKG_template,KMOD_ALSA,kmod-alsa,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_ALSA,kmod-alsa,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); \
CFLAGS="$(KERNEL_C_INCS)" \
./configure \
- --with-build=$(KERNEL_DIR) \
- --with-kernel=$(KERNEL_DIR) \
+ --with-build=$(LINUX_DIR) \
+ --with-kernel=$(LINUX_DIR) \
--with-cross=$(KERNEL_CROSS) \
--with-redhat=no \
--with-suse=no \
diff --git a/target/linux/package/bcm43xx-dscape/Makefile b/target/linux/package/bcm43xx-dscape/Makefile
index efdede6169..5856bf7492 100644
--- a/target/linux/package/bcm43xx-dscape/Makefile
+++ b/target/linux/package/bcm43xx-dscape/Makefile
@@ -19,12 +19,7 @@ FIRMWARE_BLOB_MD5SUM := e08665c5c5b66beb9c3b2dd54aa80cb3
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_BCM43XX_DSCAPE,kmod-$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)+0.$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
+$(eval $(call PKG_template,KMOD_BCM43XX_DSCAPE,kmod-$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)+0.$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
@@ -38,12 +33,12 @@ $(PKG_BUILD_DIR)/fwcutter/.built:
touch $@
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/fwcutter/.built
- $(MAKE) -C "$(KERNEL_DIR)" \
+ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
PATH="$(TARGET_PATH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
- LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/ieee80211-dscape -I$(KERNEL_DIR)/include -DBCM47XX=1" \
+ LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/ieee80211-dscape -I$(LINUX_DIR)/include -DBCM47XX=1" \
modules
touch $@
diff --git a/target/linux/package/diag/Config.in b/target/linux/package/diag/Config.in
index 001da0a005..b34f773691 100644
--- a/target/linux/package/diag/Config.in
+++ b/target/linux/package/diag/Config.in
@@ -1,8 +1,7 @@
config BR2_PACKAGE_KMOD_DIAG
prompt "kmod-diag......................... Driver for router LEDs and Buttons"
tristate
- default y if BR2_LINUX_2_4_BRCM
+ depends BR2_LINUX_2_4_BRCM
default m if CONFIG_DEVEL
- default n
help
Driver for router LEDs and Buttons
diff --git a/target/linux/package/diag/Makefile b/target/linux/package/diag/Makefile
index 47908f0866..26bdcc952f 100644
--- a/target/linux/package/diag/Makefile
+++ b/target/linux/package/diag/Makefile
@@ -10,16 +10,12 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_DIAG,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
+$(eval $(call PKG_template,KMOD_DIAG,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
DIAG_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
-mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
-Wa,-mips32 -Wa,--trap -Wstrict-prototypes -Wno-trigraphs -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -nostdinc \
- -iwithprefix include -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/include/asm/gcc -c -I$(KERNEL_DIR)/arch/mips/bcm947xx/include -DBCMDRIVER
+ -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -c -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DBCMDRIVER
$(PKG_BUILD_DIR)/.prepared:
mkdir -p $(PKG_BUILD_DIR)
diff --git a/target/linux/package/fuse/Makefile b/target/linux/package/fuse/Makefile
index 60134b7799..62d6df36d9 100644
--- a/target/linux/package/fuse/Makefile
+++ b/target/linux/package/fuse/Makefile
@@ -15,13 +15,9 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_FUSE,kmod-fuse,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_FUSE,kmod-fuse,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); \
@@ -60,7 +56,7 @@ $(PKG_BUILD_DIR)/.configured:
--disable-util \
--disable-example \
--disable-auto-modprobe \
- --with-kernel=$(KERNEL_DIR) \
+ --with-kernel=$(LINUX_DIR) \
--disable-mtab \
);
touch $@
diff --git a/target/linux/package/hostap/Makefile b/target/linux/package/hostap/Makefile
index 7fff683ae6..ac031e3bc9 100644
--- a/target/linux/package/hostap/Makefile
+++ b/target/linux/package/hostap/Makefile
@@ -15,21 +15,17 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_HOSTAP,kmod-hostap,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-$(eval $(call PKG_template,KMOD_HOSTAP_PCI,kmod-hostap-pci,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-$(eval $(call PKG_template,KMOD_HOSTAP_PLX,kmod-hostap-plx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_HOSTAP,kmod-hostap,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
+$(eval $(call PKG_template,KMOD_HOSTAP_PCI,kmod-hostap-pci,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
+$(eval $(call PKG_template,KMOD_HOSTAP_PLX,kmod-hostap-plx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(KERNEL_DIR)/ \
+ $(MAKE) -C $(LINUX_DIR)/ \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
diff --git a/target/linux/package/ieee80211-dscape/Makefile b/target/linux/package/ieee80211-dscape/Makefile
index 90d55b3c13..90fe09d3d8 100644
--- a/target/linux/package/ieee80211-dscape/Makefile
+++ b/target/linux/package/ieee80211-dscape/Makefile
@@ -9,12 +9,7 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_IEEE80211_DSCAPE,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
+$(eval $(call PKG_template,KMOD_IEEE80211_DSCAPE,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.prepared:
mkdir -p $(PKG_BUILD_DIR)
@@ -25,12 +20,12 @@ $(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C "$(KERNEL_DIR)" \
+ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
PATH="$(TARGET_PATH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
- LINUXINCLUDE="-I$(shell pwd)/src/include -I$(KERNEL_DIR)/include" \
+ LINUXINCLUDE="-I$(shell pwd)/src/include -I$(LINUX_DIR)/include" \
modules
touch $@
diff --git a/target/linux/package/madwifi/Makefile b/target/linux/package/madwifi/Makefile
index 5432055c35..c6dd8e106f 100644
--- a/target/linux/package/madwifi/Makefile
+++ b/target/linux/package/madwifi/Makefile
@@ -14,10 +14,6 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-ng-$(PKG_VERSION)
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-
ifeq ($(ARCH),mips)
HAL_TARGET:=mips-be-elf
endif
@@ -38,7 +34,7 @@ endif
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
@@ -51,7 +47,7 @@ $(PKG_BUILD_DIR)/.built:
TARGET="$(HAL_TARGET)" \
TOOLPREFIX="$(KERNEL_CROSS)" \
TOOLPATH="$(KERNEL_CROSS)" \
- KERNELPATH="$(KERNEL_DIR)" \
+ KERNELPATH="$(LINUX_DIR)" \
BUS="$(BUS)" \
all
touch $@
diff --git a/target/linux/package/mini_fo/Makefile b/target/linux/package/mini_fo/Makefile
index cb1e1ad2c8..e4071a78e2 100644
--- a/target/linux/package/mini_fo/Makefile
+++ b/target/linux/package/mini_fo/Makefile
@@ -15,14 +15,9 @@ PKG_CAT := bzcat
PKG_BUILD_DIR := $(BUILD_DIR)/mini_fo-0-6-2-pre1
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
-
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_MINI_FO,kmod-mini-fo,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_MINI_FO,kmod-mini-fo,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
@@ -33,7 +28,7 @@ $(PKG_BUILD_DIR)/.built:
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
KERNELVERSION="$(KERNEL_VERSION)" \
- KERNEL_SRC="$(KERNEL_DIR)" \
+ KERNEL_SRC="$(LINUX_DIR)" \
all
touch $@
diff --git a/target/linux/package/openswan/Makefile b/target/linux/package/openswan/Makefile
index 1f2dbb1268..e7faf3e361 100644
--- a/target/linux/package/openswan/Makefile
+++ b/target/linux/package/openswan/Makefile
@@ -15,19 +15,15 @@ PKG_CAT:=zcat
include $(TOPDIR)/package/rules.mk
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-
-$(eval $(call PKG_template,KMOD_OPENSWAN,kmod-openswan,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_OPENSWAN,kmod-openswan,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
FLAGS := $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
- KERNEL_RELEASE="$(KERNEL_RELEASE)" \
- KERNELSRC="$(KERNEL_DIR)" \
+ LINUX_RELEASE="$(LINUX_RELEASE)" \
+ KERNELSRC="$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
USERCOMPILE="$(FLAGS)" \
diff --git a/target/linux/package/shfs/Makefile b/target/linux/package/shfs/Makefile
index 5380792b4b..a0ac839479 100644
--- a/target/linux/package/shfs/Makefile
+++ b/target/linux/package/shfs/Makefile
@@ -15,13 +15,9 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_SHFS,kmod-shfs,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_SHFS,kmod-shfs,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
@@ -37,7 +33,7 @@ $(PKG_BUILD_DIR)/.built:
CC="$(TARGET_CC)" \
LINKER="$(TARGET_CC)" \
KERNEL="$(LINUX_VERSION)" \
- KERNEL_SOURCES="$(KERNEL_DIR)" \
+ KERNEL_SOURCES="$(LINUX_DIR)" \
ROOT="$(PKG_INSTALL_DIR)" \
module module-install
touch $@
diff --git a/target/linux/package/spca5xx/Makefile b/target/linux/package/spca5xx/Makefile
index 4bbee25d5b..08a4023cb4 100644
--- a/target/linux/package/spca5xx/Makefile
+++ b/target/linux/package/spca5xx/Makefile
@@ -15,20 +15,15 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
-
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_SPCA5XX,kmod-spca5xx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_SPCA5XX,kmod-spca5xx,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C $(KERNEL_DIR) \
+ $(MAKE) -C $(LINUX_DIR) \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
KERNELVERSION="$(KERNEL_VERSION)" \
diff --git a/target/linux/package/switch/Makefile b/target/linux/package/switch/Makefile
index 6c2deed6c5..cecdccca17 100644
--- a/target/linux/package/switch/Makefile
+++ b/target/linux/package/switch/Makefile
@@ -9,12 +9,7 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_SWITCH,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
+$(eval $(call PKG_template,KMOD_SWITCH,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.prepared:
mkdir -p $(PKG_BUILD_DIR)
@@ -25,7 +20,7 @@ $(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
- $(MAKE) -C "$(KERNEL_DIR)" \
+ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
PATH="$(TARGET_PATH)" \
diff --git a/target/linux/package/ueagle-atm/Makefile b/target/linux/package/ueagle-atm/Makefile
index 66f03f6a45..2da1f463e1 100644
--- a/target/linux/package/ueagle-atm/Makefile
+++ b/target/linux/package/ueagle-atm/Makefile
@@ -15,14 +15,9 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
-KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
-
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_UEAGLE_ATM,kmod-ueagle-atm,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(KERNEL_RELEASE))))
+$(eval $(call PKG_template,KMOD_UEAGLE_ATM,kmod-ueagle-atm,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel-$(LINUX_VERSION)-$(BOARD) ($(LINUX_RELEASE))))
$(PKG_BUILD_DIR)/.configured:
touch $@
@@ -32,7 +27,7 @@ $(PKG_BUILD_DIR)/.built:
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
TARGET="$(HAL_TARGET)" \
- KERNELDIR="$(KERNEL_DIR)" \
+ KERNELDIR="$(LINUX_DIR)" \
all
touch $@
diff --git a/target/linux/package/wlcompat/Makefile b/target/linux/package/wlcompat/Makefile
index e8f69c4c90..718b584aae 100644
--- a/target/linux/package/wlcompat/Makefile
+++ b/target/linux/package/wlcompat/Makefile
@@ -8,17 +8,13 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,KMOD_WLCOMPAT,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-$(eval $(call PKG_template,KMOD_WLCOMPAT_DEBUG,$(PKG_NAME)-debug,$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
-
-ifeq ($(KERNEL_DIR),)
-KERNEL_DIR:=$(LINUX_DIR)
-endif
+$(eval $(call PKG_template,KMOD_WLCOMPAT,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
+$(eval $(call PKG_template,KMOD_WLCOMPAT_DEBUG,$(PKG_NAME)-debug,$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
WLCOMPAT_FLAGS:=$(TARGET_CFLAGS) -D__KERNEL__ -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
-mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 \
-Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common -I. -I linux-2.4 -funsigned-char -nostdinc \
- -iwithprefix include -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/include/asm/gcc -I$(STAGING_DIR)/usr/include -c
+ -iwithprefix include -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/asm/gcc -I$(STAGING_DIR)/usr/include -c
$(PKG_BUILD_DIR)/.prepared:
mkdir -p $(PKG_BUILD_DIR)
diff --git a/target/linux/rules.mk b/target/linux/rules.mk
index 758b525132..b921f153c1 100644
--- a/target/linux/rules.mk
+++ b/target/linux/rules.mk
@@ -1,3 +1,20 @@
+KERNEL:=unknown
+ifneq (,$(findstring 2.4.,$(LINUX_VERSION)))
+KERNEL:=2.4
+endif
+ifneq (,$(findstring 2.6.,$(LINUX_VERSION)))
+KERNEL:=2.6
+endif
+
+MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
+
+LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
+LINUX_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)
+LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux
+
+LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root
+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
+
LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
-e 's/mipsel/mips/' \
-e 's/mipseb/mips/' \
@@ -5,6 +22,19 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
-e 's/sh[234]/sh/' \
)
+KPKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \
+ BOARD="$(BOARD)" \
+ KERNEL="$(KERNEL)" \
+ TARGET_DIR="$(LINUX_TARGET_DIR)" \
+ LINUX_BUILD_DIR="$(LINUX_BUILD_DIR)" \
+ LINUX_DIR="$(LINUX_DIR)" \
+ LINUX_VERSION="$(LINUX_VERSION)" \
+ LINUX_RELEASE="$(LINUX_RELEASE)"
+
+KMOD_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
+MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
+TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
+
ifeq ($(KERNEL),2.6)
LINUX_KMOD_SUFFIX=ko
else
@@ -18,10 +48,10 @@ else
KDEPEND_$(1):=$($(4))
endif
-IDEPEND_$(1):=kernel ($(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)) $(foreach pkg,$(5),", $(pkg)")
+IDEPEND_$(1):=kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)) $(foreach pkg,$(5),", $(pkg)")
-PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)_$(ARCH).ipk
-I_$(1) := $(PKG_BUILD_DIR)/ipkg/$(2)
+PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk
+I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(2)
ifeq ($$(KDEPEND_$(1)),m)
ifneq ($(BR2_PACKAGE_KMOD_$(1)),)
@@ -34,7 +64,7 @@ endif
$$(PKG_$(1)): $(LINUX_DIR)/.modules_done
rm -rf $$(I_$(1))
- $(SCRIPT_DIR)/make-ipkg-dir.sh $$(I_$(1)) ../control/kmod-$(2).control $(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) $(ARCH)
+ $(SCRIPT_DIR)/make-ipkg-dir.sh $$(I_$(1)) ../control/kmod-$(2).control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH)
echo "Depends: $$(IDEPEND_$(1))" >> $$(I_$(1))/CONTROL/control
ifneq ($(strip $(3)),)
mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION)
@@ -51,4 +81,6 @@ endif
endef
+INSTALL_TARGETS := $(KERNEL_IPKG)
+TARGETS :=
diff --git a/target/linux/x86-2.4/Makefile b/target/linux/x86-2.4/Makefile
new file mode 100644
index 0000000000..97ded843f7
--- /dev/null
+++ b/target/linux/x86-2.4/Makefile
@@ -0,0 +1,30 @@
+include $(TOPDIR)/rules.mk
+
+LINUX_VERSION:=2.4.32
+LINUX_RELEASE:=1
+LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
+
+include ../rules.mk
+include ./config
+
+$(eval $(call KMOD_template,WD1100,wd1100,\
+ $(MODULES_DIR)/kernel/drivers/char/wd1100.o \
+,CONFIG_WD1100))
+
+
+include ../generic-$(KERNEL)/modules.mk
+include ../kernel.mk
+
+
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
+ [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE)
+ @cp config $(LINUX_DIR)/.config
+ touch $@
+
+$(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux
+ $(MAKE) -C $(LINUX_DIR) TOPDIR=$(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE)
+ cp -f $(LINUX_DIR)/arch/i386/boot/bzImage $@
+ touch $@
+
+compile: $(LINUX_BUILD_DIR)/bzImage
diff --git a/target/linux/linux-2.4/config/x86 b/target/linux/x86-2.4/config
index 339196f29a..339196f29a 100644
--- a/target/linux/linux-2.4/config/x86
+++ b/target/linux/x86-2.4/config
diff --git a/target/linux/linux-2.4/patches/x86/001-mgeode-cpu.patch b/target/linux/x86-2.4/patches/001-mgeode-cpu.patch
index 662d4f263e..662d4f263e 100644
--- a/target/linux/linux-2.4/patches/x86/001-mgeode-cpu.patch
+++ b/target/linux/x86-2.4/patches/001-mgeode-cpu.patch
diff --git a/target/linux/linux-2.4/patches/x86/002-wd1100.patch b/target/linux/x86-2.4/patches/002-wd1100.patch
index 8cb2dbd04b..8cb2dbd04b 100644
--- a/target/linux/linux-2.4/patches/x86/002-wd1100.patch
+++ b/target/linux/x86-2.4/patches/002-wd1100.patch
diff --git a/target/linux/linux-2.4/patches/x86/003-mgeode-pci.patch b/target/linux/x86-2.4/patches/003-mgeode-pci.patch
index eb6594ec84..eb6594ec84 100644
--- a/target/linux/linux-2.4/patches/x86/003-mgeode-pci.patch
+++ b/target/linux/x86-2.4/patches/003-mgeode-pci.patch
diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile
new file mode 100644
index 0000000000..bfdc0757de
--- /dev/null
+++ b/target/linux/x86-2.6/Makefile
@@ -0,0 +1,25 @@
+include $(TOPDIR)/rules.mk
+
+LINUX_VERSION:=2.6.15
+LINUX_RELEASE:=1
+LINUX_KERNEL_MD5SUM:=cdf95e00f5111e31f78e1d97304d9522
+
+include ../rules.mk
+include ./config
+
+include ../generic-$(KERNEL)/modules.mk
+include ../kernel.mk
+
+
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
+ [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE)
+ @cp config $(LINUX_DIR)/.config
+ touch $@
+
+$(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux
+ $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE)
+ cp -f $(LINUX_DIR)/arch/i386/boot/bzImage $@
+ touch $@
+
+compile: $(LINUX_BUILD_DIR)/bzImage
diff --git a/target/linux/linux-2.6/config/x86 b/target/linux/x86-2.6/config
index 87cc55d7ab..87cc55d7ab 100644
--- a/target/linux/linux-2.6/config/x86
+++ b/target/linux/x86-2.6/config
diff --git a/target/linux/linux-2.6/patches/x86/scx200-hr-timer-2.6.12-rc6-6.diff b/target/linux/x86-2.6/patches/scx200-hr-timer-2.6.12-rc6-6.diff
index 38fc16a74c..38fc16a74c 100644
--- a/target/linux/linux-2.6/patches/x86/scx200-hr-timer-2.6.12-rc6-6.diff
+++ b/target/linux/x86-2.6/patches/scx200-hr-timer-2.6.12-rc6-6.diff