mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
cleanup scripts: projects/
This commit is contained in:
parent
67dcda694b
commit
52d0bad764
@ -5,4 +5,4 @@
|
|||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -9,4 +9,4 @@ if [ -f /sys/class/thermal/thermal_zone1/temp ]; then
|
|||||||
else
|
else
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
||||||
fi
|
fi
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
# detect legacy kernel installs and abort to prevent upgrades
|
# detect legacy kernel installs and abort to prevent upgrades
|
||||||
case $(uname -r) in
|
case $(uname -r) in
|
||||||
3.14*|4.9*)
|
3.14* | 4.9*)
|
||||||
echo "Updates from Amlogic vendor kernels are not supported!"
|
echo "Updates from Amlogic vendor kernels are not supported!"
|
||||||
sleep 10
|
sleep 10
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
[ -z "$BOOT_PART" ] && BOOT_PART=$(df "$BOOT_ROOT" | tail -1 | awk {' print $1 '})
|
[ -z "$BOOT_PART" ] && BOOT_PART=$(df "$BOOT_ROOT" | tail -1 | awk {' print $1 '})
|
||||||
|
|
||||||
# identify the boot device
|
# identify the boot device
|
||||||
if [ -z "$BOOT_DISK" ]; then
|
if [ -z "$BOOT_DISK" ]; then
|
||||||
case $BOOT_PART in
|
case $BOOT_PART in
|
||||||
/dev/sd[a-z][0-9]*)
|
/dev/sd[a-z][0-9]*)
|
||||||
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,[0-9]*,,g")
|
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,[0-9]*,,g")
|
||||||
@ -17,47 +17,47 @@
|
|||||||
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,p[0-9]*,,g")
|
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,p[0-9]*,,g")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mount $BOOT_ROOT rw
|
# mount $BOOT_ROOT rw
|
||||||
mount -o remount,rw $BOOT_ROOT
|
mount -o remount,rw $BOOT_ROOT
|
||||||
|
|
||||||
# update /amlogic device trees
|
# update /amlogic device trees
|
||||||
if [ -d $BOOT_ROOT/amlogic ]; then
|
if [ -d $BOOT_ROOT/amlogic ]; then
|
||||||
for dtbfile in $BOOT_ROOT/amlogic/*.dtb ; do
|
for dtbfile in $BOOT_ROOT/amlogic/*.dtb; do
|
||||||
dtb=$(basename $dtbfile)
|
dtb=$(basename $dtbfile)
|
||||||
echo "Updating $dtb"
|
echo "Updating $dtb"
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/amlogic/ 2>/dev/null || true
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/amlogic/ 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# update /extlinux device trees
|
# update /extlinux device trees
|
||||||
if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then
|
if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then
|
||||||
for dtbfile in $BOOT_ROOT/*.dtb ; do
|
for dtbfile in $BOOT_ROOT/*.dtb; do
|
||||||
dtb=$(basename $dtbfile)
|
dtb=$(basename $dtbfile)
|
||||||
echo "Updating $dtb"
|
echo "Updating $dtb"
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# update /dtb device trees
|
# update /dtb device trees
|
||||||
if [ -d $BOOT_ROOT/dtb ]; then
|
if [ -d $BOOT_ROOT/dtb ]; then
|
||||||
for dtbfile in $BOOT_ROOT/dtb/*.dtb ; do
|
for dtbfile in $BOOT_ROOT/dtb/*.dtb; do
|
||||||
dtb=$(basename $dtbfile)
|
dtb=$(basename $dtbfile)
|
||||||
echo "Updating $dtb"
|
echo "Updating $dtb"
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/dtb/ 2>/dev/null || true
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/dtb/ 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# update u-boot scripts
|
# update u-boot scripts
|
||||||
if [ -f $BOOT_ROOT/uEnv.ini ]; then
|
if [ -f $BOOT_ROOT/uEnv.ini ]; then
|
||||||
for scriptfile in $SYSTEM_ROOT/usr/share/bootloader/*_autoscript* $SYSTEM_ROOT/usr/share/bootloader/*.scr ; do
|
for scriptfile in $SYSTEM_ROOT/usr/share/bootloader/*_autoscript* $SYSTEM_ROOT/usr/share/bootloader/*.scr; do
|
||||||
script=$(basename $scriptfile)
|
script=$(basename $scriptfile)
|
||||||
echo "Updating $script"
|
echo "Updating $script"
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$script $BOOT_ROOT/ 2>/dev/null || true
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$script $BOOT_ROOT/ 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mount $BOOT_ROOT ro
|
# mount $BOOT_ROOT ro
|
||||||
sync
|
sync
|
||||||
mount -o remount,ro $BOOT_ROOT
|
mount -o remount,ro $BOOT_ROOT
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
case $(dtsoc) in
|
case $(dtsoc) in
|
||||||
amlogic,g12*|amlogic,sm1)
|
amlogic,g12* | amlogic,sm1)
|
||||||
TEMP=$(cat /sys/devices/virtual/thermal/thermal_zone1/temp)
|
TEMP=$(cat /sys/devices/virtual/thermal/thermal_zone1/temp)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -12,5 +12,5 @@ case $(dtsoc) in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
TEMP="$(( $TEMP / 1000 ))"
|
TEMP="$(($TEMP / 1000))"
|
||||||
echo "${TEMP} C"
|
echo "${TEMP} C"
|
||||||
|
@ -8,16 +8,16 @@ SYS_CPUFREQ_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
|||||||
|
|
||||||
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
||||||
for io_is_busy in $(find /sys/devices/system/cpu -name io_is_busy); do
|
for io_is_busy in $(find /sys/devices/system/cpu -name io_is_busy); do
|
||||||
echo 1 > "${io_is_busy}"
|
echo 1 >"${io_is_busy}"
|
||||||
done
|
done
|
||||||
for up_threshold in $(find /sys/devices/system/cpu -name up_threshold); do
|
for up_threshold in $(find /sys/devices/system/cpu -name up_threshold); do
|
||||||
echo 50 > "${up_threshold}"
|
echo 50 >"${up_threshold}"
|
||||||
done
|
done
|
||||||
for sampling_rate in $(find /sys/devices/system/cpu -name sampling_rate); do
|
for sampling_rate in $(find /sys/devices/system/cpu -name sampling_rate); do
|
||||||
echo 100000 > "${sampling_rate}"
|
echo 100000 >"${sampling_rate}"
|
||||||
done
|
done
|
||||||
for sampling_down_factor in $(find /sys/devices/system/cpu -name sampling_down_factor); do
|
for sampling_down_factor in $(find /sys/devices/system/cpu -name sampling_down_factor); do
|
||||||
echo 50 > "${sampling_down_factor}"
|
echo 50 >"${sampling_down_factor}"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
FB_TYPE="$(grep '^0 ' /proc/fb | sed 's/[^[:space:]] //')"
|
FB_TYPE="$(grep '^0 ' /proc/fb | sed 's/[^[:space:]] //')"
|
||||||
|
|
||||||
if [ "$FB_TYPE" == "inteldrmfb" ] || echo "$FB_TYPE" | grep -q "^i9[0-9]*drmfb$"; then
|
if [ "$FB_TYPE" == "inteldrmfb" ] || echo "$FB_TYPE" | grep -q "^i9[0-9]*drmfb$"; then
|
||||||
OUTPUT=`/usr/bin/xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
|
OUTPUT=$(/usr/bin/xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q')
|
||||||
for out in $OUTPUT ; do
|
for out in $OUTPUT; do
|
||||||
# Hack - something is not yet fully right
|
# Hack - something is not yet fully right
|
||||||
/usr/bin/xrandr -display :0 --output $out --set "Broadcast RGB" "Full"
|
/usr/bin/xrandr -display :0 --output $out --set "Broadcast RGB" "Full"
|
||||||
# Seems there is a little race somewhere on some outputs
|
# Seems there is a little race somewhere on some outputs
|
||||||
# Turn the display shortly off and on again
|
# Turn the display shortly off and on again
|
||||||
if [ -e "/storage/.config/forcedisplay" ]; then
|
if [ -e "/storage/.config/forcedisplay" ]; then
|
||||||
/usr/bin/xrandr -display :0 --output $out --off ; /usr/bin/xrandr -display :0 --output $out --auto
|
/usr/bin/xrandr -display :0 --output $out --off
|
||||||
|
/usr/bin/xrandr -display :0 --output $out --auto
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -16,7 +16,7 @@ if [ $(basename "$0") = "gputemp" -o "$1" = "gpu" ]; then
|
|||||||
for hwmon in /sys/class/hwmon/*; do
|
for hwmon in /sys/class/hwmon/*; do
|
||||||
if [ -f "${hwmon}/name" ]; then
|
if [ -f "${hwmon}/name" ]; then
|
||||||
case $(cat ${hwmon}/name) in
|
case $(cat ${hwmon}/name) in
|
||||||
nouveau|radeon|amdgpu)
|
nouveau | radeon | amdgpu)
|
||||||
[[ -f "${hwmon}/temp1_input" ]] && TEMP="$(cat ${hwmon}/temp1_input)" && break
|
[[ -f "${hwmon}/temp1_input" ]] && TEMP="$(cat ${hwmon}/temp1_input)" && break
|
||||||
[[ -f "${hwmon}/temp2_input" ]] && TEMP="$(cat ${hwmon}/temp2_input)" && break
|
[[ -f "${hwmon}/temp2_input" ]] && TEMP="$(cat ${hwmon}/temp2_input)" && break
|
||||||
;;
|
;;
|
||||||
@ -25,7 +25,7 @@ if [ $(basename "$0") = "gputemp" -o "$1" = "gpu" ]; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
TEMP="$(( $TEMP / 1000 ))"
|
TEMP="$(($TEMP / 1000))"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ if [ "$1" = "cpu" -o "$TEMP" = "0" ]; then
|
|||||||
for hwmon in /sys/class/hwmon/*; do
|
for hwmon in /sys/class/hwmon/*; do
|
||||||
if [ -f "${hwmon}/name" ]; then
|
if [ -f "${hwmon}/name" ]; then
|
||||||
case $(cat ${hwmon}/name) in
|
case $(cat ${hwmon}/name) in
|
||||||
coretemp|k10temp|scpi_sensors)
|
coretemp | k10temp | scpi_sensors)
|
||||||
[[ -f "${hwmon}/temp1_input" ]] && TEMP="$(cat ${hwmon}/temp1_input)" && break
|
[[ -f "${hwmon}/temp1_input" ]] && TEMP="$(cat ${hwmon}/temp1_input)" && break
|
||||||
[[ -f "${hwmon}/temp2_input" ]] && TEMP="$(cat ${hwmon}/temp2_input)" && break
|
[[ -f "${hwmon}/temp2_input" ]] && TEMP="$(cat ${hwmon}/temp2_input)" && break
|
||||||
;;
|
;;
|
||||||
@ -46,7 +46,7 @@ if [ "$1" = "cpu" -o "$TEMP" = "0" ]; then
|
|||||||
TEMP="$(cat /sys/class/hwmon/hwmon0/device/temp1_input)"
|
TEMP="$(cat /sys/class/hwmon/hwmon0/device/temp1_input)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TEMP="$(( $TEMP / 1000 ))"
|
TEMP="$(($TEMP / 1000))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${TEMP} C"
|
echo "${TEMP} C"
|
||||||
|
@ -114,4 +114,3 @@ case "${ACTION}" in
|
|||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -4,4 +4,4 @@
|
|||||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -4,4 +4,4 @@
|
|||||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone1/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone1/temp)"
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -16,17 +16,17 @@ if [ -z "$BOOT_DISK" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# mount $BOOT_ROOT r/w
|
# mount $BOOT_ROOT r/w
|
||||||
mount -o remount,rw $BOOT_ROOT
|
mount -o remount,rw $BOOT_ROOT
|
||||||
|
|
||||||
# update Device Tree Blobs
|
# update Device Tree Blobs
|
||||||
for all_dtb in /flash/*.dtb; do
|
for all_dtb in /flash/*.dtb; do
|
||||||
dtb=$(basename $all_dtb)
|
dtb=$(basename $all_dtb)
|
||||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
if [ -f $SYSTEM_ROOT/usr/share/bootloader/$dtb ]; then
|
||||||
echo "*** updating Device Tree Blob: $dtb ..."
|
echo "*** updating Device Tree Blob: $dtb ..."
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# mount $BOOT_ROOT r/o
|
# mount $BOOT_ROOT r/o
|
||||||
sync
|
sync
|
||||||
mount -o remount,ro $BOOT_ROOT
|
mount -o remount,ro $BOOT_ROOT
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
|
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
|
||||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
SYS_CPUFREQ_GOV=$( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )
|
SYS_CPUFREQ_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||||
SYS_ONDEMAND_DIR="/sys/devices/system/cpu/cpufreq/ondemand/"
|
SYS_ONDEMAND_DIR="/sys/devices/system/cpu/cpufreq/ondemand/"
|
||||||
|
|
||||||
# Configure frequency scaling properties
|
# Configure frequency scaling properties
|
||||||
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
||||||
echo 1 > "${SYS_ONDEMAND_DIR}/io_is_busy"
|
echo 1 >"${SYS_ONDEMAND_DIR}/io_is_busy"
|
||||||
echo 50 > "${SYS_ONDEMAND_DIR}/up_threshold"
|
echo 50 >"${SYS_ONDEMAND_DIR}/up_threshold"
|
||||||
echo 100000 > "${SYS_ONDEMAND_DIR}/sampling_rate"
|
echo 100000 >"${SYS_ONDEMAND_DIR}/sampling_rate"
|
||||||
echo 50 > "${SYS_ONDEMAND_DIR}/sampling_down_factor"
|
echo 50 >"${SYS_ONDEMAND_DIR}/sampling_down_factor"
|
||||||
else
|
else
|
||||||
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
||||||
fi
|
fi
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone1/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone1/temp)"
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
|
||||||
echo "$(( $TEMP / 1000 )) C"
|
echo "$(($TEMP / 1000)) C"
|
||||||
|
@ -8,16 +8,16 @@ SYS_CPUFREQ_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
|||||||
|
|
||||||
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
||||||
for io_is_busy in $(find /sys/devices/system/cpu -name io_is_busy); do
|
for io_is_busy in $(find /sys/devices/system/cpu -name io_is_busy); do
|
||||||
echo 1 > "${io_is_busy}"
|
echo 1 >"${io_is_busy}"
|
||||||
done
|
done
|
||||||
for up_threshold in $(find /sys/devices/system/cpu -name up_threshold); do
|
for up_threshold in $(find /sys/devices/system/cpu -name up_threshold); do
|
||||||
echo 50 > "${up_threshold}"
|
echo 50 >"${up_threshold}"
|
||||||
done
|
done
|
||||||
for sampling_rate in $(find /sys/devices/system/cpu -name sampling_rate); do
|
for sampling_rate in $(find /sys/devices/system/cpu -name sampling_rate); do
|
||||||
echo 100000 > "${sampling_rate}"
|
echo 100000 >"${sampling_rate}"
|
||||||
done
|
done
|
||||||
for sampling_down_factor in $(find /sys/devices/system/cpu -name sampling_down_factor); do
|
for sampling_down_factor in $(find /sys/devices/system/cpu -name sampling_down_factor); do
|
||||||
echo 50 > "${sampling_down_factor}"
|
echo 50 >"${sampling_down_factor}"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
[ -z "$BOOT_PART" ] && BOOT_PART=$(df "$BOOT_ROOT" | tail -1 | awk {' print $1 '})
|
[ -z "$BOOT_PART" ] && BOOT_PART=$(df "$BOOT_ROOT" | tail -1 | awk {' print $1 '})
|
||||||
|
|
||||||
# identify the boot device
|
# identify the boot device
|
||||||
if [ -z "$BOOT_DISK" ]; then
|
if [ -z "$BOOT_DISK" ]; then
|
||||||
case $BOOT_PART in
|
case $BOOT_PART in
|
||||||
/dev/sd[a-z][0-9]*)
|
/dev/sd[a-z][0-9]*)
|
||||||
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,[0-9]*,,g")
|
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,[0-9]*,,g")
|
||||||
@ -17,20 +17,20 @@
|
|||||||
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,p[0-9]*,,g")
|
BOOT_DISK=$(echo $BOOT_PART | sed -e "s,p[0-9]*,,g")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mount $BOOT_ROOT rw
|
# mount $BOOT_ROOT rw
|
||||||
mount -o remount,rw $BOOT_ROOT
|
mount -o remount,rw $BOOT_ROOT
|
||||||
|
|
||||||
# update extlinux device trees
|
# update extlinux device trees
|
||||||
if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then
|
if [ -f $BOOT_ROOT/extlinux/extlinux.conf ]; then
|
||||||
for dtbfile in $BOOT_ROOT/*.dtb ; do
|
for dtbfile in $BOOT_ROOT/*.dtb; do
|
||||||
dtb=$(basename $dtbfile)
|
dtb=$(basename $dtbfile)
|
||||||
echo "Updating $dtb"
|
echo "Updating $dtb"
|
||||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true
|
cp -p $SYSTEM_ROOT/usr/share/bootloader/$dtb $BOOT_ROOT/ 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mount $BOOT_ROOT ro
|
# mount $BOOT_ROOT ro
|
||||||
sync
|
sync
|
||||||
mount -o remount,ro $BOOT_ROOT
|
mount -o remount,ro $BOOT_ROOT
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
|
|
||||||
# XU4 has 5x sensors so read them all and report the highest value
|
# XU4 has 5x sensors so read them all and report the highest value
|
||||||
TEMP=$(cat /sys/devices/virtual/thermal/thermal_zone*/temp | sort -n | tail -1)
|
TEMP=$(cat /sys/devices/virtual/thermal/thermal_zone*/temp | sort -n | tail -1)
|
||||||
TEMP="$(( $TEMP / 1000 ))"
|
TEMP="$(($TEMP / 1000))"
|
||||||
echo "${TEMP} C"
|
echo "${TEMP} C"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user