diff --git a/projects/Amlogic/bootloader/mkimage b/projects/Amlogic/bootloader/mkimage index abddaf12a4..e17ce7b94b 100644 --- a/projects/Amlogic/bootloader/mkimage +++ b/projects/Amlogic/bootloader/mkimage @@ -25,3 +25,7 @@ for src in $INSTALL_SRC_DIR/*autoscript.src ; do mcopy "$LE_TMP/$(basename $src .src)" :: fi done + +# copy device trees to part1 +mmd device_trees + mcopy $RELEASE_DIR/3rdparty/bootloader/*.dtb ::/device_trees diff --git a/projects/Amlogic/bootloader/release b/projects/Amlogic/bootloader/release new file mode 100755 index 0000000000..a8336ecc01 --- /dev/null +++ b/projects/Amlogic/bootloader/release @@ -0,0 +1,25 @@ +#!/bin/sh + +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2018-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 . +################################################################################ + +. config/options $1 + +mkdir -p $RELEASE_DIR/3rdparty/bootloader + cp -a $INSTALL/usr/share/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader + cp $INSTALL/usr/share/bootloader/dtb.img $RELEASE_DIR/3rdparty/bootloader diff --git a/projects/Amlogic/bootloader/update.sh b/projects/Amlogic/bootloader/update.sh index f5c35ca7cd..4c0e5afed4 100755 --- a/projects/Amlogic/bootloader/update.sh +++ b/projects/Amlogic/bootloader/update.sh @@ -99,6 +99,12 @@ for arg in $(cat /proc/cmdline); do esac done +if [ -d $BOOT_ROOT/device_trees ]; then + mount -o rw,remount $BOOT_ROOT + rm $BOOT_ROOT/device_trees/*.dtb + cp -p $SYSTEM_ROOT/usr/share/bootloader/*.dtb $BOOT_ROOT/device_trees/ +fi + if [ -f $SYSTEM_ROOT/usr/share/bootloader/boot.ini ]; then echo "*** updating boot.ini ..." mount -o rw,remount $BOOT_ROOT