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
21 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/uboot
/template
26 define Package
/uboot-sunxi-
$(1)
28 CATEGORY
:=Boot Loaders
29 DEPENDS
:=@TARGET_sunxi
30 TITLE
:=U-Boot for
$(2)
31 URL
:=http
://www.denx.de
/wiki
/U-Boot
35 define Package
/uboot-sunxi-
$(1)/install
36 $(CP
) $(PKG_BUILD_DIR
)/u-boot-sunxi-with-spl.bin \
37 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-u-boot-with-spl.bin
38 mkimage
-C none
-A arm
-T script
-d uEnv-
$(if
$(3),$(3),default
).txt \
39 $(KERNEL_BUILD_DIR
)/uboot-
$(BOARD
)-$(1)-boot.scr
42 UBOOT_SUNXI_PACKAGES
+= uboot-sunxi-
$(1)
46 $(eval
$(call Package
/uboot
/template
,A10-OLinuXino-Lime
,the A10 OLinuXino LIME
))
47 $(eval
$(call Package
/uboot
/template
,A13-OLinuXino
,the A13 OlinuXino
))
48 $(eval
$(call Package
/uboot
/template
,A20-OLinuXino-Lime
,the A20 OLinuXino LIME
))
49 $(eval
$(call Package
/uboot
/template
,A20-OLinuXino_MICRO
,A20 OLinuXino MICRO
))
50 $(eval
$(call Package
/uboot
/template
,Bananapi
,Bananapi
))
51 $(eval
$(call Package
/uboot
/template
,Bananapro
,Bananapro
))
52 $(eval
$(call Package
/uboot
/template
,Cubieboard
,Cubieboard
))
53 $(eval
$(call Package
/uboot
/template
,Cubieboard2
,Cubieboard2
))
54 $(eval
$(call Package
/uboot
/template
,Cubietruck
,Cubietruck
))
55 $(eval
$(call Package
/uboot
/template
,Hummingbird_A31
,the Hummingbird A31 board
))
56 $(eval
$(call Package
/uboot
/template
,Mele_M9
,the Mele M9
(A31
)))
57 $(eval
$(call Package
/uboot
/template
,OLIMEX_A13_SOM
,the Olimex A13 SOM
))
58 $(eval
$(call Package
/uboot
/template
,Linksprite_pcDuino
,Linksprite pcDuino
))
59 $(eval
$(call Package
/uboot
/template
,Linksprite_pcDuino3
,Linksprite pcDuino3
))
60 $(eval
$(call Package
/uboot
/template
,Lamobo_R1
,Lamobo R1
))
61 $(eval
$(call Package
/uboot
/template
,orangepi_plus
,Orange Pi Plus
(H3
)))
62 $(eval
$(call Package
/uboot
/template
,pangolin
,Theobroma A31-yQ7 devboard
,pangolin
))
64 define Package
/uboot-sunxi-all
66 CATEGORY
:=Boot Loaders
67 DEPENDS
:=@TARGET_sunxi
68 TITLE
:=Meta package for selecting
all variants of uboot-sunxi
69 URL
:=http
://www.denx.de
/wiki
/U-Boot
70 DEPENDS
:=$(patsubst %,+%,$(UBOOT_SUNXI_PACKAGES
))
74 define Build
/Configure
75 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
76 USE_PRIVATE_LIBGCC
=yes
$(BUILD_VARIANT
)_defconfig
80 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
81 CROSS_COMPILE
=$(TARGET_CROSS
) \
82 DTCDIR
=$(LINUX_DIR
)/scripts
/dtc
/
87 define Build
/Configure
93 $(foreach pkg
,$(UBOOT_SUNXI_PACKAGES
), \
94 $(eval
$(call BuildPackage
,$(pkg
))) \
96 $(eval
$(call BuildPackage
,uboot-sunxi-all
))