From 4c98f8465d7b207b150b3c67705e35297d7804be Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 19 Oct 2006 04:35:29 +0000 Subject: finally kill KMOD_template - removes a big chunk of legacy build code git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5222 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/kernel-build.mk | 32 ++--------------------- include/kernel.mk | 47 ---------------------------------- include/modules-2.4.mk | 60 ------------------------------------------- include/modules-2.6.mk | 67 ------------------------------------------------- 4 files changed, 2 insertions(+), 204 deletions(-) (limited to 'include') diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 251e985e8..0697b79a5 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -5,7 +5,6 @@ # See /LICENSE for more information. # include $(INCLUDE_DIR)/host.mk --include $(INCLUDE_DIR)/modules-$(KERNEL).mk LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ @@ -13,11 +12,6 @@ LINUX_SITE=http://www.us.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_IDIR:=$(KERNEL_BUILD_DIR)/kernel-ipkg -KERNEL_IPKG:=$(KERNEL_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk -TARGETS += $(KERNEL_IPKG) -INSTALL_TARGETS += $(KERNEL_IPKG) - ifneq (,$(findstring uml,$(BOARD))) LINUX_KARCH:=um else @@ -39,11 +33,6 @@ ifneq (,$(findstring ppc,$(BOARD))) endif -$(TARGETS): $(PACKAGE_DIR) - -$(PACKAGE_DIR): - mkdir -p $@ - $(DL_DIR)/$(LINUX_SOURCE): -mkdir -p $(DL_DIR) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) @@ -84,7 +73,7 @@ else echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config endif -$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config +$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile ramdisk-config $(MAKE) -j$(CONFIG_JLEVEL) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) $(KERNELNAME) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux @@ -98,7 +87,6 @@ $(LINUX_DIR)/.modules_done: touch $(LINUX_DIR)/.modules_done modules: $(LINUX_DIR)/.modules_done -packages: $(TARGETS) $(LINUX_DIR)/.linux-compile: @rm -f $(BUILD_DIR)/linux @@ -106,15 +94,6 @@ $(LINUX_DIR)/.linux-compile: @$(MAKE) modules touch $@ -$(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) $(KERNEL_BUILD_DIR) - $(TOPDIR)/.kernel.mk: $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL)/Makefile echo "CONFIG_BOARD:=$(BOARD)" > $@ echo "CONFIG_KERNEL:=$(KERNEL)" >> $@ @@ -122,17 +101,11 @@ $(TOPDIR)/.kernel.mk: $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL)/Makefile echo "CONFIG_LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ echo "CONFIG_LINUX_KARCH:=$(LINUX_KARCH)" >> $@ -pkg-install: FORCE - @for pkg in $(INSTALL_TARGETS); do \ - $(IPKG) install $$pkg || echo; \ - done - download: $(DL_DIR)/$(LINUX_SOURCE) prepare: $(LINUX_DIR)/.configured - @mkdir -p $(LINUX_DIR) $(PACKAGE_DIR) + @mkdir -p $(LINUX_DIR) compile: prepare $(LINUX_DIR)/.linux-compile - @$(MAKE) packages install: compile $(LINUX_KERNEL) @@ -153,5 +126,4 @@ rebuild: FORCE clean: FORCE rm -f $(STAMP_DIR)/.linux-compile rm -rf $(KERNEL_BUILD_DIR) - rm -f $(TARGETS) diff --git a/include/kernel.mk b/include/kernel.mk index 7a36cee1a..af5d9455f 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -45,7 +45,6 @@ else MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) - KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux endif @@ -116,49 +115,3 @@ define AutoLoad add_module $(1) "$(2)"; endef - -# FIXME: remove this crap -define KMOD_template -ifeq ($$(strip $(4)),) -KDEPEND_$(1):=m -else -KDEPEND_$(1):=$($(4)) -endif - -IDEPEND_$(1):=kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)) $(foreach pkg,$(5),", $(pkg)") - -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 ($$(CONFIG_PACKAGE_KMOD_$(1)),) -TARGETS += $$(PKG_$(1)) -endif -ifeq ($$(CONFIG_PACKAGE_KMOD_$(1)),y) -INSTALL_TARGETS += $$(PKG_$(1)) -endif -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)-$(LINUX_RELEASE) $(ARCH) - echo "Depends: $$(IDEPEND_$(1))" >> $$(I_$(1))/CONTROL/control -ifneq ($(strip $(3)),) - mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION) - $(CP) $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION) -endif -ifneq ($(6),) - mkdir -p $$(I_$(1))/etc/modules.d - for module in $(7); do \ - echo $$$$module >> $$(I_$(1))/etc/modules.d/$(6)-$(2); \ - done - echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst - echo "[ -z \"\$$$$IPKG_INSTROOT\" ] || exit" >> $$(I_$(1))/CONTROL/postinst - echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst - echo "load_modules /etc/modules.d/$(6)-$(2)" >> $$(I_$(1))/CONTROL/postinst - chmod 0755 $$(I_$(1))/CONTROL/postinst -endif - $(8) - $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) -endef - diff --git a/include/modules-2.4.mk b/include/modules-2.4.mk index 8a2363481..bd44b5f38 100644 --- a/include/modules-2.4.mk +++ b/include/modules-2.4.mk @@ -4,70 +4,10 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -include $(INCLUDE_DIR)/netfilter.mk - - -# Multimedia - -$(eval $(call KMOD_template,PWC,pwc,\ - $(MODULES_DIR)/kernel/drivers/usb/pwc.o \ -,CONFIG_USB_PWC,kmod-videodev,63,pwc)) - -$(eval $(call KMOD_template,VIDEODEV,videodev,\ - $(MODULES_DIR)/kernel/drivers/media/video/videodev.o \ -,CONFIG_VIDEO_DEV,,62,videodev)) - - -# Network devices - -$(eval $(call KMOD_template,NET_AIRO,net-airo,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/airo.o \ -,CONFIG_AIRO,,10,airo)) - -$(eval $(call KMOD_template,NET_HERMES,net-hermes,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.o \ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.o \ -,CONFIG_HERMES,,10,hermes orinoco)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.o \ -,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.o \ -,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) - -$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.o \ -,CONFIG_PRISM54,,10,prism54)) - - -# PCMCIA/CardBus - -$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\ - $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.o \ - $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.o \ - $(MODULES_DIR)/kernel/drivers/pcmcia/ds.o \ -,CONFIG_PCMCIA,,50,pcmcia_core yenta_socket ds)) - -$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\ - $(MODULES_DIR)/kernel/drivers/char/pcmcia/serial_cs.o \ -,CONFIG_PCMCIA_SERIAL_CS,kmod-pcmcia-core,51,serial_cs)) # Misc. devices -$(eval $(call KMOD_template,AX25,ax25,\ - $(MODULES_DIR)/kernel/net/ax25/ax25.o \ - $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \ -,CONFIG_AX25,,90,ax25 mkiss)) - -$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\ - $(MODULES_DIR)/kernel/net/bluetooth/*.o \ - $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/*.o \ - $(MODULES_DIR)/kernel/drivers/bluetooth/*.o \ -,CONFIG_BLUEZ)) - $(eval $(call KMOD_template,SOFTDOG,softdog,\ $(MODULES_DIR)/kernel/drivers/char/softdog.o \ ,CONFIG_SOFT_WATCHDOG,,95,softdog)) diff --git a/include/modules-2.6.mk b/include/modules-2.6.mk index 60ade6f23..087d425fc 100644 --- a/include/modules-2.6.mk +++ b/include/modules-2.6.mk @@ -4,74 +4,7 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -NF_2_6:=1 -include $(INCLUDE_DIR)/netfilter.mk - -# Multimedia - -$(eval $(call KMOD_template,PWC,pwc,\ - $(MODULES_DIR)/kernel/drivers/usb/media/pwc/pwc.ko \ -,CONFIG_USB_PWC,kmod-videodev,63,pwc)) - -$(eval $(call KMOD_template,VIDEODEV,videodev,\ - $(MODULES_DIR)/kernel/drivers/media/video/v4l1-compat.ko \ - $(MODULES_DIR)/kernel/drivers/media/video/v4l2-common.ko \ - $(MODULES_DIR)/kernel/drivers/media/video/videodev.ko \ -,CONFIG_VIDEO_DEV,,62,videodev)) - - -# Network devices - -$(eval $(call KMOD_template,NET_AIRO,net-airo,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/airo.ko \ -,CONFIG_AIRO,,10,airo)) - -$(eval $(call KMOD_template,NET_HERMES,net-hermes,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.ko \ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.ko \ -,CONFIG_HERMES,,10,hermes orinoco)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.ko \ -,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.ko \ -,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) - -$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.ko \ -,CONFIG_PRISM54,,10,prism54)) - - -# PCMCIA/CardBus - -$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\ - $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia.ko \ - $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.ko \ - $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.ko \ - $(MODULES_DIR)/kernel/drivers/pcmcia/rsrc_nonstatic.ko \ -,CONFIG_PCMCIA,,50,pcmcia_core pcmcia yenta_socket rsrc_nonstatic)) - -$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\ - $(MODULES_DIR)/kernel/drivers/serial/serial_cs.ko \ -,CONFIG_SERIAL_8250_CS)) - # Misc. devices -$(eval $(call KMOD_template,AX25,ax25,\ - $(MODULES_DIR)/kernel/net/ax25/ax25.ko \ - $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.ko \ -,CONFIG_AX25,,90,ax25 mkiss)) - -$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\ - $(MODULES_DIR)/kernel/net/bluetooth/bluetooth.ko \ - $(MODULES_DIR)/kernel/net/bluetooth/l2cap.ko \ - $(MODULES_DIR)/kernel/net/bluetooth/sco.ko \ - $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/rfcomm.ko \ - $(MODULES_DIR)/kernel/drivers/bluetooth/hci_uart.ko \ - $(MODULES_DIR)/kernel/drivers/bluetooth/hci_usb.ko \ -,CONFIG_BT)) - -- cgit v1.2.3