X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/7ec35f05dfd43a7482f7cebae0fab2ead56b3b07..404ee35b3167a457774e6747c98702bc478fd578:/openwrt/target/linux/linux-2.4/Makefile?ds=sidebyside diff --git a/openwrt/target/linux/linux-2.4/Makefile b/openwrt/target/linux/linux-2.4/Makefile index 9f95d721d..bd1dd6c5d 100644 --- a/openwrt/target/linux/linux-2.4/Makefile +++ b/openwrt/target/linux/linux-2.4/Makefile @@ -1,18 +1,10 @@ -############################################################# # $Id$ -# # Linux 2.4 kernel target for the OpenWRT project -# -# patches are sorted by numbers -# 0xx needed patches for board, cpu, filesystem -# 1xx addon patches for new features (netfilter, ebtables, cifs,..) -# 2xx compile fixes, driver fixes -# -############################################################# include $(TOPDIR)/rules.mk include ../rules.mk +KERNEL:=2.4 LINUX_VERSION:=2.4.30 MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) LINUX_KCONFIG:=./config/$(BOARD) @@ -24,7 +16,7 @@ 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 := $(TARGET_DIR)/lib/modules/$(LINUX_VERSION) +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 @@ -99,6 +91,9 @@ $(eval $(call KMOD_template,NFS,nfs,\ $(MODULES_DIR)/kernel/fs/nfs/*.o \ $(MODULES_DIR)/kernel/net/sunrpc/*.o \ ,CONFIG_NFS_FS,,30,sunrpc lockd nfs)) +$(eval $(call KMOD_template,SOUNDCORE,soundcore,\ + $(MODULES_DIR)/kernel/drivers/sound/soundcore.o \ +,CONFIG_SOUND,,30,soundcore)) $(eval $(call KMOD_template,USB,usb-core,\ $(MODULES_DIR)/kernel/drivers/usb/usbcore.o \ ,CONFIG_USB,,50,usbcore)) @@ -111,6 +106,23 @@ $(eval $(call KMOD_template,USB_OHCI,usb-ohci,\ $(eval $(call KMOD_template,USB2,usb2,\ $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.o \ ,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd)) + +$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \ +,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial)) +$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \ +,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa)) +$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \ +,CONFIG_USB_SERIAL_IR,kmod-usb-serial,61,ftdi_usb)) +$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \ +,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232)) +$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \ +,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303)) + $(eval $(call KMOD_template,USB_STORAGE,usb-storage,\ $(MODULES_DIR)/kernel/drivers/scsi/*.o \ $(MODULES_DIR)/kernel/drivers/usb/storage/*.o \ @@ -118,6 +130,9 @@ $(eval $(call KMOD_template,USB_STORAGE,usb-storage,\ $(eval $(call KMOD_template,USB_PRINTER,usb-printer,\ $(MODULES_DIR)/kernel/drivers/usb/printer.o \ ,CONFIG_USB_PRINTER,kmod-usb-core,60,printer)) +$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\ + $(MODULES_DIR)/kernel/drivers/usb/audio.o \ +,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio)) $(eval $(call KMOD_template,IDE,ide,\ $(MODULES_DIR)/kernel/drivers/ide/*.o \ $(MODULES_DIR)/kernel/drivers/ide/*/*.o \ @@ -178,6 +193,10 @@ $(eval $(call KMOD_template,VIDEODEV,videodev,\ $(eval $(call KMOD_template,PWC,pwc,\ $(MODULES_DIR)/kernel/drivers/usb/pwc.o \ ,CONFIG_USB_PWC)) +$(eval $(call KMOD_template,AX25,ax25,\ + $(MODULES_DIR)/kernel/net/ax25/ax25.o \ + $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \ +,CONFIG_AX25)) $(TARGETS): $(PACKAGE_DIR) @@ -192,8 +211,8 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) touch $(LINUX_DIR)/.unpacked $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - $(PATCH) $(LINUX_DIR) ./patches/generic - [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) + $(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 @@ -202,24 +221,24 @@ $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched $(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) -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) -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) -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 $< $@ + $(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) -C $(LINUX_DIR) DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install + $(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 @@ -231,6 +250,7 @@ $(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 @@ -242,45 +262,44 @@ $(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 $(PKG_RELEASE) $(ARCH) + $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(PKG_RELEASE) $(ARCH) echo 'Package: kernel-$(LINUX_VERSION)-$(BOARD)' >> $(KERNEL_IDIR)/CONTROL/control if [ -f ./config/$(BOARD).modules ]; then \ cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \ fi - $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) + $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) $(MAKE_TRACE) source: $(DL_DIR)/$(LINUX_SOURCE) prepare: $(LINUX_DIR)/.configured -compile: $(STAMP_DIR)/.linux-compile +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)/package \ - TARGET_DIR="$(LINUX_TARGET_DIR)" \ - IPKG_CONF="$(LINUX_BUILD_DIR)" \ - BOARD="$(BOARD)" \ - install $(MAKE) -C $(TOPDIR)/target/linux/package \ $(KPKG_MAKEOPTS) \ install - [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true + @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true; } $(MAKE_TRACE) mostlyclean: + @$(PKG_TRACE) Cleaning... 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) -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) clean $(MAKE_TRACE); \ fi - $(MAKE) compile + $(MAKE) compile $(MAKE_TRACE) clean: + @$(PKG_TRACE) Cleaning... rm -f $(STAMP_DIR)/.linux-compile rm -rf $(LINUX_BUILD_DIR) rm -f $(TARGETS)