package/lantiq: make lantiq kernel modules work with xway_legacy
[openwrt/openwrt.git] / package / kernel / lantiq / ltq-adsl-fw / Makefile
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ltq-adsl-fw
11 PKG_VERSION:=0.1
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/ltq-dsl-fw-$(PKG_VERSION)
15 PKG_SOURCE:=ltq-dsl-fw-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
17 PKG_MD5SUM:=4700a36b66b955b4c5544227267356f4
18 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
19
20 PKG_FLAGS:=nonshared
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/kmod-ltq-adsl-fw-template
25 TITLE+=Firmware Annex-$(1) $(2)
26 SECTION:=sys
27 CATEGORY:=Kernel modules
28 SUBMENU:=Network Devices
29 VARIANT:= $(2)-fw-$(1)
30 SOC:=$(2)
31 ANNEX:=$(1)
32 URL:=http://www.lantiq.com/
33 DEPENDS:=@$(3) +kmod-ltq-adsl-$(2)
34 endef
35
36 Package/kmod-ltq-adsl-danube-fw-a=$(call Package/kmod-ltq-adsl-fw-template,a,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
37 Package/kmod-ltq-adsl-danube-fw-b=$(call Package/kmod-ltq-adsl-fw-template,b,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
38 Package/kmod-ltq-adsl-ar9-fw-a=$(call Package/kmod-ltq-adsl-fw-template,a,ar9,TARGET_lantiq_xway)
39 Package/kmod-ltq-adsl-ar9-fw-b=$(call Package/kmod-ltq-adsl-fw-template,b,ar9,TARGET_lantiq_xway)
40 Package/kmod-ltq-adsl-ase-fw-a=$(call Package/kmod-ltq-adsl-fw-template,a,ase,TARGET_lantiq_ase)
41 Package/kmod-ltq-adsl-ase-fw-b=$(call Package/kmod-ltq-adsl-fw-template,b,ase,TARGET_lantiq_ase)
42
43 define Build/Compile
44 endef
45
46 define Package/kmod-ltq-adsl-$(BUILD_VARIANT)/install
47 $(INSTALL_DIR) $(1)/lib/firmware/
48 $(CP) $(PKG_BUILD_DIR)/$(FW_NAME)/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/
49 ln -s /lib/firmware/$(FW_NAME)/ltq-dsl-fw-$(ANNEX)-$(SOC).bin $(1)/lib/firmware/adsl.bin
50 endef
51
52 $(eval $(call BuildPackage,kmod-ltq-adsl-danube-fw-a))
53 $(eval $(call BuildPackage,kmod-ltq-adsl-danube-fw-b))
54 $(eval $(call BuildPackage,kmod-ltq-adsl-ase-fw-a))
55 $(eval $(call BuildPackage,kmod-ltq-adsl-ase-fw-b))
56 $(eval $(call BuildPackage,kmod-ltq-adsl-ar9-fw-a))
57 $(eval $(call BuildPackage,kmod-ltq-adsl-ar9-fw-b))