mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
cpufreqscaling: more rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
d0df5a9502
commit
da37d00e4e
@ -17,7 +17,7 @@ error=0
|
||||
# Load the correct cpufreq module
|
||||
if [ "${1}" = "ondemand" ] || [ "${1}" = "conservative" ]; then
|
||||
if [ -f "/usr/lib/modules/cpufreq_${1}.ko" ]; then
|
||||
insmod /usr/lib/modules/cpufreq_${1}.ko
|
||||
insmod /usr/lib/modules/cpufreq_${1}.ko || true
|
||||
echo "CPUFreqScaling: cpufreq_${1} loaded"
|
||||
else
|
||||
echo "CPUFreqScaling: cpufreq_${1} not found"
|
||||
|
@ -11,18 +11,16 @@ if [ "${1}" = "late" ]; then
|
||||
mkdir -p "/tmpRoot/usr/arc/addons/"
|
||||
cp -vf "${0}" "/tmpRoot/usr/arc/addons/"
|
||||
|
||||
cp -vf /usr/sbin/scaling.sh /tmpRoot/usr/sbin/scaling.sh
|
||||
cp -vf "/usr/sbin/scaling.sh" "/tmpRoot/usr/sbin/scaling.sh"
|
||||
[ ! -f "/tmpRoot/usr/bin/echo" ] && cp -vf /usr/bin/echo /tmpRoot/usr/bin/echo || true
|
||||
cp -f /usr/lib/modules/acpi_cpufreq.ko /tmpRoot/usr/lib/modules/acpi_cpufreq.ko
|
||||
[ "${2}" != "schedutil" ] && cp -vf /usr/lib/modules/cpufreq_${2}.ko /tmpRoot/usr/lib/modules/cpufreq_${2}.ko && modprobe cpufreq_${2} || true
|
||||
cp -f "/usr/lib/modules/acpi_cpufreq.ko" "/tmpRoot/usr/lib/modules/acpi_cpufreq.ko"
|
||||
[ "${2}" != "schedutil" ] && cp -vf "/usr/lib/modules/cpufreq_${2}.ko" "/tmpRoot/usr/lib/modules/cpufreq_${2}.ko"
|
||||
|
||||
mkdir -p "/tmpRoot/usr/lib/systemd/system"
|
||||
DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service"
|
||||
cat <<EOF >${DEST}
|
||||
[Unit]
|
||||
Description=Enable CPU Freq scaling
|
||||
DefaultDependencies=no
|
||||
IgnoreOnIsolate=true
|
||||
After=multi-user.target
|
||||
After=udevrules.service
|
||||
|
||||
[Service]
|
||||
|
Loading…
Reference in New Issue
Block a user