2011-03-06 12:17:56 +01:00
################################################################################
2017-11-03 09:13:36 +01:00
# This file is part of LibreELEC - https://libreelec.tv
2016-01-02 17:29:56 +01:00
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
2017-11-03 09:13:36 +01:00
# Copyright (C) 2017-present Team LibreELEC
2011-03-06 12:17:56 +01:00
#
2017-11-03 09:13:36 +01:00
# LibreELEC is free software: you can redistribute it and/or modify
2011-03-06 12:17:56 +01:00
# it under the terms of the GNU General Public License as published by
2013-12-21 21:51:48 +01:00
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
2011-03-06 12:17:56 +01:00
#
2017-11-03 09:13:36 +01:00
# LibreELEC is distributed in the hope that it will be useful,
2011-03-06 12:17:56 +01:00
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2013-12-21 21:51:48 +01:00
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2011-03-06 12:17:56 +01:00
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
2017-11-03 09:13:36 +01:00
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
2011-03-06 12:17:56 +01:00
################################################################################
PKG_NAME = "u-boot"
2017-04-30 18:45:00 -07:00
PKG_VERSION = "2017.09"
PKG_SHA256 = "b2d15f2cf5f72e706025cde73d67247c6da8cd35f7e10891eefe7d9095089744"
2016-05-05 01:23:04 -07:00
PKG_ARCH = "arm aarch64"
2017-04-30 18:45:00 -07:00
PKG_SITE = "https://www.denx.de/wiki/U-Boot"
PKG_URL = " ftp://ftp.denx.de/pub/u-boot/u-boot- $PKG_VERSION .tar.bz2 "
PKG_SOURCE_DIR = " u-boot- $PKG_VERSION "
PKG_DEPENDS_TARGET = "toolchain dtc:host"
2011-03-06 12:17:56 +01:00
PKG_LICENSE = "GPL"
PKG_SECTION = "tools"
PKG_SHORTDESC = "u-boot: Universal Bootloader project"
PKG_LONGDESC = "Das U-Boot is a cross-platform bootloader for embedded systems, used as the default boot loader by several board vendors. It is intended to be easy to port and to debug, and runs on many supported architectures, including PPC, ARM, MIPS, x86, m68k, NIOS, and Microblaze."
2017-04-30 18:45:00 -07:00
PKG_IS_KERNEL_PKG = "yes"
2014-01-26 23:18:19 +01:00
m a k e _ t a r g e t ( ) {
2017-04-30 18:45:00 -07:00
if [ -z " $UBOOT_SYSTEM " ] ; then
echo "UBOOT_SYSTEM must be set to build an image"
echo "see './scripts/uboot_helper' for more information"
else
CROSS_COMPILE = " $TARGET_PREFIX " LDFLAGS = "" ARCH = arm make mrproper
CROSS_COMPILE = " $TARGET_PREFIX " LDFLAGS = "" ARCH = arm make $( $ROOT /$SCRIPTS /uboot_helper $PROJECT $DEVICE $UBOOT_SYSTEM config)
CROSS_COMPILE = " $TARGET_PREFIX " LDFLAGS = "" ARCH = arm make HOSTCC = " $HOST_CC " HOSTSTRIP = "true"
fi
2014-01-30 21:02:44 +01:00
}
m a k e i n s t a l l _ t a r g e t ( ) {
2014-04-24 17:21:24 +02:00
mkdir -p $INSTALL /usr/share/bootloader
2014-05-04 09:55:09 +02:00
2017-04-30 18:45:00 -07:00
# Only install u-boot.img et al when building a board specific image
if [ -n " $UBOOT_SYSTEM " ] ; then
if [ -f $PROJECT_DIR /$PROJECT /devices/$DEVICE /bootloader/install ] ; then
. $PROJECT_DIR /$PROJECT /devices/$DEVICE /bootloader/install
elif [ -f $PROJECT_DIR /$PROJECT /bootloader/install ] ; then
. $PROJECT_DIR /$PROJECT /bootloader/install
fi
fi
2016-05-05 01:23:04 -07:00
2017-04-30 18:45:00 -07:00
# Always install the update script
if [ -f $PROJECT_DIR /$PROJECT /devices/$DEVICE /bootloader/update.sh ] ; then
cp -av $PROJECT_DIR /$PROJECT /devices/$DEVICE /bootloader/update.sh $INSTALL /usr/share/bootloader
elif [ -f $PROJECT_DIR /$PROJECT /bootloader/update.sh ] ; then
cp -av $PROJECT_DIR /$PROJECT /bootloader/update.sh $INSTALL /usr/share/bootloader
fi
2014-01-26 23:18:19 +01:00
}