diff --git a/packages/tools/u-boot/build b/packages/tools/u-boot/build index 3537ecdd74..041a8847f5 100755 --- a/packages/tools/u-boot/build +++ b/packages/tools/u-boot/build @@ -41,11 +41,21 @@ fi cd $PKG_BUILD +if [ "$UBOOT_VERSION" = "aml" ]; then + rm -f tools/ucl/libucl_linux.lib + make -C tools/ucl/ucl_cygwin_prj/ + cp -f tools/ucl/ucl_cygwin_prj/objs/libucl.a tools/ucl/libucl_linux.lib +fi + make CROSS_COMPILE="$TARGET_PREFIX" ARCH="$TARGET_ARCH" $UBOOT_CONFIG make CROSS_COMPILE="$TARGET_PREFIX" ARCH="$TARGET_ARCH" HOSTCC="$HOST_CC" HOSTSTRIP="true" mkdir -p $ROOT/$TOOLCHAIN/bin - cp tools/mkimage $ROOT/$TOOLCHAIN/bin + if [ -f build/tools/mkimage ]; then + cp build/tools/mkimage $ROOT/$TOOLCHAIN/bin + else + cp tools/mkimage $ROOT/$TOOLCHAIN/bin + fi if [ -r "$BOOT_CFG" ]; then cp $BOOT_CFG boot.cfg diff --git a/packages/tools/u-boot/install b/packages/tools/u-boot/install index cdaf9f4b8f..b9d41859f7 100755 --- a/packages/tools/u-boot/install +++ b/packages/tools/u-boot/install @@ -27,7 +27,11 @@ if [ -z "$UBOOT_CONFIGFILE" ]; then fi mkdir -p $INSTALL/usr/share/u-boot - cp $PKG_BUILD/u-boot.bin $INSTALL/usr/share/u-boot + if [ "$UBOOT_VERSION" = "aml" ]; then + cp $PKG_BUILD/build/u-boot-aml-ucl.bin $INSTALL/usr/share/u-boot/spi_M3_512.bin + else + cp $PKG_BUILD/u-boot.bin $INSTALL/usr/share/u-boot + fi if [ -f "$PKG_BUILD/MLO" ]; then cp $PKG_BUILD/MLO $INSTALL/usr/share/u-boot diff --git a/packages/tools/u-boot/meta b/packages/tools/u-boot/meta index f8221f0d1a..9a9b70c132 100644 --- a/packages/tools/u-boot/meta +++ b/packages/tools/u-boot/meta @@ -19,12 +19,22 @@ ################################################################################ PKG_NAME="u-boot" -PKG_VERSION="2011.03-rc1" +if [ "$UBOOT_VERSION" = "aml" ]; then + PKG_VERSION="aml-50dba31" + PKG_SITE="https://github.com/Pivosgroup/buildroot-uboot" + PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +elif [ "$UBOOT_VERSION" = "cubox" ]; then + PKG_VERSION="cubox-f826edd" + PKG_SITE="https://github.com/rabeeh/u-boot/tree/" + PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +else + PKG_VERSION="2011.03-rc1" + PKG_SITE="http://www.denx.de/wiki/U-Boot/WebHome" + PKG_URL="ftp://ftp.denx.de/pub/u-boot/$PKG_NAME-$PKG_VERSION.tar.bz2" +fi PKG_REV="1" PKG_ARCH="arm" PKG_LICENSE="GPL" -PKG_SITE="http://www.denx.de/wiki/U-Boot/WebHome" -PKG_URL="ftp://ftp.denx.de/pub/u-boot/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" @@ -34,9 +44,3 @@ PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems, us PKG_IS_ADDON="no" PKG_AUTORECONF="no" - -if [ "$PROJECT" = "CuBox" ]; then - PKG_VERSION="cubox-f826edd" - PKG_SITE="https://github.com/rabeeh/u-boot/tree/" - PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" -fi diff --git a/projects/ARCTIC_MC/options b/projects/ARCTIC_MC/options index 63e38e7392..961f8d27d2 100755 --- a/projects/ARCTIC_MC/options +++ b/projects/ARCTIC_MC/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/ATV/options b/projects/ATV/options index 7c8b80780b..35db0775e7 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -92,9 +92,11 @@ GOLD_SUPPORT="yes" # Bootloader to use (syslinux / u-boot / atv-bootloader) -# BOOTLOADER="atv-bootloader" disabled for now BOOTLOADER="atv-bootloader" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/Fusion/options b/projects/Fusion/options index feb29fda04..10920bb0a5 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/Generic/options b/projects/Generic/options index fac058a83c..ccfdd4b9cb 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index 2af62d997f..0a98915464 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/ION/options b/projects/ION/options index 335e1edfbf..ed0e8bf540 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/Intel/options b/projects/Intel/options index 19cc2c7938..30f899805e 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/RPi/options b/projects/RPi/options index 0632595494..dd619d91b0 100755 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader) BOOTLOADER="bcm2835-bootloader" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/Ultra/options b/projects/Ultra/options index 1b831a410d..cbec77b21a 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -94,6 +94,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/projects/Virtual/options b/projects/Virtual/options index 2568b0640a..15abc0c310 100755 --- a/projects/Virtual/options +++ b/projects/Virtual/options @@ -89,6 +89,9 @@ # Bootloader to use (syslinux / u-boot / atv-bootloader) BOOTLOADER="syslinux" +# u-boot version to use (default / aml / cubox) + UBOOT_VERSION="default" + # Configuration for u-boot UBOOT_CONFIG="" diff --git a/tools/mkpkg/mkpkg_u-boot-aml b/tools/mkpkg/mkpkg_u-boot-aml new file mode 100755 index 0000000000..561d6e2798 --- /dev/null +++ b/tools/mkpkg/mkpkg_u-boot-aml @@ -0,0 +1,43 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + if [ ! -d u-boot-aml.git ]; then + git clone git://github.com/Pivosgroup/buildroot-uboot.git u-boot-aml.git + fi + + cd u-boot-aml.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf u-boot-aml-$GIT_REV + cp -R u-boot-aml.git u-boot-aml-$GIT_REV + +echo "cleaning sources..." + rm -rf u-boot-aml-$GIT_REV/.git + +echo "packing sources..." + tar cvJf u-boot-aml-$GIT_REV.tar.xz u-boot-aml-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf u-boot-aml-$GIT_REV