diff --git a/packages/tools/berryboot-tools/install b/packages/tools/berryboot-tools/install new file mode 100755 index 0000000000..d22fc5c7d0 --- /dev/null +++ b/packages/tools/berryboot-tools/install @@ -0,0 +1,39 @@ +#!/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 + +PLYMOUTH_DIR="$BUILD/plymouth-lite-*" +PLYMOUTH_PKG_DIR=`find $PACKAGES -type d -name plymouth-lite 2>/dev/null` + +mkdir -p $INSTALL + cp $PKG_DIR/scripts/berryboot-init $INSTALL + +mkdir -p $INSTALL/bin + cp $PLYMOUTH_DIR/ply-image $INSTALL/bin + +mkdir -p $INSTALL/splash + if [ -f $PROJECT_DIR/$PROJECT/splash/splash.png ]; then + cp $PROJECT_DIR/$PROJECT/splash/splash.png $INSTALL/splash + else + cp $PLYMOUTH_PKG_DIR/splash/splash.png $INSTALL/splash + fi diff --git a/packages/tools/berryboot-tools/meta b/packages/tools/berryboot-tools/meta new file mode 100644 index 0000000000..af11d40563 --- /dev/null +++ b/packages/tools/berryboot-tools/meta @@ -0,0 +1,36 @@ +################################################################################ +# 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 +################################################################################ + +PKG_NAME="berryboot-tools" +PKG_VERSION="0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="zlib" +PKG_BUILD_DEPENDS="toolchain zlib libpng plymouth-lite" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="berryboot-tools: tools for berryboot support" +PKG_LONGDESC="berryboot-tools: tools for berryboot support" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/tools/berryboot-tools/scripts/berryboot-init b/packages/tools/berryboot-tools/scripts/berryboot-init new file mode 100755 index 0000000000..87b35f7e04 --- /dev/null +++ b/packages/tools/berryboot-tools/scripts/berryboot-init @@ -0,0 +1,56 @@ +#!/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 +################################################################################ + +UPDATEDIR=${DATADIR}/storage/.update +UPDATEFILE=${UPDATEDIR}/SYSTEM +SPLASHIMAGE="/squashfs/splash/splash.png" + +# +# load splash +# berryboot is based on uClibc, so run ply-image via ld.so directly +# + +if [ -e /dev/fb0 -a -f "${SPLASHIMAGE}" ]; then +# set framebuffer to a default resolution (1024x768-32) + LD_LIBRARY_PATH=/squashfs/lib /squashfs/lib/ld.so \ + /squashfs/bin/busybox fbset -g 1024 768 1024 768 32 + +# load splash + LD_LIBRARY_PATH=/squashfs/lib /squashfs/lib/ld.so \ + /squashfs/bin/ply-image ${SPLASHIMAGE} > /dev/null 2>&1 +fi + +# +# Check if OpenELEC downloaded an update +# + +if [ -f "${UPDATEFILE}" ]; then + echo "Updating OpenELEC..." + cd / + umount -f /squashfs > /dev/null 2>&1 + mv -f "${UPDATEFILE}" "/mnt/images/${IMAGE}" + rm -rf "${UPDATEDIR}/*" + sync + echo "Done, rebooting now..." + sleep 5 + reboot -f +fi diff --git a/projects/ARCTIC_MC/options b/projects/ARCTIC_MC/options index 22242600d1..86f1a39019 100755 --- a/projects/ARCTIC_MC/options +++ b/projects/ARCTIC_MC/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/projects/ATV/options b/projects/ATV/options index ad794221bc..3c9b39e612 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -86,7 +86,6 @@ LTO_SUPPORT="yes" # Bootloader to use (syslinux / u-boot / atv-bootloader) -# BOOTLOADER="atv-bootloader" disabled for now BOOTLOADER="atv-bootloader" # Configuration for u-boot @@ -95,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # 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 d70bdd533c..6d59fc364f 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # 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 9a0f25a347..79b197b113 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # 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 fa93b17fc6..5f1dcde26e 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # 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 d5d4f5d102..5b7e8c2ede 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # 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 8ad97b7f85..cb62033bb2 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # 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 b958883b33..5a38c60c02 100755 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="yes" + # 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 d1c96b98db..cebba05d6f 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -94,6 +94,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # 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 f755dc2eb6..4d5e652c50 100755 --- a/projects/Virtual/options +++ b/projects/Virtual/options @@ -89,6 +89,9 @@ # Target Configfile for u-boot UBOOT_CONFIGFILE="" +# install Berryboot support tools + BERRYBOOT_TOOLS="no" + # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel diff --git a/scripts/image b/scripts/image index 02f7e5b709..cf31fccaab 100755 --- a/scripts/image +++ b/scripts/image @@ -144,6 +144,9 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" # Update support [ "$UPDATE_SUPPORT" = "yes" ] && $SCRIPTS/install autoupdate +# Berryboot support + [ "$BERRYBOOT_TOOLS" = "yes" ] && $SCRIPTS/install berryboot-tools + # Installer support [ "$INSTALLER_SUPPORT" = "yes" ] && $SCRIPTS/install installer