2 # Copyright (C) 2013-2016 OpenWrt.org
3 # Copyright (C) 2017 Yousong Zhou
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=ftp
://ftp.denx.de
/pub
/u-boot
16 PKG_HASH
:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
17 PKG_MAINTAINER
:=Zoltan HERPAI
<wigyori@uid0.hu
>
18 PKG_LICENSE
:=GPL-2.0 GPL-2.0
+
19 PKG_LICENSE_FILES
:=Licenses
/README
23 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/uboot
/template
28 define Package
/uboot-sunxi-
$(1)
30 CATEGORY
:=Boot Loaders
31 DEPENDS
:=@TARGET_sunxi
32 TITLE
:=U-Boot for
$(2)
33 URL
:=http
://www.denx.de
/wiki
/U-Boot
37 define Package
/uboot-sunxi-
$(1)/install
38 $(CP
) $(PKG_BUILD_DIR
)/u-boot-sunxi-with-spl.bin \
39 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-u-boot-with-spl.bin
40 mkimage
-C none
-A arm
-T script
-d uEnv-
$(if
$(3),$(3),default
).txt \
41 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-boot.scr
44 UBOOT_SUNXI_PACKAGES
+= uboot-sunxi-
$(1)
48 $(eval
$(call Package
/uboot
/template
,A10-OLinuXino-Lime
,the A10 OLinuXino LIME
))
49 $(eval
$(call Package
/uboot
/template
,A13-OLinuXino
,the A13 OlinuXino
))
50 $(eval
$(call Package
/uboot
/template
,A20-OLinuXino-Lime
,the A20 OLinuXino LIME
))
51 $(eval
$(call Package
/uboot
/template
,A20-OLinuXino_MICRO
,A20 OLinuXino MICRO
))
52 $(eval
$(call Package
/uboot
/template
,Bananapi
,Bananapi
))
53 $(eval
$(call Package
/uboot
/template
,Bananapro
,Bananapro
))
54 $(eval
$(call Package
/uboot
/template
,Cubieboard
,Cubieboard
))
55 $(eval
$(call Package
/uboot
/template
,Cubieboard2
,Cubieboard2
))
56 $(eval
$(call Package
/uboot
/template
,Cubietruck
,Cubietruck
))
57 $(eval
$(call Package
/uboot
/template
,Hummingbird_A31
,the Hummingbird A31 board
))
58 $(eval
$(call Package
/uboot
/template
,Mele_M9
,the Mele M9
(A31
)))
59 $(eval
$(call Package
/uboot
/template
,OLIMEX_A13_SOM
,the Olimex A13 SOM
))
60 $(eval
$(call Package
/uboot
/template
,Linksprite_pcDuino
,Linksprite pcDuino
))
61 $(eval
$(call Package
/uboot
/template
,Linksprite_pcDuino3
,Linksprite pcDuino3
))
62 $(eval
$(call Package
/uboot
/template
,Lamobo_R1
,Lamobo R1
))
63 $(eval
$(call Package
/uboot
/template
,orangepi_plus
,Orange Pi Plus
(H3
)))
64 $(eval
$(call Package
/uboot
/template
,pangolin
,Theobroma A31-yQ7 devboard
,pangolin
))
66 define Package
/uboot-sunxi-all
68 CATEGORY
:=Boot Loaders
69 DEPENDS
:=@TARGET_sunxi
70 TITLE
:=Meta package for selecting
all variants of uboot-sunxi
71 URL
:=http
://www.denx.de
/wiki
/U-Boot
72 DEPENDS
:=$(patsubst %,+%,$(UBOOT_SUNXI_PACKAGES
))
76 define Build
/Configure
77 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
78 USE_PRIVATE_LIBGCC
=yes
$(BUILD_VARIANT
)_defconfig
82 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
83 CROSS_COMPILE
=$(TARGET_CROSS
) \
84 DTCDIR
=$(LINUX_DIR
)/scripts
/dtc
/
89 define Build
/Configure
95 $(foreach pkg
,$(UBOOT_SUNXI_PACKAGES
), \
96 $(eval
$(call BuildPackage
,$(pkg
))) \
98 $(eval
$(call BuildPackage
,uboot-sunxi-all
))