#!/bin/sh ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. # http://www.gnu.org/copyleft/gpl.html ################################################################################ . config/options $1 $SCRIPTS/checkdeps build $SCRIPTS/build toolchain export INSTALL=$BUILD/image/system get_version rm -rf $INSTALL rm -rf $STAMPS_INSTALL mkdir -p $INSTALL # setup fakeroot echo "chown -R 0:0 $INSTALL" >> $FAKEROOT_SCRIPT # create baselayout mkdir -p $INSTALL/bin mkdir -p $INSTALL/etc mkdir -p $INSTALL/lib mkdir -p $INSTALL/sbin mkdir -p $INSTALL/dev mkdir -p $INSTALL/proc mkdir -p $INSTALL/sys mkdir -p $INSTALL/usr mkdir -p $INSTALL/var mkdir -p $INSTALL/flash mkdir -p $INSTALL/storage ln -sf /var $INSTALL/usr/var ln -sf /var/tmp $INSTALL/tmp ln -sf /var/media $INSTALL/media if [ "$TARGET_ARCH" = "x86_64" -o "$TARGET_ARCH" = "powerpc64" ]; then ln -s /lib $INSTALL/lib64 ln -s lib $INSTALL/usr/lib64 fi echo "$DISTRONAME" > $INSTALL/etc/distribution echo "$PROJECT.$TARGET_ARCH" > $INSTALL/etc/arch echo "$OPENELEC_VERSION" > $INSTALL/etc/version echo "$TARGET_VERSION" > $INSTALL/etc/release echo "$DISTRONAME - Version: $OPENELEC_VERSION" > $INSTALL/etc/openelec-release if [ -n "$GIT_HASH" ]; then echo "$GIT_HASH" >> $INSTALL/etc/gitrev fi # create /etc/issue echo $GREATING0 > $INSTALL/etc/issue echo $GREATING1 >> $INSTALL/etc/issue echo $GREATING2 >> $INSTALL/etc/issue echo $GREATING3 >> $INSTALL/etc/issue echo $GREATING4 >> $INSTALL/etc/issue echo "$DISTRONAME Version: $OPENELEC_VERSION" >> $INSTALL/etc/issue if [ -n "$GIT_HASH" ]; then echo "$DISTRONAME git: $GIT_HASH" >> $INSTALL/etc/issue fi # copy project related files to filesystem if [ -d "$PROJECT_DIR/$PROJECT/filesystem" ]; then cp -PR $PROJECT_DIR/$PROJECT/filesystem/* $INSTALL fi # Basissystem... $SCRIPTS/install eglibc $SCRIPTS/install gcc-final $SCRIPTS/install linux system $SCRIPTS/install busybox $SCRIPTS/install util-linux # Network support [ "$NETWORK" = "yes" ] && $SCRIPTS/install network # Transmission BitTorrent support [ "$TRANSMISSION" = "yes" ] && $SCRIPTS/install transmission # SABnzbd support [ "$SABNZBD" = "yes" ] && $SCRIPTS/install SABnzbd # Graphic support [ ! "$DISPLAYSERVER" = "no" ] && $SCRIPTS/install $DISPLAYSERVER # Multimedia support [ ! "$MEDIACENTER" = "no" ] && $SCRIPTS/install mediacenter [ "$TVHEADEND" = "yes" ] && $SCRIPTS/install hts-tvheadend # Automounter support [ "$UDISKS" = "yes" ] && $SCRIPTS/install udisks # Powermanagement support [ "$UPOWER" = "yes" ] && $SCRIPTS/install upower [ "$UPOWER" = "yes" ] && $SCRIPTS/install ConsoleKit # NTFS 3G support [ "$NTFS3G" = "yes" ] && $SCRIPTS/install ntfs-3g # Apple mount (ifuse) support [ "$APPLEMOUNT" = "yes" ] && $SCRIPTS/install ifuse # Remote support [ "$REMOTE_SUPPORT" = "yes" ] && $SCRIPTS/install remote # LCD support [ ! "$LCD_DRIVER" = "none" ] && $SCRIPTS/install lcdproc # Sensors support [ "$SENSOR_SUPPORT" = "yes" ] && $SCRIPTS/install lm_sensors # Update support [ "$UPDATE_SUPPORT" = "yes" ] && $SCRIPTS/install autoupdate # Update support [ "$INSTALLER_SUPPORT" = "yes" ] && $SCRIPTS/install installer # Games and Emulators support (SDK's) [ "$GAMES" = "yes" ] && $SCRIPTS/install games-sdk [ "$EMULATORS" = "yes" ] && $SCRIPTS/install emulators-sdk # some system tools [ "$TOOLS" = "yes" ] && $SCRIPTS/install tools # Devtools... (not for Release) [ "$TESTING" = "yes" ] && $SCRIPTS/install testing [ "$DEVTOOLS" = "yes" ] && $SCRIPTS/install debug # OEM packages [ "$OEM_SUPPORT" = "yes" ] && $SCRIPTS/install oem # strip kernel modules for MOD in `find $INSTALL/lib/modules/ -name *.ko`; do $STRIP --strip-debug $MOD done