mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
Merge pull request #4688 from HiassofT/le10-rpi-configtxt
RPi: clean up config.txt and roll out new version on update
This commit is contained in:
commit
264f3727a8
@ -1,38 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
################################################################################
|
||||
# Bootloader configuration - config.txt
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# Memory (System/GPU configuration )
|
||||
################################################################################
|
||||
|
||||
# Default GPU memory split
|
||||
gpu_mem=76
|
||||
|
||||
################################################################################
|
||||
# For overclocking and various other settings, see:
|
||||
# https://www.raspberrypi.org/documentation/configuration/config-txt.md
|
||||
################################################################################
|
||||
# Set 'force_turbo=1' to disable dynamic overclocking and enable overclocking always.
|
||||
force_turbo=0
|
||||
|
||||
# Force HDMI even if unplugged or powered off
|
||||
# hdmi_force_hotplug=1
|
||||
|
||||
# Doesn't sent initial active source message.
|
||||
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
|
||||
# rebooting.
|
||||
hdmi_ignore_cec_init=1
|
||||
|
||||
################################################################################
|
||||
# End of default configuration
|
||||
################################################################################
|
||||
|
||||
################################################################################
|
||||
# Include distribution specific config file if it exists.
|
||||
################################################################################
|
||||
[all]
|
||||
include distroconfig.txt
|
24
packages/tools/bcm2835-bootloader/files/config.txt
Normal file
24
packages/tools/bcm2835-bootloader/files/config.txt
Normal file
@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
################################################################################
|
||||
# Bootloader configuration
|
||||
# config.txt version v1 (do not remove or change this line!)
|
||||
################################################################################
|
||||
# For more options and information see
|
||||
# http://rpf.io/configtxt
|
||||
################################################################################
|
||||
|
||||
# Default GPU memory split, 76MB are needed for H264 decoder
|
||||
gpu_mem=76
|
||||
|
||||
# Don't send initial active source message.
|
||||
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
|
||||
# rebooting.
|
||||
hdmi_ignore_cec_init=1
|
||||
|
||||
################################################################################
|
||||
# Include distribution specific config file if it exists.
|
||||
################################################################################
|
||||
[all]
|
||||
include distroconfig.txt
|
@ -2,10 +2,13 @@
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
[ -z "$BOOT_ROOT" ] && BOOT_ROOT="/flash"
|
||||
[ -z "$SYSTEM_ROOT" ] && SYSTEM_ROOT=""
|
||||
|
||||
MIN_CONFIG_TXT_VERSION=1
|
||||
|
||||
# mount $BOOT_ROOT r/w
|
||||
mount -o remount,rw $BOOT_ROOT
|
||||
|
||||
@ -30,10 +33,18 @@ rm -rf $BOOT_ROOT/start_x.elf
|
||||
# some config.txt magic
|
||||
if [ ! -f $BOOT_ROOT/config.txt ]; then
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/config.txt $BOOT_ROOT
|
||||
elif [ -z "`grep "^[ ]*gpu_mem.*" $BOOT_ROOT/config.txt`" ]; then
|
||||
mv $BOOT_ROOT/config.txt $BOOT_ROOT/config.txt.bk
|
||||
cat $SYSTEM_ROOT/usr/share/bootloader/config.txt \
|
||||
$BOOT_ROOT/config.txt.bk > $BOOT_ROOT/config.txt
|
||||
else
|
||||
CONFIG_TXT_VERSION=$( \
|
||||
grep "^# config.txt version v[0-9]\+" $BOOT_ROOT/config.txt | \
|
||||
head -n 1 | \
|
||||
sed 's/^# config.txt version v\([0-9]\+\) .*$/\1/' \
|
||||
)
|
||||
if [ ${CONFIG_TXT_VERSION:-0} -lt $MIN_CONFIG_TXT_VERSION ]; then
|
||||
mv -f $BOOT_ROOT/config.txt $BOOT_ROOT/config.txt.old
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/config.txt $BOOT_ROOT/config.txt
|
||||
echo "WARNING incompatible config.txt detected, replacing with default."
|
||||
echo "Previous config.txt has been moved to config.txt.old"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add distro config file
|
@ -25,9 +25,9 @@ makeinstall_target() {
|
||||
cp -PRv start_x.elf $INSTALL/usr/share/bootloader/start.elf
|
||||
fi
|
||||
|
||||
find_file_path bootloader/update.sh && cp -PRv $FOUND_PATH $INSTALL/usr/share/bootloader
|
||||
find_file_path bootloader/update.sh $PKG_DIR/files/update.sh && cp -PRv $FOUND_PATH $INSTALL/usr/share/bootloader
|
||||
find_file_path bootloader/canupdate.sh && cp -PRv $FOUND_PATH $INSTALL/usr/share/bootloader
|
||||
|
||||
find_file_path config/distroconfig.txt $PKG_DIR/files/3rdparty/bootloader/distroconfig.txt && cp -PRv ${FOUND_PATH} $INSTALL/usr/share/bootloader
|
||||
find_file_path config/config.txt $PKG_DIR/files/3rdparty/bootloader/config.txt && cp -PRv ${FOUND_PATH} $INSTALL/usr/share/bootloader
|
||||
find_file_path config/distroconfig.txt $PKG_DIR/files/distroconfig.txt && cp -PRv ${FOUND_PATH} $INSTALL/usr/share/bootloader
|
||||
find_file_path config/config.txt $PKG_DIR/files/config.txt && cp -PRv ${FOUND_PATH} $INSTALL/usr/share/bootloader
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user