2 # Copyright (C) 2013-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 http
://mirror2.openwrt.org
/sources \
16 ftp
://ftp.denx.de
/pub
/u-boot
18 PKG_HASH
:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
20 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_LICENSE
:=GPL-2.0 GPL-2.0
+
23 PKG_LICENSE_FILES
:=Licenses
/README
25 include $(INCLUDE_DIR
)/package.mk
33 define uboot
/A10-OLinuXino-Lime
34 TITLE
:=U-Boot for the A10 OLinuXino LIME
37 define uboot
/A13-OLinuXino
38 TITLE
:=U-Boot for the A13 OlinuXino
41 define uboot
/A20-OLinuXino-Lime
42 TITLE
:=U-Boot for the A20 OLinuXino LIME
45 define uboot
/A20-OLinuXino_MICRO
46 TITLE
:=U-Boot for A20 OLinuXino MICRO
50 TITLE
:=U-Boot for Bananapi
53 define uboot
/Bananapro
54 TITLE
:=U-Boot for Bananapro
57 define uboot
/Cubieboard
58 TITLE
:=U-Boot for Cubieboard
61 define uboot
/Cubieboard2
62 TITLE
:=U-Boot for Cubieboard2
65 define uboot
/Cubietruck
66 TITLE
:=U-Boot for Cubietruck
69 define uboot
/Hummingbird_A31
70 TITLE
:=U-Boot for the Hummingbird A31 board
74 TITLE
:=U-Boot for the Mele M9
(A31
)
77 define uboot
/OLIMEX_A13_SOM
78 TITLE
:=U-Boot for the Olimex A13 SOM
81 define uboot
/Linksprite_pcDuino
82 TITLE
:=U-Boot for Linksprite pcDuino
85 define uboot
/Linksprite_pcDuino3
86 TITLE
:=U-Boot for Linksprite pcDuino3
89 define uboot
/Lamobo_R1
90 TITLE
:=U-Boot for Lamobo R1
94 TITLE
:=U-Boot for Theobroma A31-yQ7 devboard
97 define uboot
/orangepi_plus
98 TITLE
:=U-Boot for Orange Pi Plus
(H3
)
105 A20-OLinuXino_MICRO \
115 Linksprite_pcDuino3 \
120 define Package
/uboot
/template
121 define Package
/uboot-sunxi-
$(1)
123 CATEGORY
:=Boot Loaders
124 DEPENDS
:=@TARGET_sunxi
126 URL
:=http
://www.denx.de
/wiki
/U-Boot
128 MAINTAINER
:=Zoltan HERPAI
<wigyori@uid0.hu
>
132 define BuildUBootPackage
133 $(eval
$(uboot
/Default
))
134 $(eval
$(uboot
/$(1)))
135 $(call Package
/uboot
/template
,$(1),$(TITLE
))
139 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
140 UBOOT_CONFIG
:=$(if
$(CONFIG
),$(CONFIG
),$(BUILD_VARIANT
))
141 UBOOT_IMAGE
:=$(if
$(IMAGE
),$(IMAGE
),openwrt-
$(BOARD
)-$(BUILD_VARIANT
)-u-boot.bin
)
144 # check if any specialized uEnv bootconfig is required
145 ifeq ($(UBOOT_CONFIG
),pangolin
)
151 define Build
/Configure
152 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
153 USE_PRIVATE_LIBGCC
=yes
$(UBOOT_CONFIG
)_defconfig
157 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
158 CROSS_COMPILE
=$(TARGET_CROSS
) \
159 DTCDIR
=$(LINUX_DIR
)/scripts
/dtc
/
162 define Package
/uboot
/install/default
163 $(CP
) $(PKG_BUILD_DIR
)/u-boot.bin \
164 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-u-boot.bin
165 $(CP
) $(PKG_BUILD_DIR
)/spl
/sunxi-spl.bin \
166 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-spl.bin
167 $(CP
) $(PKG_BUILD_DIR
)/u-boot-sunxi-with-spl.bin \
168 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-u-boot-with-spl.bin
169 $(CP
) uEnv-
$(UENV
).txt \
170 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-uEnv.txt
171 mkimage
-C none
-A arm
-T script
-d
$(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-uEnv.txt \
172 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-boot.scr
175 define Package
/uboot
/install/template
176 define Package
/uboot-sunxi-
$(1)/install
177 $(call Package
/uboot
/install/default
,$(2))
181 $(foreach u
,$(UBOOTS
), \
182 $(eval
$(call Package
/uboot
/install/template
,$(u
),$(u
))) \
185 $(foreach u
,$(UBOOTS
), \
186 $(eval
$(call BuildUBootPackage
,$(u
))) \
187 $(eval
$(call BuildPackage
,uboot-sunxi-
$(u
))) \