mirror of
https://github.com/libretro/Lakka.git
synced 2024-11-24 00:09:43 +00:00
82c6fba858
Signed-off-by: Stephan Raue <stephan@openelec.tv>
65 lines
2.6 KiB
Bash
Executable File
65 lines
2.6 KiB
Bash
Executable File
#!/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
|
|
|
|
rm -rf $FAKEROOT_SCRIPT # remove $FAKEROOT_SCRIPT if it exist
|
|
touch $FAKEROOT_SCRIPT # create an empty $FAKEROOT_SCRIPT
|
|
chmod +x $FAKEROOT_SCRIPT # make $FAKEROOT_SCRIPT executable
|
|
|
|
$SCRIPTS/image
|
|
$SCRIPTS/build squashfs
|
|
$SCRIPTS/build fakeroot
|
|
|
|
get_version
|
|
|
|
mkdir -p $TARGET_IMG
|
|
rm -rf $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.kernel
|
|
rm -rf $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.mach_kernel
|
|
|
|
if [ "$BOOTLOADER" = "u-boot" ]; then
|
|
KERNEL_IMAGE="uImage"
|
|
else
|
|
KERNEL_IMAGE="bzImage"
|
|
fi
|
|
|
|
if [ "$TARGET_ARCH" = i386 -o "$TARGET_ARCH" = x86_64 ]; then
|
|
KERNEL_ARCH="x86"
|
|
elif [ "$TARGET_ARCH" = arm ]; then
|
|
KERNEL_ARCH="arm"
|
|
fi
|
|
|
|
cp -PR $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.kernel
|
|
|
|
if [ "$BOOTLOADER" = "atv-bootloader" ]; then
|
|
cp -PR $BUILD/atv-bootloader-*/mach_kernel $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.mach_kernel
|
|
chmod 0644 $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.mach_kernel
|
|
fi
|
|
|
|
echo "rm -rf $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system" >> $FAKEROOT_SCRIPT
|
|
# echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system -noappend -comp xz" >> $FAKEROOT_SCRIPT
|
|
echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system -noappend" >> $FAKEROOT_SCRIPT
|
|
$ROOT/$TOOLCHAIN/bin/fakeroot -- $FAKEROOT_SCRIPT
|
|
chmod 0644 $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system
|
|
chmod 0644 $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.kernel
|
|
rm -rf $FAKEROOT_SCRIPT
|