1dd0f38fc2d218de7ee33196b530e114a1f4b344
[openwrt/staging/wigyori.git] / package / boot / at91bootstrap / Makefile
1 #
2 # Copyright (C) 2016 Microchip Technology Inc.
3 # <Sandeepsheriker.mallikarjun@microchip.com>
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=at91bootstrap
12 PKG_VERSION:=v4.0.3
13 PKG_MIRROR_HASH:=1ecdc31a13350fcdcaa3f77ed8ad73906f79fc668dbb2f337e1d5dd877bf9882
14 PKG_SOURCE_VERSION:=1d9e673698d9db4a4f2301559f481274de2e75ae
15 BINARIES_DIR:=build/binaries
16
17 AT91BOOTSTRAP_V4=y
18 ifdef CONFIG_PACKAGE_at91bootstrap-sama5d4_xplaineddf_uboot_secure
19 AT91BOOTSTRAP_V4=n
20 else ifdef CONFIG_TARGET_at91_sam9x
21 ifndef CONFIG_TARGET_at91_sam9x_DEVICE_microchip_sam9x60ek
22 AT91BOOTSTRAP_V4=n
23 endif
24 endif
25
26 ifeq ($(AT91BOOTSTRAP_V4),n)
27 PKG_VERSION=v3.10.4
28 PKG_MIRROR_HASH=6fe61fe90838e785917383bb9e887fa05e1bd061a6725954242f504e38b5c426
29 PKG_SOURCE_VERSION=404846dd283894367a015ca59189bcf927d92e11
30 BINARIES_DIR=binaries
31 endif
32
33 PKG_RELEASE:=2
34
35 PKG_SOURCE_PROTO:=git
36 PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git
37 PKG_BUILD_DIR = \
38 $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
39
40 include at91bootstrap.mk
41 include $(INCLUDE_DIR)/package.mk
42
43 define AT91Bootstrap/Default
44 BUILD_TARGET:=at91
45 HIDDEN:=1
46 AT91BOOTSTRAP_IMAGE:=at91bootstrap.bin
47 endef
48
49 define AT91Bootstrap/at91sam9x5eknf_uboot
50 NAME:=AT91Bootstrap for AT91SAM9X5-EK board (NandFlash)
51 BUILD_SUBTARGET:=sam9x
52 BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
53 endef
54
55 define AT91Bootstrap/at91sam9x5eksd_uboot
56 NAME:=AT91Bootstrap for AT91SAM9X5-EK board (SDcard)
57 BUILD_SUBTARGET:=sam9x
58 BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
59 endef
60
61 define AT91Bootstrap/sam9x60eknf_uboot
62 NAME:=AT91Bootstrap for SAM9X60-EK board (NandFlash)
63 BUILD_SUBTARGET:=sam9x
64 BUILD_DEVICES:=microchip_sam9x60ek
65 endef
66
67 define AT91Bootstrap/sam9x60eksd_uboot
68 NAME:=AT91Bootstrap for SAM9X60-EK board (SDcard)
69 BUILD_SUBTARGET:=sam9x
70 BUILD_DEVICES:=microchip_sam9x60ek
71 endef
72
73 define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
74 TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
75 BUILD_SUBTARGET:=sama5
76 BUILD_DEVICES:=microchip_sama5d2-icp
77 endef
78
79 define AT91Bootstrap/sama5d2_icpsd_uboot
80 TITLE:=AT91Bootstrap for SAMA5D2 ICP board (SDcard)
81 BUILD_SUBTARGET:=sama5
82 BUILD_DEVICES:=microchip_sama5d2-icp
83 endef
84
85 define AT91Bootstrap/sama5d2_xplaineddf_uboot
86 TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
87 BUILD_SUBTARGET:=sama5
88 BUILD_DEVICES:=microchip_sama5d2-xplained
89 endef
90
91 define AT91Bootstrap/sama5d2_xplaineddf_qspi_uboot
92 TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (QSPI Flash)
93 BUILD_SUBTARGET:=sama5
94 BUILD_DEVICES:=microchip_sama5d2-xplained
95 endef
96
97 define AT91Bootstrap/sama5d2_xplainedsd_uboot
98 TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SDcard/EMMC)
99 BUILD_SUBTARGET:=sama5
100 BUILD_DEVICES:=microchip_sama5d2-xplained
101 endef
102
103 define AT91Bootstrap/sama5d3_xplainednf_uboot
104 TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (Nand Flash)
105 BUILD_SUBTARGET:=sama5
106 BUILD_DEVICES:=microchip_sama5d3-xplained
107 endef
108
109 define AT91Bootstrap/sama5d3_xplainedsd_uboot
110 TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (SDcard)
111 BUILD_SUBTARGET:=sama5
112 BUILD_DEVICES:=microchip_sama5d3-xplained
113 endef
114
115 define AT91Bootstrap/sama5d4_xplainednf_uboot_secure
116 TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (Nand Flash)
117 BUILD_SUBTARGET:=sama5
118 BUILD_DEVICES:=microchip_sama5d4-xplained
119 endef
120
121 define AT91Bootstrap/sama5d4_xplaineddf_uboot_secure
122 TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SPI Flash)
123 BUILD_SUBTARGET:=sama5
124 BUILD_DEVICES:=microchip_sama5d4-xplained
125 endef
126
127 define AT91Bootstrap/sama5d4_xplainedsd_uboot_secure
128 TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SDcard)
129 BUILD_SUBTARGET:=sama5
130 BUILD_DEVICES:=microchip_sama5d4-xplained
131 endef
132
133 define AT91Bootstrap/sama5d27_som1_eksd_uboot
134 TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (SDcard0)
135 BUILD_SUBTARGET:=sama5
136 BUILD_DEVICES:=microchip_sama5d27-som1-ek
137 endef
138
139 define AT91Bootstrap/sama5d27_som1_eksd1_uboot
140 TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (SDcard1)
141 BUILD_SUBTARGET:=sama5
142 BUILD_DEVICES:=microchip_sama5d27-som1-ek
143 endef
144
145 define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
146 TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (QSPI Flash)
147 BUILD_SUBTARGET:=sama5
148 BUILD_DEVICES:=microchip_sama5d27-som1-ek
149 endef
150
151 define AT91Bootstrap/sama5d27_wlsom1_eksd_uboot
152 TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (SDcard0)
153 BUILD_SUBTARGET:=sama5
154 BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
155 endef
156
157 define AT91Bootstrap/sama5d27_wlsom1_ekdf_qspi_uboot
158 TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (QSPI Flash)
159 BUILD_SUBTARGET:=sama5
160 BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
161 endef
162
163 define AT91Bootstrap/sama5d2_ptc_eknf_uboot
164 TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
165 BUILD_SUBTARGET:=sama5
166 BUILD_DEVICES:=microchip_sama5d2-ptc-ek
167 endef
168
169 define AT91Bootstrap/sama5d2_ptc_eksd_uboot
170 TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (SDCard)
171 BUILD_SUBTARGET:=sama5
172 BUILD_DEVICES:=microchip_sama5d2-ptc-ek
173 endef
174
175 define AT91Bootstrap/sama7g5eksd_uboot
176 TITLE:=AT91Bootstrap for SAMA7G5-EK (SDCard)
177 BUILD_SUBTARGET:=sama7
178 BUILD_DEVICES:=microchip_sama7g5-ek
179 endef
180
181 AT91BOOTSTRAP_TARGETS := \
182 at91sam9x5eknf_uboot \
183 at91sam9x5eksd_uboot \
184 sam9x60eknf_uboot \
185 sam9x60eksd_uboot \
186 sama5d2_icpdf_qspi_uboot \
187 sama5d2_icpsd_uboot \
188 sama5d2_xplaineddf_uboot \
189 sama5d2_xplaineddf_qspi_uboot \
190 sama5d2_xplainedsd_uboot \
191 sama5d3_xplainednf_uboot \
192 sama5d3_xplainedsd_uboot \
193 sama5d4_xplainednf_uboot_secure \
194 sama5d4_xplaineddf_uboot_secure \
195 sama5d4_xplainedsd_uboot_secure \
196 sama5d27_som1_eksd1_uboot \
197 sama5d27_som1_ekqspi_uboot \
198 sama5d27_wlsom1_eksd_uboot \
199 sama5d27_wlsom1_ekdf_qspi_uboot \
200 sama5d2_ptc_eknf_uboot \
201 sama5d2_ptc_eksd_uboot \
202 sama7g5eksd_uboot
203
204 define Build/Compile
205 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
206 CROSS_COMPILE=$(TARGET_CROSS)
207 endef
208
209 $(eval $(call BuildPackage/AT91Bootstrap))