From 646ed69ffdbce00abfc8ae9548a66473bee05a4b Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 26 Dec 2012 15:11:09 +0100 Subject: [PATCH] add CuBox support, update package with last bootloader support changes Signed-off-by: Stephan Raue --- config/functions | 3 +++ packages/tools/u-boot/build | 8 ++++++-- packages/tools/u-boot/files/INSTALL | 0 packages/tools/u-boot/install | 10 ++++++---- packages/tools/u-boot/meta | 6 ++++++ packages/tools/u-boot/release | 30 +++++++++++++++++++++++++++++ projects/ATV/options | 3 +++ projects/Fusion/options | 3 +++ projects/Generic/options | 3 +++ projects/Generic_OSS/options | 3 +++ projects/ION/options | 3 +++ projects/Intel/options | 3 +++ projects/RPi/options | 3 +++ projects/Ultra/options | 3 +++ projects/Virtual/options | 3 +++ 15 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 packages/tools/u-boot/files/INSTALL create mode 100755 packages/tools/u-boot/release diff --git a/config/functions b/config/functions index b4f5f06d05..dcc6f3ebfa 100644 --- a/config/functions +++ b/config/functions @@ -335,7 +335,10 @@ show_config() { config_message="$config_message\n - Default Hostname:\t\t\t $HOSTNAME" config_message="$config_message\n - Default ROOT Password:\t\t $ROOT_PASSWORD" config_message="$config_message\n - Bootloader:\t\t\t\t $BOOTLOADER" +if [ "$BOOTLOADER" = "u-boot" ]; then config_message="$config_message\n - U-Boot configuration:\t\t $UBOOT_CONFIG" + config_message="$config_message\n - U-Boot config file:\t\t\t $UBOOT_CONFIGFILE" +fi config_message="$config_message\n - UDisks support:\t\t\t $UDISKS" config_message="$config_message\n - UPower support:\t\t\t $UPOWER" config_message="$config_message\n - Update support:\t\t\t $UPDATE_SUPPORT" diff --git a/packages/tools/u-boot/build b/packages/tools/u-boot/build index a117f27403..3537ecdd74 100755 --- a/packages/tools/u-boot/build +++ b/packages/tools/u-boot/build @@ -35,9 +35,13 @@ if [ -z "$UBOOT_CONFIG" ]; then exit 1 fi +if [ -z "$UBOOT_CONFIGFILE" ]; then + UBOOT_CONFIGFILE="boot.scr" +fi + cd $PKG_BUILD -make CROSS_COMPILE="$TARGET_PREFIX" ARCH="$TARGET_ARCH" "$UBOOT_CONFIG" +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 @@ -51,5 +55,5 @@ if [ -r "$BOOT_CFG" ]; then -C none \ -n "$DISTRONAME Boot" \ -d boot.cfg \ - boot.ini + $UBOOT_CONFIGFILE fi diff --git a/packages/tools/u-boot/files/INSTALL b/packages/tools/u-boot/files/INSTALL new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/tools/u-boot/install b/packages/tools/u-boot/install index a81777674f..cdaf9f4b8f 100755 --- a/packages/tools/u-boot/install +++ b/packages/tools/u-boot/install @@ -22,6 +22,10 @@ . config/options $1 +if [ -z "$UBOOT_CONFIGFILE" ]; then + UBOOT_CONFIGFILE="boot.scr" +fi + mkdir -p $INSTALL/usr/share/u-boot cp $PKG_BUILD/u-boot.bin $INSTALL/usr/share/u-boot @@ -33,8 +37,6 @@ if [ -f "$PKG_BUILD/boot.cfg" ]; then cp $PKG_BUILD/boot.cfg $INSTALL/usr/share/u-boot fi -if [ -f "$PKG_BUILD/boot.ini" ]; then - cp $PKG_BUILD/boot.ini $INSTALL/usr/share/u-boot - # some boards read boot.scr by default - cp $PKG_BUILD/boot.ini $INSTALL/usr/share/u-boot/boot.scr +if [ -f "$PKG_BUILD/$UBOOT_CONFIGFILE" ]; then + cp $PKG_BUILD/$UBOOT_CONFIGFILE $INSTALL/usr/share/u-boot fi diff --git a/packages/tools/u-boot/meta b/packages/tools/u-boot/meta index 870638aede..f8221f0d1a 100644 --- a/packages/tools/u-boot/meta +++ b/packages/tools/u-boot/meta @@ -34,3 +34,9 @@ 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/packages/tools/u-boot/release b/packages/tools/u-boot/release new file mode 100755 index 0000000000..fec05774f2 --- /dev/null +++ b/packages/tools/u-boot/release @@ -0,0 +1,30 @@ +#!/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 +################################################################################ + +. config/options $1 + +if [ -z "$UBOOT_CONFIGFILE" ]; then + UBOOT_CONFIGFILE="boot.scr" +fi + +mkdir -p $RELEASE_DIR/3rdparty/bootloader + cp -PR $BUILD/u-boot-*/$UBOOT_CONFIGFILE $RELEASE_DIR/3rdparty/bootloader diff --git a/projects/ATV/options b/projects/ATV/options index 326a820e5b..9b0944247d 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -92,6 +92,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/Fusion/options b/projects/Fusion/options index 60c091ee06..975efb748d 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -91,6 +91,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/Generic/options b/projects/Generic/options index f2a7749305..829f09a4fe 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -91,6 +91,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index c7bfdeef20..194b9c466a 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -91,6 +91,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/ION/options b/projects/ION/options index 569f0e08df..f7c21849d0 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -91,6 +91,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/Intel/options b/projects/Intel/options index 0e23527a1a..a2754dbe04 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -91,6 +91,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/RPi/options b/projects/RPi/options index a962caaf17..cc9e2a08fe 100755 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -91,6 +91,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/Ultra/options b/projects/Ultra/options index 503ab34e30..a954c61d04 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -91,6 +91,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/Virtual/options b/projects/Virtual/options index 4051ce8c06..c52937d55a 100755 --- a/projects/Virtual/options +++ b/projects/Virtual/options @@ -86,6 +86,9 @@ # Configuration for u-boot UBOOT_CONFIG="" +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel