From f77b88d124ea1c900f9cf5e04046939aad48bbe1 Mon Sep 17 00:00:00 2001 From: mbm Date: Sun, 6 Mar 2005 03:34:52 +0000 Subject: nbd's makefile/menuconfig rewrite git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@307 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/linux/Config.in | 66 ++++++++++++++++-- package/linux/Makefile | 74 +++++++++++++++++++++ package/linux/control/kmod-arptables.control | 8 +++ package/linux/control/kmod-crypto.control | 8 +++ package/linux/control/kmod-ebtables.control | 8 +++ package/linux/control/kmod-ip6tables.control | 9 +++ package/linux/control/kmod-iptables-extra.control | 8 +++ package/linux/control/kmod-ipv6.control | 8 +++ package/linux/control/kmod-mppe.control | 8 +++ package/linux/control/kmod-sched.control | 8 +++ package/linux/control/kmod-tun.control | 8 +++ package/linux/control/kmod-usb.control | 8 +++ .../kernel-patches/105-makefile-mkdep-fix.bz2 | Bin 0 -> 445 bytes .../kernel-patches/304-netfilter-ipp2p-0.7.1.bz2 | Bin 0 -> 5300 bytes package/linux/linux.config | 3 +- package/linux/linux.mk | 38 +++++------ 16 files changed, 235 insertions(+), 27 deletions(-) create mode 100644 package/linux/Makefile create mode 100644 package/linux/control/kmod-arptables.control create mode 100644 package/linux/control/kmod-crypto.control create mode 100644 package/linux/control/kmod-ebtables.control create mode 100644 package/linux/control/kmod-ip6tables.control create mode 100644 package/linux/control/kmod-iptables-extra.control create mode 100644 package/linux/control/kmod-ipv6.control create mode 100644 package/linux/control/kmod-mppe.control create mode 100644 package/linux/control/kmod-sched.control create mode 100644 package/linux/control/kmod-tun.control create mode 100644 package/linux/control/kmod-usb.control create mode 100644 package/linux/kernel-patches/105-makefile-mkdep-fix.bz2 create mode 100644 package/linux/kernel-patches/304-netfilter-ipp2p-0.7.1.bz2 (limited to 'package/linux') diff --git a/package/linux/Config.in b/package/linux/Config.in index 22809cd7f..e420f8789 100644 --- a/package/linux/Config.in +++ b/package/linux/Config.in @@ -1,7 +1,63 @@ -config BR2_PACKAGE_LINUX - bool "linux" - default y +config BR2_PACKAGE_KMOD_ARPT + tristate "ARP firewalling support" + default m help - The Linux kernel. + Kernel modules for ARP firewalling + +config BR2_PACKAGE_KMOD_EBT + tristate "Ethernet Bridge firewalling support" + default m + help + Kernel modules for bridge firewalling + +config BR2_PACKAGE_KMOD_IPT4 + tristate "Extra modules for iptables" + default m + help + Extra kernel modules for IPv4 firewalling + +config BR2_PACKAGE_KMOD_IPV6 + tristate "IPv6 support" + default m + help + Kernel modules for IPv6 protocol support + +config BR2_PACKAGE_KMOD_IPT6 + tristate "Kernel modules for ip6tables" + default m + depends BR2_PACKAGE_KMOD_IPV6 + help + IPv6 firewalling support + +config BR2_PACKAGE_KMOD_USB + tristate "USB/SCSI support" + default m + help + Kernel modules for USB/SCSI support + Includes usb-storage and printer + +config BR2_PACKAGE_KMOD_CRYPTO + tristate "CryptoAPI modules" + default m + help + Kernel modules for cryptographic algorithms + +config BR2_PACKAGE_KMOD_MPPE + tristate "PPP MPPE/MPPC module" + default m + select BR2_PACKAGE_KMOD_CRYPTO + help + Support for Microsoft PPP Encryption/Compression + +config BR2_PACKAGE_KMOD_TUN + tristate "Universal TUN/TAP driver" + default m + help + Kernel support for the TUN/TAP tunneling device + +config BR2_PACKAGE_KMOD_SCHED + tristate "Traffic schedulers" + default m + help + Kernel schedulers for IP traffic - http://www.kernel.org/ diff --git a/package/linux/Makefile b/package/linux/Makefile new file mode 100644 index 000000000..90fb5ac77 --- /dev/null +++ b/package/linux/Makefile @@ -0,0 +1,74 @@ +include $(TOPDIR)/rules.mk +include ./linux.mk + +PKG_BUILD_DIR := $(BUILD_DIR)/linux-modules +PKG_RELEASE := 1 + +TARGETS := +INSTALL_TARGETS := + +define KMOD_template +PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk +I_$(1) := $(PKG_BUILD_DIR)/ipkg/$(2) +ifneq ($(BR2_PACKAGE_KMOD_$(1)),) +TARGETS += $$(PKG_$(1)) +endif +ifeq ($(BR2_PACLAGE_KMOD_$(1)),y) +INSTALL_TARGETS += $$(PKG_$(1)) +endif + +$$(PKG_$(1)): $(LINUX_DIR)/.modules_done + mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION) + $(SCRIPT_DIR)/make-ipkg-dir.sh $$(I_$(1)) control/kmod-$(2).control $(LINUX_VERSION)-$(PKG_RELEASE) $(ARCH) + cp $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION) + $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) + +endef + +$(eval $(call KMOD_template,ARPT,arptables,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.o \ +)) +$(eval $(call KMOD_template,EBT,ebtables,\ + $(MODULES_DIR)/kernel/net/bridge/netfilter/*.o \ +)) +$(eval $(call KMOD_template,IPT4,iptables-extra,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/ip*.o \ +)) +$(eval $(call KMOD_template,IPT6,ip6tables,\ + $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.o \ +)) +$(eval $(call KMOD_template,IPV6,ipv6,\ + $(MODULES_DIR)/kernel/net/ipv6/ipv6.o \ +)) +$(eval $(call KMOD_template,USB,usb,\ + $(MODULES_DIR)/kernel/drivers/scsi/*.o \ + $(MODULES_DIR)/kernel/drivers/usb/*.o \ + $(MODULES_DIR)/kernel/drivers/usb/*/*.o \ +)) +$(eval $(call KMOD_template,CRYPTO,crypto,\ + $(MODULES_DIR)/kernel/crypto/*.o \ +)) +$(eval $(call KMOD_template,MPPE,mppe,\ + $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.o \ +)) +$(eval $(call KMOD_template,TUN,tun,\ + $(MODULES_DIR)/kernel/drivers/net/tun.o \ +)) +$(eval $(call KMOD_template,SCHED,sched,\ + $(MODULES_DIR)/kernel/net/sched/*.o \ +)) + +$(TARGETS): $(PACKAGE_DIR) + +$(PACKAGE_DIR): + mkdir -p $(PACKAGE_DIR) + +source: linux-source +prepare: $(LINUX_DIR)/.configured +compile: $(LINUX_DIR)/.modules_done $(TARGETS) + +install: compile $(TARGET_MODULES_DIR) + @[ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true + +clean: linux-dirclean + rm -f $(TARGETS) diff --git a/package/linux/control/kmod-arptables.control b/package/linux/control/kmod-arptables.control new file mode 100644 index 000000000..0ce3feec4 --- /dev/null +++ b/package/linux/control/kmod-arptables.control @@ -0,0 +1,8 @@ +Package: kmod-arptables +Priority: optional +Section: net +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: ARP firewalling kernel modules diff --git a/package/linux/control/kmod-crypto.control b/package/linux/control/kmod-crypto.control new file mode 100644 index 000000000..01834bcd5 --- /dev/null +++ b/package/linux/control/kmod-crypto.control @@ -0,0 +1,8 @@ +Package: kmod-crypto +Priority: optional +Section: sys +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: CryptoAPI kernel modules diff --git a/package/linux/control/kmod-ebtables.control b/package/linux/control/kmod-ebtables.control new file mode 100644 index 000000000..011c7fe9a --- /dev/null +++ b/package/linux/control/kmod-ebtables.control @@ -0,0 +1,8 @@ +Package: kmod-ebtables +Priority: optional +Section: net +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Ethernet bridge firewalling kernel modules diff --git a/package/linux/control/kmod-ip6tables.control b/package/linux/control/kmod-ip6tables.control new file mode 100644 index 000000000..12153ea80 --- /dev/null +++ b/package/linux/control/kmod-ip6tables.control @@ -0,0 +1,9 @@ +Package: kmod-ip6tables +Priority: optional +Section: net +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Kernel modules for ip6tables +Depends: kmod-ipv6 diff --git a/package/linux/control/kmod-iptables-extra.control b/package/linux/control/kmod-iptables-extra.control new file mode 100644 index 000000000..7adbd9527 --- /dev/null +++ b/package/linux/control/kmod-iptables-extra.control @@ -0,0 +1,8 @@ +Package: kmod-iptables-extra +Priority: optional +Section: net +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Extra kernel modules for iptables diff --git a/package/linux/control/kmod-ipv6.control b/package/linux/control/kmod-ipv6.control new file mode 100644 index 000000000..ff14fc988 --- /dev/null +++ b/package/linux/control/kmod-ipv6.control @@ -0,0 +1,8 @@ +Package: kmod-ipv6 +Priority: optional +Section: net +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Kernel modules for the IPv6 protocol diff --git a/package/linux/control/kmod-mppe.control b/package/linux/control/kmod-mppe.control new file mode 100644 index 000000000..a3c286a01 --- /dev/null +++ b/package/linux/control/kmod-mppe.control @@ -0,0 +1,8 @@ +Package: kmod-mppe +Priority: optional +Section: net +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Microsoft PPP Encryption/Compression support diff --git a/package/linux/control/kmod-sched.control b/package/linux/control/kmod-sched.control new file mode 100644 index 000000000..00cff6e44 --- /dev/null +++ b/package/linux/control/kmod-sched.control @@ -0,0 +1,8 @@ +Package: kmod-sched +Priority: optional +Section: sys +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Kernel schedulers for IP traffic diff --git a/package/linux/control/kmod-tun.control b/package/linux/control/kmod-tun.control new file mode 100644 index 000000000..551d41e40 --- /dev/null +++ b/package/linux/control/kmod-tun.control @@ -0,0 +1,8 @@ +Package: kmod-tun +Priority: optional +Section: sys +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Kernel TUN/TAP extension diff --git a/package/linux/control/kmod-usb.control b/package/linux/control/kmod-usb.control new file mode 100644 index 000000000..ceda8ea7a --- /dev/null +++ b/package/linux/control/kmod-usb.control @@ -0,0 +1,8 @@ +Package: kmod-usb +Priority: optional +Section: sys +Version: 2.4.29-1 +Architecture: mipsel +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Kernel modules for USB/SCSI support diff --git a/package/linux/kernel-patches/105-makefile-mkdep-fix.bz2 b/package/linux/kernel-patches/105-makefile-mkdep-fix.bz2 new file mode 100644 index 000000000..aab973feb Binary files /dev/null and b/package/linux/kernel-patches/105-makefile-mkdep-fix.bz2 differ diff --git a/package/linux/kernel-patches/304-netfilter-ipp2p-0.7.1.bz2 b/package/linux/kernel-patches/304-netfilter-ipp2p-0.7.1.bz2 new file mode 100644 index 000000000..10efa16c2 Binary files /dev/null and b/package/linux/kernel-patches/304-netfilter-ipp2p-0.7.1.bz2 differ diff --git a/package/linux/linux.config b/package/linux/linux.config index 761906ae5..e5f449383 100644 --- a/package/linux/linux.config +++ b/package/linux/linux.config @@ -324,6 +324,7 @@ CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_LIMIT=m CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_IPP2P=m CONFIG_IP_NF_MATCH_PKTTYPE=m CONFIG_IP_NF_MATCH_MARK=y CONFIG_IP_NF_MATCH_MULTIPORT=y @@ -829,7 +830,7 @@ CONFIG_PROC_FS=y CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y # CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set +CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set # CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set diff --git a/package/linux/linux.mk b/package/linux/linux.mk index 6e3f7a4d2..15d401fcf 100644 --- a/package/linux/linux.mk +++ b/package/linux/linux.mk @@ -11,7 +11,6 @@ # 4xx patches needed to integrate feature patches # ############################################################# -ifneq ($(filter $(TARGETS),linux),) LINUX_FORMAT=zImage LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ @@ -20,16 +19,13 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/sh[234]/sh/' \ ) -LINUX_VERSION=2.4.29 -LINUX_DIR=$(BUILD_DIR)/linux-$(LINUX_VERSION) LINUX_SITE=http://www.kernel.org/pub/linux/kernel/v2.4 LINUX_SOURCE=linux-$(LINUX_VERSION).tar.bz2 -LINUX_KCONFIG=package/linux/linux.config -LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel -LINUX_PATCHES=$(PACKAGE_DIR)/linux/kernel-patches +LINUX_KCONFIG=./linux.config +LINUX_PATCHES=./kernel-patches LINUX_BINLOC=arch/$(LINUX_KARCH)/brcm-boards/bcm947xx/compressed/vmlinuz # Used by pcmcia-cs and others -LINUX_SOURCE_DIR=$(LINUX_DIR) +LINUX_SOURCE_DIR=$(LINUX_DIR)-$(LINUX_VERSION) # kernel stuff extracted from linksys firmware GPL sourcetree # WRT54GS_3_37_2_1109_US (shared,include,wl,et) @@ -46,17 +42,24 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) $(DL_DIR)/$(LINKSYS_KERNEL_TGZ bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - # extract linksys binary kernel stuff and include/shared files zcat $(DL_DIR)/$(LINKSYS_KERNEL_TGZ) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + ln -sf $(LINUX_DIR)-$(LINUX_VERSION) $(LINUX_DIR) touch $(LINUX_DIR)/.unpacked $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked $(PATCH) $(LINUX_DIR) $(LINUX_PATCHES) touch $(LINUX_DIR)/.patched -$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched +$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched -cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config +#ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y) +# $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config +#endif +#ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS),y) +# $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config +#endif $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \ - $(LINUX_DIR)/Makefile \ - $(LINUX_DIR)/arch/mips/Makefile + $(LINUX_DIR)/Makefile \ + $(LINUX_DIR)/arch/mips/Makefile $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h touch $(LINUX_DIR)/.configured @@ -76,7 +79,6 @@ $(LINUX_KERNEL): $(LINUX_DIR)/$(LINUX_BINLOC) $(LINUX_DIR)/.modules_done: $(LINUX_KERNEL) rm -rf $(BUILD_DIR)/modules $(MAKE) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(BUILD_DIR)/modules modules_install - tar -C $(BUILD_DIR)/modules/lib -cjf openwrt-kmodules.tar.bz2 modules touch $(LINUX_DIR)/.modules_done $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured @@ -100,15 +102,9 @@ linuxclean: clean -$(MAKE) -C $(LINUX_DIR) clean linux-dirclean: + rm -f $(BUILD_DIR)/openwrt-kmodules.tar.bz2 + rm -rf $(LINUX_DIR)-$(LINUX_VERSION) rm -rf $(LINUX_DIR) + rm -rf $(BUILD_DIR)/modules + rm -rf $(BUILD_DIR)/linksys-kernel -endif - -############################################################# -# -# Toplevel Makefile options -# -############################################################## -ifeq ($(strip $(BR2_PACKAGE_LINUX)),y) -TARGETS+=linux -endif -- cgit v1.2.3