summaryrefslogtreecommitdiff
path: root/openwrt/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-06-11 01:50:07 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-06-11 01:50:07 +0000
commitb61b5ddf0fd06825e7d978c87959d4c371936dec (patch)
treed54019c3606166f5aa15833de39baecfb89c6ef2 /openwrt/target
parent55474bd3a4ba2f59088ce9c5a60f21e80a6714bb (diff)
downloadmtk-20170518-b61b5ddf0fd06825e7d978c87959d4c371936dec.zip
mtk-20170518-b61b5ddf0fd06825e7d978c87959d4c371936dec.tar.gz
mtk-20170518-b61b5ddf0fd06825e7d978c87959d4c371936dec.tar.bz2
add kernel package with version-specific /etc/modules
SVN-Revision: 1195
Diffstat (limited to 'openwrt/target')
-rw-r--r--openwrt/target/linux/control/kernel.control6
-rw-r--r--openwrt/target/linux/linux-2.4/Makefile16
-rw-r--r--openwrt/target/linux/linux-2.4/config/brcm.modules2
-rw-r--r--openwrt/target/linux/rules.mk2
4 files changed, 22 insertions, 4 deletions
diff --git a/openwrt/target/linux/control/kernel.control b/openwrt/target/linux/control/kernel.control
new file mode 100644
index 0000000..5432d21
--- /dev/null
+++ b/openwrt/target/linux/control/kernel.control
@@ -0,0 +1,6 @@
+Package: kernel
+Priority: optional
+Section: sys
+Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
+Source: buildroot internal
+Description: Virtual package for the Kernel
diff --git a/openwrt/target/linux/linux-2.4/Makefile b/openwrt/target/linux/linux-2.4/Makefile
index c9b61a6..db7d71c 100644
--- a/openwrt/target/linux/linux-2.4/Makefile
+++ b/openwrt/target/linux/linux-2.4/Makefile
@@ -40,6 +40,9 @@ MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR)
TARGET_MODULES_DIR := $(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
+KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)_$(ARCH).ipk
+KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg
+
include $(LINUX_KCONFIG)
ifeq ($(BOARD),brcm)
include ./broadcom.mk
@@ -49,7 +52,7 @@ PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules
PKG_RELEASE := 1
TARGETS :=
-INSTALL_TARGETS :=
+INSTALL_TARGETS := $(KERNEL_IPKG)
$(eval $(call KMOD_template,DIAG,diag,\
$(MODULES_DIR)/kernel/drivers/net/diag/diag.o \
@@ -210,6 +213,15 @@ $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
$(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) $(ARCH)
+ if [ -f ./config/$(BOARD).modules ]; then \
+ cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \
+ fi
+ $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR)
+
source: $(DL_DIR)/$(LINUX_SOURCE)
prepare: $(LINUX_DIR)/.configured
compile: $(LINUX_DIR)/.modules_done $(TARGETS)
@@ -220,7 +232,7 @@ compile: $(LINUX_DIR)/.modules_done $(TARGETS)
KERNEL_DIR="$(LINUX_SOURCE_DIR)" \
LINUX_VERSION="$(LINUX_VERSION)"
-install: compile $(TARGET_MODULES_DIR)
+install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG)
rm -rf $(LINUX_BUILD_DIR)/root*
cp -a $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/
echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
diff --git a/openwrt/target/linux/linux-2.4/config/brcm.modules b/openwrt/target/linux/linux-2.4/config/brcm.modules
new file mode 100644
index 0000000..e717eae
--- /dev/null
+++ b/openwrt/target/linux/linux-2.4/config/brcm.modules
@@ -0,0 +1,2 @@
+et
+wl
diff --git a/openwrt/target/linux/rules.mk b/openwrt/target/linux/rules.mk
index be10370..451ec26 100644
--- a/openwrt/target/linux/rules.mk
+++ b/openwrt/target/linux/rules.mk
@@ -24,5 +24,3 @@ $$(PKG_$(1)): $(LINUX_DIR)/.modules_done
$(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR)
endef
-
-