sunxi: put u-boot images into image staging directory
[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:=2016.03
13
14 PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
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 NAME:=A10 OLinuXino LIME
30 BUILD_DEVICES:=sun4i-a10-olinuxino-lime
31 endef
32
33 define U-Boot/A13-OLinuXino
34 NAME:=A13 OlinuXino
35 BUILD_DEVICES:=sun5i-a13-olinuxino
36 endef
37
38 define U-Boot/A20-OLinuXino-Lime
39 NAME:=A20 OLinuXino LIME
40 BUILD_DEVICES:=sun7i-a20-olinuxino-lime
41 endef
42
43 define U-Boot/A20-OLinuXino_MICRO
44 NAME:=A20 OLinuXino MICRO
45 BUILD_DEVICES:=sun7i-a20-olinuxino-micro
46 endef
47
48 define U-Boot/Bananapi
49 NAME:=Bananapi
50 BUILD_DEVICES:=sun7i-a20-bananapi
51 endef
52
53 define U-Boot/Bananapro
54 NAME:=Bananapro
55 BUILD_DEVICES:=sun7i-a20-bananapro
56 endef
57
58 define U-Boot/Cubieboard
59 NAME:=Cubieboard
60 BUILD_DEVICES:=sun4i-a10-cubieboard
61 endef
62
63 define U-Boot/Cubieboard2
64 NAME:=Cubieboard2
65 BUILD_DEVICES:=sun7i-a20-cubieboard2
66 endef
67
68 define U-Boot/Cubietruck
69 NAME:=Cubietruck
70 BUILD_DEVICES:=sun7i-a20-cubietruck
71 endef
72
73 define U-Boot/Hummingbird_A31
74 NAME:=Hummingbird A31 board
75 endef
76
77 define U-Boot/Mele_M9
78 NAME:=Mele M9 (A31)
79 BUILD_DEVICES:=sun6i-a31-m9
80 endef
81
82 define U-Boot/OLIMEX_A13_SOM
83 NAME:=Olimex A13 SOM
84 BUILD_DEVICES:=sun5i-a13-olimex-som
85 endef
86
87 define U-Boot/Linksprite_pcDuino
88 NAME:=Linksprite pcDuino
89 BUILD_DEVICES:=sun4i-a10-pcduino
90 endef
91
92 define U-Boot/Linksprite_pcDuino3
93 NAME:=Linksprite pcDuino3
94 BUILD_DEVICES:=sun7i-a20-pcduino3
95 endef
96
97 define U-Boot/Lamobo_R1
98 NAME:=Lamobo R1
99 BUILD_DEVICES:=sun7i-a20-lamobo-r1
100 endef
101
102 define U-Boot/orangepi_plus
103 NAME:=Orange Pi Plus (H3)
104 BUILD_DEVICES:=sun8i-h3-orangepi-plus
105 endef
106
107 define U-Boot/pangolin
108 NAME:=Theobroma A31-yQ7 devboard
109 UENV:=pangolin
110 endef
111
112 UBOOT_TARGETS := \
113 A10-OLinuXino-Lime \
114 A13-OLinuXino \
115 A20-OLinuXino-Lime \
116 A20-OLinuXino_MICRO \
117 Bananapi \
118 Bananapro \
119 Cubieboard \
120 Cubieboard2 \
121 Cubietruck \
122 Hummingbird_A31 \
123 Mele_M9 \
124 OLIMEX_A13_SOM \
125 Linksprite_pcDuino \
126 Linksprite_pcDuino3 \
127 Lamobo_R1 \
128 orangepi_plus \
129 pangolin
130
131 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
132
133 define Build/InstallDev
134 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
135 $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
136 mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \
137 $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr
138 endef
139
140 define Package/u-boot/install/default
141 endef
142
143 $(eval $(call BuildPackage/U-Boot))