projects/Amlogic: merge mkimage for all devices

This commit is contained in:
kszaq 2018-02-18 21:54:06 +01:00
parent bb85432771
commit 4da5da713e
4 changed files with 27 additions and 110 deletions

View File

@ -19,13 +19,32 @@
################################################################################
# compile and copy amlogic autoscript files to part1
for src in $INSTALL_SRC_DIR/*autoscript.src ; do
if [ -e "$src" ] ; then
$TOOLCHAIN/bin/mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d "$src" "$LE_TMP/$(basename $src .src)" > /dev/null
mcopy "$LE_TMP/$(basename $src .src)" ::
fi
done
case "$DEVICE" in
"S905"|"S912"|"LePotato"|"KVIM")
for src in $INSTALL_SRC_DIR/*autoscript.src ; do
if [ -e "$src" ] ; then
$TOOLCHAIN/bin/mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d "$src" "$LE_TMP/$(basename $src .src)" > /dev/null
mcopy "$LE_TMP/$(basename $src .src)" ::
fi
done
;;
esac
# copy device trees to part1
mmd device_trees
mcopy $RELEASE_DIR/3rdparty/bootloader/*.dtb ::/device_trees
for dtb in $RELEASE_DIR/3rdparty/bootloader/device_trees $RELEASE_DIR/3rdparty/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/dtb.img ; do
[ -e "$dtb" ] && mcopy -s "$dtb" ::
done
if [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot" ]; then
echo "Writing u-boot to $(basename $DISK)"
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot" of="$DISK" conv=fsync,notrunc bs=1 count=112 >"$SAVE_ERROR" 2>&1 || show_error
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot" of="$DISK" conv=fsync,notrunc bs=512 skip=1 seek=1 >"$SAVE_ERROR" 2>&1 || show_error
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/boot.ini ::
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/config.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::
fi

View File

@ -1,33 +0,0 @@
#!/bin/bash
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC 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 of the License, or
# (at your option) any later version.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
if [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" ]; then
echo "Writing u-boot to $(basename $DISK)"
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=1 count=444 >"$SAVE_ERROR" 2>&1 || show_error
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=512 skip=1 seek=1 >"$SAVE_ERROR" 2>&1 || show_error
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/boot.ini ::
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/config.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::
fi

View File

@ -1,33 +0,0 @@
#!/bin/bash
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2017-present Team LibreELEC
#
# LibreELEC 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 of the License, or
# (at your option) any later version.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
if [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" ]; then
echo "Writing u-boot to $(basename $DISK)"
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=1 count=112 >"$SAVE_ERROR" 2>&1 || show_error
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=512 skip=1 seek=1 >"$SAVE_ERROR" 2>&1 || show_error
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/boot.ini ::
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/config.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::
fi

View File

@ -1,36 +0,0 @@
#!/bin/bash
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2016-present Team LibreELEC
#
# LibreELEC 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 of the License, or
# (at your option) any later version.
#
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
if [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" ]; then
echo "Writing u-boot to $(basename $DISK)"
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=1 count=112 >"$SAVE_ERROR" 2>&1 || show_error
dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=512 skip=1 seek=1 >"$SAVE_ERROR" 2>&1 || show_error
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/boot.ini ::
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/config.ini" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/config.ini ::
fi
if [ -f "$RELEASE_DIR/3rdparty/bootloader/meson64_odroidc2.dtb" ]; then
mcopy $RELEASE_DIR/3rdparty/bootloader/meson64_odroidc2.dtb ::
fi