@ -1,5 +1,6 @@
#
# Copyright (C) 2013-2016 OpenWrt.org
# Copyright (C) 2017 Yousong Zhou
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -11,178 +12,85 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME := u-boot
PKG_VERSION := 2016.03
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.bz2
PKG_SOURCE_URL := \
http://mirror2.openwrt.org/sources \
ftp://ftp.denx.de/pub/u-boot
PKG_SOURCE_URL := ftp://ftp.denx.de/pub/u-boot
PKG_HASH := e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
PKG_BUILD_DIR := $( KERNEL_BUILD_DIR) /$( PKG_NAME) -$( BUILD_VARIANT) /$( PKG_NAME) -$( PKG_VERSION)
PKG_MAINTAINER := Zoltan HERPAI <wigyori@uid0.hu>
PKG_LICENSE := GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES := Licenses/README
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
d e f i n e u b o o t / D e f a u l t
TITLE:=
CONFIG:=
IMAGE:=
e n d e f
d e f i n e u b o o t / A 1 0 - O L i n u X i n o - L i m e
TITLE:= U-Boot for the A10 OLinuXino LIME
e n d e f
d e f i n e u b o o t / A 1 3 - O L i n u X i n o
TITLE:= U-Boot for the A13 OlinuXino
e n d e f
d e f i n e u b o o t / A 2 0 - O L i n u X i n o - L i m e
TITLE:= U-Boot for the A20 OLinuXino LIME
e n d e f
d e f i n e u b o o t / A 2 0 - O L i n u X i n o _ M I C R O
TITLE:= U-Boot for A20 OLinuXino MICRO
e n d e f
d e f i n e u b o o t / B a n a n a p i
TITLE:= U-Boot for Bananapi
e n d e f
d e f i n e u b o o t / B a n a n a p r o
TITLE:= U-Boot for Bananapro
e n d e f
d e f i n e u b o o t / C u b i e b o a r d
TITLE:= U-Boot for Cubieboard
e n d e f
d e f i n e u b o o t / C u b i e b o a r d 2
TITLE:= U-Boot for Cubieboard2
e n d e f
d e f i n e u b o o t / C u b i e t r u c k
TITLE:= U-Boot for Cubietruck
e n d e f
d e f i n e u b o o t / H u m m i n g b i r d _ A 3 1
TITLE:= U-Boot for the Hummingbird A31 board
e n d e f
d e f i n e u b o o t / M e l e _ M 9
TITLE:= U-Boot for the Mele M9 ( A31)
e n d e f
d e f i n e u b o o t / O L I M E X _ A 1 3 _ S O M
TITLE:= U-Boot for the Olimex A13 SOM
e n d e f
PKG_BUILD_DIR := $( KERNEL_BUILD_DIR) /$( PKG_NAME) -$( BUILD_VARIANT) /$( PKG_NAME) -$( PKG_VERSION)
d e f i n e u b o o t / L i n k s p r i t e _ p c D u i n o
TITLE:= U-Boot for Linksprite pcDuino
e n d e f
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
d e f i n e u b o o t / L i n k s p r i t e _ p c D u i n o 3
TITLE:= U-Boot for Linksprite pcDuino3
d e f i n e P a c k a g e / u b o o t / t e m p l a t e
d e f i n e P a c k a g e / u b o o t - s u n x i - $( 1)
SECTION:= boot
CATEGORY:= Boot Loaders
DEPENDS:= @TARGET_sunxi
TITLE:= U-Boot for $( 2)
URL:= http://www.denx.de/wiki/U-Boot
VARIANT:= $( 1)
e n d e f
d e f i n e u b o o t / L a m o b o _ R 1
TITLE:= U-Boot for Lamobo R1
d e f i n e P a c k a g e / u b o o t - s u n x i - $( 1) / i n s t a l l
$( CP) $( PKG_BUILD_DIR) /u-boot-sunxi-with-spl.bin \
$( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -u-boot-with-spl.bin
mkimage -C none -A arm -T script -d uEnv-$( if $( 3) ,$( 3) ,default) .txt \
$( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -boot.scr
e n d e f
d e f i n e u b o o t / p a n g o l i n
TITLE:= U-Boot for Theobroma A31-yQ7 devboard
e n d e f
UBOOT_SUNXI_PACKAGES += uboot-sunxi-$( 1)
d e f i n e u b o o t / o r a n g e p i _ p l u s
TITLE:= U-Boot for Orange Pi Plus ( H3)
e n d e f
UBOOTS := \
A10-OLinuXino-Lime \
A13-OLinuXino \
A20-OLinuXino-Lime \
A20-OLinuXino_MICRO \
Bananapi \
Bananapro \
Cubieboard \
Cubieboard2 \
Cubietruck \
Hummingbird_A31 \
Mele_M9 \
OLIMEX_A13_SOM \
Linksprite_pcDuino \
Linksprite_pcDuino3 \
Lamobo_R1 \
orangepi_plus \
pangolin
$( eval $ ( call Package /uboot /template ,A 10-OLinuXino -Lime ,the A 10 OLinuXino LIME ) )
$( eval $ ( call Package /uboot /template ,A 13-OLinuXino ,the A 13 OlinuXino ) )
$( eval $ ( call Package /uboot /template ,A 20-OLinuXino -Lime ,the A 20 OLinuXino LIME ) )
$( eval $ ( call Package /uboot /template ,A 20-OLinuXino_MICRO ,A 20 OLinuXino MICRO ) )
$( eval $ ( call Package /uboot /template ,Bananapi ,Bananapi ) )
$( eval $ ( call Package /uboot /template ,Bananapro ,Bananapro ) )
$( eval $ ( call Package /uboot /template ,Cubieboard ,Cubieboard ) )
$( eval $ ( call Package /uboot /template ,Cubieboard 2,Cubieboard 2) )
$( eval $ ( call Package /uboot /template ,Cubietruck ,Cubietruck ) )
$( eval $ ( call Package /uboot /template ,Hummingbird_A 31,the Hummingbird A 31 board ) )
$( eval $ ( call Package /uboot /template ,Mele_M 9,the Mele M 9 ( A 31) ) )
$( eval $ ( call Package /uboot /template ,OLIMEX_A 13_SOM ,the Olimex A 13 SOM ) )
$( eval $ ( call Package /uboot /template ,Linksprite_pcDuino ,Linksprite pcDuino ) )
$( eval $ ( call Package /uboot /template ,Linksprite_pcDuino 3,Linksprite pcDuino 3) )
$( eval $ ( call Package /uboot /template ,Lamobo_R 1,Lamobo R 1) )
$( eval $ ( call Package /uboot /template ,orangepi_plus ,Orange Pi Plus ( H 3) ) )
$( eval $ ( call Package /uboot /template ,pangolin ,Theobroma A 31-yQ 7 devboard ,pangolin ) )
d e f i n e P a c k a g e / u b o o t / t e m p l a t e
d e f i n e P a c k a g e / u b o o t - s u n x i - $( 1)
d e f i n e P a c k a g e / u b o o t - s u n x i - a l l
SECTION:= boot
CATEGORY:= Boot Loaders
DEPENDS:= @TARGET_sunxi
TITLE:= $( 2)
TITLE:= Meta package for selecting all variants of uboot-sunxi
URL:= http://www.denx.de/wiki/U-Boot
VARIANT:= $( 1)
MAINTAINER:= Zoltan HERPAI <wigyori@uid0.hu>
e n d e f
e n d e f
d e f i n e B u i l d U B o o t P a c k a g e
$( eval $( uboot/Default) )
$( eval $( uboot/$( 1) ) )
$( call Package/uboot/template,$( 1) ,$( TITLE) )
DEPENDS:= $( patsubst %,+%,$( UBOOT_SUNXI_PACKAGES) )
e n d e f
i f d e f B U I L D _ V A R I A N T
$( eval $ ( call uboot /$ ( BUILD_VARIANT ) ) )
UBOOT_CONFIG := $( if $( CONFIG) ,$( CONFIG) ,$( BUILD_VARIANT) )
UBOOT_IMAGE := $( if $( IMAGE) ,$( IMAGE) ,openwrt-$( BOARD) -$( BUILD_VARIANT) -u-boot.bin)
e n d i f
# check if any specialized uEnv bootconfig is required
i f e q ( $( UBOOT_CONFIG ) , p a n g o l i n )
UENV:= pangolin
e l s e
UENV:= default
e n d i f
d e f i n e B u i l d / C o n f i g u r e
$( MAKE) -C $( PKG_BUILD_DIR) \
USE_PRIVATE_LIBGCC = yes $( UBOOT_CONFIG ) _defconfig
+$( MAKE) $( PKG_JOBS) -C $( PKG_BUILD_DIR) \
USE_PRIVATE_LIBGCC = yes $( BUILD_VARIANT) _defconfig
e n d e f
d e f i n e B u i l d / C o m p i l e
$( MAKE) -C $( PKG_BUILD_DIR) \
+$( MAKE) $( PKG_JOBS) -C $( PKG_BUILD_DIR) \
CROSS_COMPILE = $( TARGET_CROSS) \
DTCDIR = $( LINUX_DIR) /scripts/dtc/
e n d e f
d e f i n e P a c k a g e / u b o o t / i n s t a l l / d e f a u l t
$( CP) $( PKG_BUILD_DIR) /u-boot.bin \
$( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -u-boot.bin
$( CP) $( PKG_BUILD_DIR) /spl/sunxi-spl.bin \
$( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -spl.bin
$( CP) $( PKG_BUILD_DIR) /u-boot-sunxi-with-spl.bin \
$( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -u-boot-with-spl.bin
$( CP) uEnv-$( UENV) .txt \
$( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -uEnv.txt
mkimage -C none -A arm -T script -d $( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -uEnv.txt \
$( KERNEL_BUILD_DIR) /uboot-$( BOARD) -$( 1) -boot.scr
e l s e # BUILD_VARIANT
d e f i n e B u i l d / P r e p a r e
e n d e f
d e f i n e P a c k a g e / u b o o t / i n s t a l l / t e m p l a t e
d e f i n e P a c k a g e / u b o o t - s u n x i - $( 1) / i n s t a l l
$( call Package/uboot/install/default,$( 2) )
d e f i n e B u i l d / C o n f i g u r e
e n d e f
d e f i n e B u i l d / C o m p i l e
e n d e f
e n d i f # BUILD_VARIANT
$( foreach u ,$ ( UBOOTS ) , \
$( eval $( call Package/uboot/install/template,$( u) ,$( u) ) ) \
)
$( foreach u ,$ ( UBOOTS ) , \
$( eval $( call BuildUBootPackage,$( u) ) ) \
$( eval $( call BuildPackage,uboot-sunxi-$( u) ) ) \
$( foreach pkg ,$ ( UBOOT_SUNXI_PACKAGES ) , \
$( eval $( call BuildPackage,$( pkg) ) ) \
)
$( eval $ ( call BuildPackage ,uboot -sunxi -all ) )