projects/Amlogic: add device tree blobs to SD card image and update them during update process

This commit is contained in:
kszaq 2018-01-20 22:56:32 +01:00
parent 212cde55f0
commit 55df7f9e1c
3 changed files with 35 additions and 0 deletions

View File

@ -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

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
. 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

View File

@ -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