sunxi: add Olimex A20-OlinuXino-LIME2
[openwrt/openwrt.git] / package / boot / uboot-sunxi / Makefile
1 #
2 # Copyright (C) 2013-2016 OpenWrt.org
3 # Copyright (C) 2017 Yousong Zhou
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 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_VERSION:=2017.07
13
14 PKG_HASH:=5374bfdc8acb9a38c025371b1ff20f45e7533668e84e685d0df5d9e7c0e4feff
15
16 PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
17
18 include $(INCLUDE_DIR)/u-boot.mk
19 include $(INCLUDE_DIR)/package.mk
20
21 define U-Boot/Default
22 BUILD_TARGET:=sunxi
23 UBOOT_IMAGE:=u-boot-sunxi-with-spl.bin
24 UENV:=default
25 HIDDEN:=1
26 endef
27
28 define U-Boot/A10-OLinuXino-Lime
29 BUILD_SUBTARGET:=cortexa8
30 NAME:=A10 OLinuXino LIME
31 BUILD_DEVICES:=sun4i-a10-olinuxino-lime
32 endef
33
34 define U-Boot/A13-OLinuXino
35 BUILD_SUBTARGET:=cortexa8
36 NAME:=A13 OlinuXino
37 BUILD_DEVICES:=sun5i-a13-olinuxino
38 endef
39
40 define U-Boot/A20-OLinuXino-Lime
41 BUILD_SUBTARGET:=cortexa7
42 NAME:=A20 OLinuXino LIME
43 BUILD_DEVICES:=sun7i-a20-olinuxino-lime
44 endef
45
46 define U-Boot/A20-OLinuXino-Lime2
47 BUILD_SUBTARGET:=cortexa7
48 NAME:=A20 OLinuXino LIME2
49 BUILD_DEVICES:=sun7i-a20-olinuxino-lime2
50 endef
51
52 define U-Boot/A20-OLinuXino_MICRO
53 BUILD_SUBTARGET:=cortexa7
54 NAME:=A20 OLinuXino MICRO
55 BUILD_DEVICES:=sun7i-a20-olinuxino-micro
56 endef
57
58 define U-Boot/Bananapi
59 BUILD_SUBTARGET:=cortexa7
60 NAME:=Bananapi
61 BUILD_DEVICES:=sun7i-a20-bananapi
62 endef
63
64 define U-Boot/Bananapro
65 BUILD_SUBTARGET:=cortexa7
66 NAME:=Bananapro
67 BUILD_DEVICES:=sun7i-a20-bananapro
68 endef
69
70 define U-Boot/Cubieboard
71 BUILD_SUBTARGET:=cortexa8
72 NAME:=Cubieboard
73 BUILD_DEVICES:=sun4i-a10-cubieboard
74 endef
75
76 define U-Boot/Cubieboard2
77 BUILD_SUBTARGET:=cortexa7
78 NAME:=Cubieboard2
79 BUILD_DEVICES:=sun7i-a20-cubieboard2
80 endef
81
82 define U-Boot/Cubietruck
83 BUILD_SUBTARGET:=cortexa7
84 NAME:=Cubietruck
85 BUILD_DEVICES:=sun7i-a20-cubietruck
86 endef
87
88 define U-Boot/Hummingbird_A31
89 BUILD_SUBTARGET:=cortexa7
90 NAME:=Hummingbird A31 board
91 endef
92
93 define U-Boot/Mele_M9
94 BUILD_SUBTARGET:=cortexa7
95 NAME:=Mele M9 (A31)
96 BUILD_DEVICES:=sun6i-a31-m9
97 endef
98
99 define U-Boot/OLIMEX_A13_SOM
100 BUILD_SUBTARGET:=cortexa8
101 NAME:=Olimex A13 SOM
102 BUILD_DEVICES:=sun5i-a13-olimex-som
103 endef
104
105 define U-Boot/Linksprite_pcDuino
106 BUILD_SUBTARGET:=cortexa8
107 NAME:=Linksprite pcDuino
108 BUILD_DEVICES:=sun4i-a10-pcduino
109 endef
110
111 define U-Boot/Linksprite_pcDuino3
112 BUILD_SUBTARGET:=cortexa7
113 NAME:=Linksprite pcDuino3
114 BUILD_DEVICES:=sun7i-a20-pcduino3
115 endef
116
117 define U-Boot/Lamobo_R1
118 BUILD_SUBTARGET:=cortexa7
119 NAME:=Lamobo R1
120 BUILD_DEVICES:=sun7i-a20-lamobo-r1
121 endef
122
123 define U-Boot/orangepi_plus
124 BUILD_SUBTARGET:=cortexa7
125 NAME:=Orange Pi Plus (H3)
126 BUILD_DEVICES:=sun8i-h3-orangepi-plus
127 endef
128
129 define U-Boot/pangolin
130 BUILD_SUBTARGET:=cortexa7
131 NAME:=Theobroma A31-yQ7 devboard
132 UENV:=pangolin
133 endef
134
135 define U-Boot/pine64_plus
136 BUILD_SUBTARGET:=cortexa53
137 NAME:=Pine64 Plus A64
138 BUILD_DEVICES:=sun50i-a64-pine64-plus
139 DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi
140 UENV:=a64
141 endef
142
143 UBOOT_TARGETS := \
144 A10-OLinuXino-Lime \
145 A13-OLinuXino \
146 A20-OLinuXino-Lime \
147 A20-OLinuXino-Lime2 \
148 A20-OLinuXino_MICRO \
149 Bananapi \
150 Bananapro \
151 Cubieboard \
152 Cubieboard2 \
153 Cubietruck \
154 Hummingbird_A31 \
155 Mele_M9 \
156 OLIMEX_A13_SOM \
157 Linksprite_pcDuino \
158 Linksprite_pcDuino3 \
159 Lamobo_R1 \
160 orangepi_plus \
161 pangolin \
162 pine64_plus
163
164 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
165
166 UBOOT_MAKE_FLAGS += \
167 BL31=$(STAGING_DIR_IMAGE)/bl31.bin
168
169 define Build/InstallDev
170 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
171 ifeq ($(SUBTARGET),cortexa53)
172 cat $(PKG_BUILD_DIR)/spl/sunxi-spl.bin $(PKG_BUILD_DIR)/u-boot.itb > $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
173 else
174 $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
175 endif
176 mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \
177 $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr
178 endef
179
180 define Package/u-boot/install/default
181 endef
182
183 $(eval $(call BuildPackage/U-Boot))