95c56270fe0c936c5c1e78dda107f1614424d151
[openwrt/openwrt.git] / package / firmware / ipq-wifi / Makefile
1 include $(TOPDIR)/rules.mk
2 include $(INCLUDE_DIR)/version.mk
3
4 PKG_NAME:=ipq-wifi
5 PKG_RELEASE:=1
6
7 include $(INCLUDE_DIR)/package.mk
8
9 define Build/Prepare
10 mkdir -p $(PKG_BUILD_DIR)
11 endef
12
13 define Build/Compile
14 endef
15
16 ALLWIFIBOARDS:=fritz4040
17 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
18
19 define Package/ipq-wifi-default
20 SUBMENU:=ath10k IPQ4019 Boarddata
21 SECTION:=firmware
22 CATEGORY:=Firmware
23 DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019
24 TITLE:=Custom Board
25 endef
26
27 define generate-ipq-wifi-package
28 define Package/ipq-wifi-$(1)
29 $(call Package/ipq-wifi-default)
30 TITLE:=Board for $(3)
31 CONFLICTS:=$(PREV_BOARD)
32 endef
33
34 define Package/ipq-wifi-$(1)/description
35 This device custom package board-2.bin overwrites the board-2.bin
36 file which is supplied by the ath10k-firmware-qca4019 package.
37
38 This is package is only necessary for the $(3).
39 Don't install it for any other device!
40 endef
41
42 define Package/ipq-wifi-$(1)/install-overlay
43 $(INSTALL_DIR) $$(1)/lib/firmware/ath10k/QCA4019/hw1.0
44 $(INSTALL_DATA) ./$(2) $$(1)/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
45 endef
46
47 PREV_BOARD+=ipq-wifi-$(1)
48 endef
49
50 $(eval $(call generate-ipq-wifi-package,fritz4040,board-fritz4040.bin,AVM FRITZBox 4040))
51
52 $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))