#
# Copyright (C) 2013-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := u-boot
PKG_VERSION := 2015.01
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.bz2
PKG_SOURCE_URL := \
http://mirror2.openwrt.org/sources \
ftp://ftp.denx.de/pub/u-boot
PKG_MD5SUM := 7f08dc9e98a71652bd6968888ed6ec95
PKG_BUILD_DIR := $( BUILD_DIR) /$( PKG_NAME) -$( BUILD_VARIANT) /$( PKG_NAME) -$( PKG_VERSION)
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 / 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
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
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
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
e n d e f
UBOOTS := \
A10-OLinuXino-Lime \
A13-OLinuXino \
A20-OLinuXino-Lime \
A20-OLinuXino_MICRO \
Bananapi \
Bananapro \
Cubieboard \
Cubieboard2 \
Cubietruck \
Mele_M9 \
OLIMEX_A13_SOM \
Linksprite_pcDuino \
Linksprite_pcDuino3 \
Lamobo_R1 \
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:= $( 2)
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) )
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
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
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) \
CROSS_COMPILE = $( TARGET_CROSS)
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
$( INSTALL_DIR) $( BIN_DIR) /uboot-$( BOARD) -$( 1)
$( CP) $( PKG_BUILD_DIR) /u-boot.bin \
$( BIN_DIR) /uboot-$( BOARD) -$( 1) /openwrt-$( BOARD) -$( 1) -u-boot.bin
$( CP) $( PKG_BUILD_DIR) /spl/sunxi-spl.bin \
$( BIN_DIR) /uboot-$( BOARD) -$( 1) /openwrt-$( BOARD) -$( 1) -spl.bin
$( CP) $( PKG_BUILD_DIR) /u-boot-sunxi-with-spl.bin \
$( BIN_DIR) /uboot-$( BOARD) -$( 1) /openwrt-$( BOARD) -$( 1) -u-boot-with-spl.bin
$( CP) uEnv.txt \
$( BIN_DIR) /uboot-$( BOARD) -$( 1) /openwrt-$( BOARD) -$( 1) -uEnv.txt
mkimage -C none -A arm -T script -d $( BIN_DIR) /uboot-$( BOARD) -$( 1) /openwrt-$( BOARD) -$( 1) -uEnv.txt $( BIN_DIR) /uboot-$( BOARD) -$( 1) /openwrt-$( BOARD) -$( 1) -boot.scr
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) )
e n d e f
e n d e f
$( foreach u ,$ ( UBOOTS ) , \
$( eval $( call Package/uboot/install/template,$( u) ,$( u) ) ) \
)
$( foreach u ,$ ( UBOOTS ) , \
$( eval $( call BuildUBootPackage,$( u) ) ) \
$( eval $( call BuildPackage,uboot-sunxi-$( u) ) ) \
)