diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:49:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:49:14 +0000 |
commit | 3c2d31adff62d355d29246bdbe3c43bc25b9008b (patch) | |
tree | cf28adc8f4ab5f7eec9f5e13dfd65b099acbb709 /hooks/thermal | |
parent | Initial commit. (diff) | |
download | initramfs-tools-3c2d31adff62d355d29246bdbe3c43bc25b9008b.tar.xz initramfs-tools-3c2d31adff62d355d29246bdbe3c43bc25b9008b.zip |
Adding upstream version 0.133+deb10u1.upstream/0.133+deb10u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'hooks/thermal')
-rwxr-xr-x | hooks/thermal | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/hooks/thermal b/hooks/thermal new file mode 100755 index 0000000..5807386 --- /dev/null +++ b/hooks/thermal @@ -0,0 +1,68 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hooks for loading thermal bits into the initramfs + +. /usr/share/initramfs-tools/hook-functions + +case "$DPKG_ARCH" in +# copy the right modules +powerpc|ppc64) + + # Only G5 Mac machines need to load + # therm_pm72 or one of the windfarm_pm* modules. + + [ -r /proc/cpuinfo ] || exit 0 + + MODEL="$(grep model /proc/cpuinfo)" + MODEL="${MODEL##*: }" + + case "$MODEL" in + RackMac3,1|PowerMac7,2|PowerMac7,3) + force_load therm_pm72 + ;; + PowerMac8,1|PowerMac8,2) + force_load windfarm_pm81 + ;; + PowerMac9,1) + force_load windfarm_pm91 + ;; + PowerMac11,2) + force_load windfarm_pm112 + ;; + PowerMac12,1) + force_load windfarm_pm121 + ;; + *) + # No other machine needs windfarm_* modules on initrd. + exit 0 + ;; + esac + manual_add_modules windfarm_core + manual_add_modules windfarm_cpufreq_clamp + manual_add_modules windfarm_lm75_sensor + manual_add_modules windfarm_max6690_sensor + manual_add_modules windfarm_pid + manual_add_modules windfarm_smu_controls + manual_add_modules windfarm_smu_sat + manual_add_modules windfarm_smu_sensors + ;; +i386|amd64|ia64) + manual_add_modules fan + manual_add_modules thermal + ;; +esac |