X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/4b5c94b6556dbfaa4dd9ff5b31066fa9a4709bd3..a64cf0adff673a21bce78cafb2e3ec15b59faec7:/openwrt/target/linux/linux-2.4/Makefile diff --git a/openwrt/target/linux/linux-2.4/Makefile b/openwrt/target/linux/linux-2.4/Makefile index e8ce928e8..6993c3de7 100644 --- a/openwrt/target/linux/linux-2.4/Makefile +++ b/openwrt/target/linux/linux-2.4/Makefile @@ -24,17 +24,14 @@ LINUX_KCONFIG:=./config/$(BOARD) LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-2.4-$(BOARD) LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux -LINUX_IMAGE:=$(LINUX_BUILD_DIR)/kernel-image -LINUX_FORMAT=zImage LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ -e 's/mipsel/mips/' \ -e 's/powerpc/ppc/' \ -e 's/sh[234]/sh/' \ ) -LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/ +LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/sources/ LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2 -LINUX_BINLOC := arch/$(LINUX_KARCH)/bcm947xx/compressed/piggy 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) @@ -43,29 +40,24 @@ IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_TARGET_DIR) IPKG_CO PKG_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules PKG_RELEASE := 1 -KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)_$(ARCH).ipk +KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel-$(LINUX_VERSION)-$(BOARD)_$(PKG_RELEASE)_$(ARCH).ipk KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg include $(LINUX_KCONFIG) + +INSTALL_TARGETS := $(KERNEL_IPKG) +TARGETS := + ifeq ($(BOARD),brcm) include ./broadcom.mk endif -TARGETS := -INSTALL_TARGETS := $(KERNEL_IPKG) - -$(eval $(call KMOD_template,DIAG,diag,\ - $(MODULES_DIR)/kernel/drivers/net/diag/diag.o \ -)) -$(eval $(call KMOD_template,BRCM_WL,brcm-wl,\ - $(MODULES_DIR)/kernel/drivers/net/wl/wl.o \ -,CONFIG_WL)) +$(eval $(call KMOD_template,USB_ACM,usb-acm,\ + $(MODULES_DIR)/kernel/drivers/usb/acm.o \ +,CONFIG_USB_ACM)) $(eval $(call KMOD_template,B44,b44,\ $(MODULES_DIR)/kernel/drivers/net/b44.o \ ,CONFIG_B44)) -$(eval $(call KMOD_template,BRCM_ET,brcm-et,\ - $(MODULES_DIR)/kernel/drivers/net/et/et.o \ -,CONFIG_ET)) $(eval $(call KMOD_template,ARPT,arptables,\ $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.o \ ,CONFIG_IP_NF_ARPTABLES)) @@ -108,11 +100,6 @@ $(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)) -$(eval $(call KMOD_template,LP,lp,\ - $(MODULES_DIR)/kernel/drivers/parport/parport.o \ - $(MODULES_DIR)/kernel/drivers/parport/parport_splink.o \ - $(MODULES_DIR)/kernel/drivers/char/lp.o \ -,CONFIG_PARPORT)) $(eval $(call KMOD_template,IDE,ide,\ $(MODULES_DIR)/kernel/drivers/ide/*.o \ $(MODULES_DIR)/kernel/drivers/ide/*/*.o \ @@ -164,7 +151,7 @@ $(TARGETS): $(PACKAGE_DIR) $(PACKAGE_DIR): mkdir -p $(PACKAGE_DIR) -$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) $(DL_DIR)/$(LINUX_ET_DRIVER) +$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) -mkdir -p $(LINUX_BUILD_DIR) bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) - rm -f $(LINUX_DIR) @@ -172,8 +159,8 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) $(DL_DIR)/$(LINUX_BINARY_WL_DR touch $(LINUX_DIR)/.unpacked $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) $(PATCH) $(LINUX_DIR) ./patches/generic + [ -d ./patches/$(BOARD) ] && $(PATCH) $(LINUX_DIR) ./patches/$(BOARD) touch $(LINUX_DIR)/.patched $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched @@ -189,16 +176,13 @@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) dep touch $(LINUX_DIR)/.depend_done -$(LINUX_DIR)/$(LINUX_BINLOC): $(LINUX_DIR)/.depend_done - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_FORMAT) +$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) -$(LINUX_KERNEL): $(LINUX_DIR)/$(LINUX_BINLOC) - cp -fa $< $@ +$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux + $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ touch -c $(LINUX_KERNEL) -$(LINUX_IMAGE): $(LINUX_KERNEL) - cat $^ | $(BUILD_DIR)/lzma/lzma e -si -so -eos -lc1 -lp2 -pb2 > $@ || (rm -f $@ && false) - $(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 @@ -216,7 +200,8 @@ $(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)-$(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