add bcm43xx
[openwrt.git] / openwrt / target / linux / package / bcm43xx-dscape / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include ../../rules.mk
5
6 PKG_NAME := bcm43xx-dscape
7 PKG_VERSION := 20060104
8 PKG_RELEASE := 1
9
10 PKG_SOURCE_URL := http://ftp.berlios.de/pub/bcm43xx/snapshots/bcm43xx
11 PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_CAT := bzcat
13
14 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15
16 FIRMWARE_BLOB := wl_apsta-3.130.20.0.o
17 FIRMWARE_BLOB_URL := http://downloads.openwrt.org/sources
18 FIRMWARE_BLOB_MD5SUM := e08665c5c5b66beb9c3b2dd54aa80cb3
19
20 include $(TOPDIR)/package/rules.mk
21
22 $(eval $(call PKG_template,KMOD_BCM43XX_DSCAPE,kmod-$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)+0.$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(KERNEL_RELEASE))))
23
24 ifeq ($(KERNEL_DIR),)
25 KERNEL_DIR:=$(LINUX_DIR)
26 endif
27 KERNEL_VERSION=$(shell echo "$(LINUX_VERSION)" | cut -d. -f1,2)
28
29 $(PKG_BUILD_DIR)/.configured:
30 touch $@
31
32 $(PKG_BUILD_DIR)/fwcutter/.built:
33 mkdir -p $(PKG_BUILD_DIR)/fwcutter
34 cp ./fwcutter/* $(PKG_BUILD_DIR)/fwcutter/
35 $(SCRIPT_DIR)/download.pl "$(PKG_BUILD_DIR)/fwcutter" "$(FIRMWARE_BLOB)" "$(FIRMWARE_BLOB_MD5SUM)" $(FIRMWARE_BLOB_URL)
36 $(MAKE) -C $(PKG_BUILD_DIR)/fwcutter
37 $(PKG_BUILD_DIR)/fwcutter/fwcutter -w $(PKG_BUILD_DIR)/fwcutter $(PKG_BUILD_DIR)/fwcutter/$(FIRMWARE_BLOB)
38 touch $@
39
40 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/fwcutter/.built
41 $(MAKE) -C "$(KERNEL_DIR)" \
42 CROSS_COMPILE="$(TARGET_CROSS)" \
43 ARCH="$(LINUX_KARCH)" \
44 PATH="$(TARGET_PATH)" \
45 SUBDIRS="$(PKG_BUILD_DIR)" \
46 LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/ieee80211-dscape -I$(KERNEL_DIR)/include -DBCM47XX=1" \
47 modules
48 touch $@
49
50 $(IPKG_KMOD_BCM43XX_DSCAPE):
51 install -m0755 -d $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/modules/$(LINUX_VERSION)
52 install -m0755 -d $(IDIR_KMOD_BCM43XX_DSCAPE)/etc/modules.d
53 ( \
54 echo 80211; \
55 echo rate_control; \
56 echo bcm43xx; \
57 ) >& $(IDIR_KMOD_BCM43XX_DSCAPE)/etc/modules.d/50-bcm43xx
58 cp -fpR $(PKG_BUILD_DIR)/*.ko $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/modules/$(LINUX_VERSION)
59 install -m0755 -d $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/firmware
60 cp -fpR $(PKG_BUILD_DIR)/fwcutter/*.fw $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/firmware/
61 $(IPKG_BUILD) $(IDIR_KMOD_BCM43XX_DSCAPE) $(PACKAGE_DIR)
This page took 0.041567 seconds and 5 git commands to generate.