############################################################# # # rt2570 # ############################################################# rt2570_VER:=cvs-daily rt2570_SOURCE_URL:=http://$(SF_DL_HOST)/project/rt2400/Final%20software%20release/rt2570-legacy-final-cvs rt2570_SOURCE:=rt2570-$(rt2570_VER).tar.gz rt2570_BUILD_DIR:=$(BUILD_DIR)/rt2570-$(rt2570_VER) # # download source # $(DL_DIR)/$(rt2570_SOURCE)/.fetched: $(WGET) -P $(DL_DIR) $(rt2570_SOURCE_URL)/$(rt2570_SOURCE) # # unpack source and potentially patch package; use bzcat for bz2 files # $(rt2570_BUILD_DIR)/.unpacked: $(DL_DIR)/$(rt2570_SOURCE)/.fetched mkdir $(rt2570_BUILD_DIR) zcat $(DL_DIR)/$(rt2570_SOURCE) | tar -C $(rt2570_BUILD_DIR) $(TAR_OPTIONS) - touch $@ # # configure source, add additional options to configure as required # call ./configure --help to find out about additional options # $(rt2570_BUILD_DIR)/.configured: $(rt2570_BUILD_DIR)/.unpacked cd $(rt2570_BUILD_DIR) mv $(rt2570_BUILD_DIR)/$(shell ls $(rt2570_BUILD_DIR))/Module $(rt2570_BUILD_DIR)/Module touch $@ # # build package # $(rt2570_BUILD_DIR)/Module/rt2570.ko: $(rt2570_BUILD_DIR)/.configured cd $(rt2570_BUILD_DIR)/Module ; \ $(MAKE) KERNDIR=$(LINUX_DIR) \ COPTS="$(TARGET_CONFIGURE_CFLAGS)" \ CC=$(TARGET_CC) PATCHLEVEL=6 module # # install package # $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2570.ko: $(rt2570_BUILD_DIR)/Module/rt2570.ko mkdir -p $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net cp $(rt2570_BUILD_DIR)/Module/rt2570.ko $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2570.ko # # to get rt2570, we need $(TARGET_DIR)/usr/sbin/rt2570 # - to get $(TARGET_DIR)/usr/sbin/rt2570, we need $(rt2570_BUILD_DIR)/rt2570 # - before trying to build rt2570, we need # $(rt2570_BUILD_DIR)/.configured # ... rt2570: $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/drivers/net/rt2570.ko rt2570-source: $(DL_DIR)/$(rt2570_SOURCE) rt2570-clean: -$(MAKE) -C $(rt2570_BUILD_DIR) KERNDIR=$(LINUX_DIR) clean rt2570-dirclean: rm -rf $(rt2570_BUILD_DIR)