Linux-5.4.74/drivers/thermal/thermal_sys.ko' is missing

Looks like some dependency of ath10k thermal monitoring triggers this.

SHELL= flock /home/astroc/openwrt/tmp/.root-copy.flock -c 'cp -fpR /home/astroc/openwrt/build_dir/target-x86_64_musl/linux-firmware-20201022/.pkgdir/ath10k-firmware-qca988x/. /home/astroc/openwrt/staging_dir/target-x86_64_musl/root-x86/'
touch /home/astroc/openwrt/staging_dir/target-x86_64_musl/root-x86/stamp/.ath10k-firmware-qca988x_installed
echo "ath10k-firmware-qca988x" >> /home/astroc/openwrt/staging_dir/target-x86_64_musl/pkginfo/linux-firmware.default.install
make[3]: Leaving directory '/home/astroc/openwrt/package/firmware/linux-firmware'
time: package/firmware/linux-firmware/compile#0.14#0.03#0.16
make[3]: Entering directory '/home/astroc/openwrt/package/firmware/prism54-firmware'
make[3]: Nothing to be done for 'compile'.
make[3]: Leaving directory '/home/astroc/openwrt/package/firmware/prism54-firmware'
time: package/firmware/prism54-firmware/compile#0.23#0.01#0.24
make[3]: Entering directory '/home/astroc/openwrt/package/kernel/linux'
mkdir -p /home/astroc/openwrt/staging_dir/target-x86_64_musl/root-x86/stamp

SHELL= flock /home/astroc/openwrt/tmp/.root-copy.flock -c 'cp -fpR /home/astroc/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.pkgdir/kernel/. /home/astroc/openwrt/staging_dir/target-x86_64_musl/root-x86/'
touch /home/astroc/openwrt/staging_dir/target-x86_64_musl/root-x86/stamp/.kernel_installed
ERROR: module '/home/astroc/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.74/drivers/thermal/thermal_sys.ko' is missing.
make[3]: *** [modules/other.mk:1068: /home/astroc/openwrt/bin/targets/x86/64/packages/kmod-thermal_5.4.74-1_x86_64.ipk] Error 1
make[3]: Leaving directory '/home/astroc/openwrt/package/kernel/linux'
time: package/kernel/linux/compile#0.91#0.03#0.94
make[2]: *** [package/Makefile:114: package/kernel/linux/compile] Error 2
make[2]: Leaving directory '/home/astroc/openwrt'
make[1]: *** [package/Makefile:108: /home/astroc/openwrt/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/astroc/openwrt'
make: *** [/home/astroc/openwrt/include/toplevel.mk:236: world] Error 2

Did you build with Kernel modules>Wireless Drivers>mod-ath10k>Enable thermal sensors and throttling support enabled? In the past, when I have, the build ended in errors. I stopped trying. Not sure if that is your problem.

Yes that is precisely what causes the error.

Got the same ERROR:

ERROR: module '/home/OpenWRT/openWRT-buildsystem/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.74/drivers/thermal/thermal_sys.ko' is missing.
make[3]: *** [modules/other.mk:1068: /home/OpenWRT/openWRT-buildsystem/openwrt/bin/targets/x86/64/packages/kmod-thermal_5.4.74-1_x86_64.ipk] Error 1
make[3]: Leaving directory '/home/OpenWRT/openWRT-buildsystem/openwrt/package/kernel/linux'

For me the fix from this post worked:

specially that did the trick:

cd /home/OpenWRT/openWRT-buildsystem/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.74/drivers/thermal/
cp thermal_core.c thermal_sys.ko

Maybe this "fix" could be implemented in the master code?

1 Like

I wanted to post this just wasn’t near my laptop and I forgot about my github issue :slight_smile:

Yeah that thinkering still worked ever since I figured it out.

OP:
Also, I used this in a docker container, so your /home/OpenWRT will be different in the end( unless you build a docker debian OpenWRT builder), but the other parts should be the same.

I haven't looked but has anyone opened this in the openwrt bug tracker as suggested by @neheb on the github issue?

Its simple, thermal core was switched to a boolean type upstream and you can build it as a module anymore.
It can be built in or not selected.

OpenWrt module for thermal-core was never updated and It honestly cant be properly fixed as it does not exist as a kernel module anymore.

You can enable the thermal core in kernel config and it should build