layerscape: clean up kernel patches
[openwrt/openwrt.git] / package / firmware / fman-ucode / Makefile
1 #
2 # Copyright (C) 2016 Jiang Yutang <jiangyutang1978@gmail.com>
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 include $(INCLUDE_DIR)/image.mk
10
11 PKG_NAME:=fman-ucode
12 PKG_VERSION:=2017.09
13 PKG_RELEASE:=1
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=https://github.com/qoriq-open-source/fm-ucode.git
17 PKG_SOURCE_VERSION:=c275e91392e2adab1ed22f3867b8269ca3c54014
18 PKG_MIRROR_HASH:=80d8d2454063b7f730ef49d7a44be8f8870711ee5109c53a0881b62026037a37
19
20 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21
22 PKG_FLAGS:=nonshared
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define fman/Default
27 TITLE:=
28 CONFIG:=
29 endef
30
31 define fman/ls1043ardb
32 TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board
33 CONFIG=fsl_fman_ucode_ls1043_r1.1_106_4_18.bin
34 endef
35
36 define fman/ls1046ardb
37 TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board
38 CONFIG=fsl_fman_ucode_ls1046_r1.0_106_4_18.bin
39 endef
40
41 FMANS := \
42 ls1043ardb \
43 ls1046ardb
44
45 define Package/fman/template
46 define Package/fman-layerscape-$(1)
47 SECTION:=firmware
48 CATEGORY:=Firmware
49 DEPENDS:=@TARGET_layerscape
50 TITLE:=$(2)
51 URL:=https://github.com/qoriq-open-source/fm-ucode.git
52 VARIANT:=$(1)
53 MAINTAINER:=Jiang Yutang <jiangyutang1978@gmail.com>
54 endef
55 endef
56
57 define BuildFMANPackage
58 $(eval $(fman/Default))
59 $(eval $(fman/$(1)))
60 $(call Package/fman/template,$(1),$(TITLE))
61 endef
62
63 ifdef BUILD_VARIANT
64 $(eval $(call fman/$(BUILD_VARIANT)))
65 FMAN_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
66 endif
67
68 define Build/Compile
69 endef
70
71 define Package/fman/install/default
72 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
73 $(CP) $(PKG_BUILD_DIR)/$(FMAN_CONFIG) $(STAGING_DIR_IMAGE)/$(1)-fman.bin
74 endef
75
76 define Package/fman/install/template
77 define Package/fman-layerscape-$(1)/install
78 $(call Package/fman/install/default,$(2))
79 endef
80 endef
81
82 $(foreach f,$(FMANS), \
83 $(eval $(call Package/fman/install/template,$(f),$(f))) \
84 )
85
86 $(foreach f,$(FMANS), \
87 $(eval $(call BuildFMANPackage,$(f))) \
88 $(eval $(call BuildPackage,fman-layerscape-$(f))) \
89 )