Hello,
I would like to enable watchdog services on my Intel NUC.
Start Watchdog Services
RUN modprobe i2c-i801
RUN modprobe i2c-smbus
RUN modprobe iTCO-wdt
When trying to activate I get this:
[main] Step 23/26 : RUN modprobe i2c-i801
[main] —> Running in bbb2103a4165
[main] modprobe: ERROR: …/libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file ‘/lib/modules/4.14.11-coreos/modules.dep.bin’
[main] modprobe: FATAL: Module i2c-i801 not found in directory /lib/modules/4.14.11-coreos
[main]
[main] Removing intermediate container bbb2103a4165
[main] The command ‘/bin/sh -c modprobe i2c-i801’ returned a non-zero code: 1
What can I do? Do I have to build kernel modules and how do I obtain these? On Ubuntu 16.04 LTS non-resin/balea it works. Thanks
Hi @rquant, It looks like you are running your modprobes in the RUN commands, which are executed in a non-privileged container on our build servers. To properly check that the modprobe is working, you would need to run the modprobe from a script or from your CMD so that it runs on the device rather than on the cloud build server. Another way to test this is to use the webterminal into your running container and then run modprobe i2c-i801 etc from the webterminal to check that they are available.
Test executed on the standard image from balen.io shell main:
root@5435ab0:/usr/src/app# modprobe i2c-i801
root@5435ab0:/usr/src/app# modprobe i2c-smbus
root@5435ab0:/usr/src/app# modprobe iTCO-wdt
modprobe: FATAL: Module iTCO-wdt not found in directory/lib/modules/4.12.12-yocto-standard
Tried to build with the balena kernel sample:
I created a folder called iTCO-wdt and placed the iTCO-wdt.c,``iTCO_vendor.h, iTCO_vendor_support.c file inside there with the Makefile:
KERNEL_TREE_PATH?=/lib/modules/$(shell uname -r)/build
EXTRA_CFLAGS="-DDEBUG"
obj-m+=iTCO_wdt.o
all: iTCO_wdt.ko
iTCO_wdt.ko: iTCO_wdt.c
make -C $(KERNEL_TREE_PATH) M=$(PWD) modules
clean:
make -C $(KERNEL_TREE_PATH) M=$(PWD) clean
.PHONY: all clean
and calling
RUN ./build.sh %%RESIN_MACHINE_NAME%% ‘2.13.6+rev2.dev’ iTCO-wdt
I looked at kernel module headers in detail last week and found a few bugs. I’ve merged a PR with fixes that will reach future versions of balenaOS in due course. [1]
For past versions, there are workarounds.
Please correct me if I’m wrong, you are using balenaOS v2.13.6 on an Intel NUC? each version/device requires a different workaround
For that version on that device, the tools inside the header tarball such as fixdep have the following dynamic interpreter path /lib/ld-linux-x86-64.so.2 which is the balenaOS baselib path. However, the intel-nuc-debian image uses /lib64/ld-linux-x86-64.so.2 as the baselib path. The issue manifests as fixdep file not found. We need a symlink from /lib64/ld-linux-x86-64.so.2 to /lib/ld-linux-x86-64.so.2. This lets the tools find the right library and continue working.
Thank you very much for the answer.
I will try using symlinking.
I am using balenaOS 2.26.0+rev1 with ubuntu 16.04 on Intel NUC.
Is the command the same as you mentioned?