bc33383028cb25b8ee09471f8a41ed19801207b9
[oweals/openwrt.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:=v3.8.12
13 PKG_RELEASE:=
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git
17 PKG_SOURCE_VERSION:=28e15d07e9f24efb04b87bb0baa211a0c5640ef1
18 PKG_BUILD_DIR = \
19     $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
20
21 include at91bootstrap.mk
22 include $(INCLUDE_DIR)/package.mk
23
24 define AT91Bootstrap/Default
25   BUILD_TARGET:=at91
26   HIDDEN:=1
27   AT91BOOTSTRAP_IMAGE:=at91bootstrap.bin
28 endef
29
30 define AT91Bootstrap/sama5d2_xplaineddf_uboot
31   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
32   BUILD_SUBTARGET:=sama5
33   BUILD_DEVICES:=at91-sama5d2_xplained
34 endef
35
36 define AT91Bootstrap/sama5d2_xplaineddf_qspi_uboot
37   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (QSPI Flash)
38   BUILD_SUBTARGET:=sama5
39   BUILD_DEVICES:=at91-sama5d2_xplained
40 endef
41
42 define AT91Bootstrap/sama5d2_xplainedsd_uboot
43   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SDcard/EMMC)
44   BUILD_SUBTARGET:=sama5
45   BUILD_DEVICES:=at91-sama5d2_xplained
46 endef
47
48 define AT91Bootstrap/sama5d3_xplainednf_uboot
49   TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (Nand Flash)
50   BUILD_SUBTARGET:=sama5
51   BUILD_DEVICES:=at91-sama5d3_xplained
52 endef
53
54 define AT91Bootstrap/sama5d3_xplainedsd_uboot
55   TITLE:=AT91Bootstrap for SAMA5D3 Xplained board (SDcard)
56   BUILD_SUBTARGET:=sama5
57   BUILD_DEVICES:=at91-sama5d3_xplained
58 endef
59
60 define AT91Bootstrap/sama5d4_xplainednf_uboot_secure
61   TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (Nand Flash)
62   BUILD_SUBTARGET:=sama5
63   BUILD_DEVICES:=at91-sama5d4_xplained
64 endef
65
66 define AT91Bootstrap/sama5d4_xplaineddf_uboot_secure
67   TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SPI Flash)
68   BUILD_SUBTARGET:=sama5
69   BUILD_DEVICES:=at91-sama5d4_xplained
70 endef
71
72 define AT91Bootstrap/sama5d4_xplainedsd_uboot_secure
73   TITLE:=AT91Bootstrap for SAMA5D4 Xplained board (SDcard)
74   BUILD_SUBTARGET:=sama5
75   BUILD_DEVICES:=at91-sama5d4_xplained
76 endef
77
78 define AT91Bootstrap/sama5d27_som1_eksd_uboot
79   TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (SDcard0)
80   BUILD_SUBTARGET:=sama5
81   BUILD_DEVICES:=at91-sama5d27_som1_ek
82 endef
83
84 define AT91Bootstrap/sama5d27_som1_eksd1_uboot
85   TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (SDcard1)
86   BUILD_SUBTARGET:=sama5
87   BUILD_DEVICES:=at91-sama5d27_som1_ek
88 endef
89
90 define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
91   TITLE:=AT91Bootstrap for SAMA5D27 SOM1 Ek (QSPI Flash)
92   BUILD_SUBTARGET:=sama5
93   BUILD_DEVICES:=at91-sama5d27_som1_ek
94 endef
95
96 define AT91Bootstrap/sama5d2_ptc_eknf_uboot
97   TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
98   BUILD_SUBTARGET:=sama5
99   BUILD_DEVICES:=at91-sama5d2_ptc_ek
100 endef
101
102 define AT91Bootstrap/sama5d2_ptc_eksd_uboot
103   TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (SDCard)
104   BUILD_SUBTARGET:=sama5
105   BUILD_DEVICES:=at91-sama5d2_ptc_ek
106 endef
107
108 AT91BOOTSTRAP_TARGETS := \
109     sama5d2_xplaineddf_uboot \
110     sama5d2_xplaineddf_qspi_uboot \
111     sama5d2_xplainedsd_uboot \
112     sama5d3_xplainednf_uboot \
113     sama5d3_xplainedsd_uboot \
114     sama5d4_xplainednf_uboot_secure \
115     sama5d4_xplaineddf_uboot_secure \
116     sama5d4_xplainedsd_uboot_secure \
117         sama5d27_som1_eksd_uboot \
118         sama5d27_som1_ekqspi_uboot \
119         sama5d2_ptc_eknf_uboot \
120     sama5d2_ptc_eksd_uboot
121
122 define Build/Compile
123         +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
124         CROSS_COMPILE=$(TARGET_CROSS)
125 endef
126
127 $(eval $(call BuildPackage/AT91Bootstrap))