mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
nbd's makefile/menuconfig rewrite
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@307 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained 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/
|
||||
|
||||
74
package/linux/Makefile
Normal file
74
package/linux/Makefile
Normal file
@@ -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)
|
||||
8
package/linux/control/kmod-arptables.control
Normal file
8
package/linux/control/kmod-arptables.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-arptables
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: ARP firewalling kernel modules
|
||||
8
package/linux/control/kmod-crypto.control
Normal file
8
package/linux/control/kmod-crypto.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-crypto
|
||||
Priority: optional
|
||||
Section: sys
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: CryptoAPI kernel modules
|
||||
8
package/linux/control/kmod-ebtables.control
Normal file
8
package/linux/control/kmod-ebtables.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-ebtables
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Ethernet bridge firewalling kernel modules
|
||||
9
package/linux/control/kmod-ip6tables.control
Normal file
9
package/linux/control/kmod-ip6tables.control
Normal file
@@ -0,0 +1,9 @@
|
||||
Package: kmod-ip6tables
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Kernel modules for ip6tables
|
||||
Depends: kmod-ipv6
|
||||
8
package/linux/control/kmod-iptables-extra.control
Normal file
8
package/linux/control/kmod-iptables-extra.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-iptables-extra
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Extra kernel modules for iptables
|
||||
8
package/linux/control/kmod-ipv6.control
Normal file
8
package/linux/control/kmod-ipv6.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-ipv6
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Kernel modules for the IPv6 protocol
|
||||
8
package/linux/control/kmod-mppe.control
Normal file
8
package/linux/control/kmod-mppe.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-mppe
|
||||
Priority: optional
|
||||
Section: net
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Microsoft PPP Encryption/Compression support
|
||||
8
package/linux/control/kmod-sched.control
Normal file
8
package/linux/control/kmod-sched.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-sched
|
||||
Priority: optional
|
||||
Section: sys
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Kernel schedulers for IP traffic
|
||||
8
package/linux/control/kmod-tun.control
Normal file
8
package/linux/control/kmod-tun.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-tun
|
||||
Priority: optional
|
||||
Section: sys
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Kernel TUN/TAP extension
|
||||
8
package/linux/control/kmod-usb.control
Normal file
8
package/linux/control/kmod-usb.control
Normal file
@@ -0,0 +1,8 @@
|
||||
Package: kmod-usb
|
||||
Priority: optional
|
||||
Section: sys
|
||||
Version: 2.4.29-1
|
||||
Architecture: mipsel
|
||||
Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
|
||||
Source: buildroot internal
|
||||
Description: Kernel modules for USB/SCSI support
|
||||
BIN
package/linux/kernel-patches/105-makefile-mkdep-fix.bz2
Normal file
BIN
package/linux/kernel-patches/105-makefile-mkdep-fix.bz2
Normal file
Binary file not shown.
BIN
package/linux/kernel-patches/304-netfilter-ipp2p-0.7.1.bz2
Normal file
BIN
package/linux/kernel-patches/304-netfilter-ipp2p-0.7.1.bz2
Normal file
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user