Raspberry Pi CM4 dynamic overlay problem with missing configfs

Hello,

I'm trying to dynamically load a i2c dtoverlay, but I get an error:

root@OpenWrt:~# dtoverlay -l
mount: mounting none on /config/device-tree failed: No such file or directory
* Failed to mount configfs - 2

If I define it in the /boot/config.txt directory, it works. But not dynamically.
Any people encountered this with a raspberry CM4, on openwrt 24.10?

Do you have configfs module loaded?

What do you mean by this?

I meant kmod-fs-configfs. I don't think it comes installed as a default.

I didn't have it, but after installing it, the same problem persists

Did you restart? Does it show up in lsmod | grep configfs and in mount | grep configfs? Is /sys/kernel/config non-empty?

I did restart it. As you can see it is installed. But everything is empty

Can you mount it manually mount -t configfs configfs /sys/kernel/config?

If that works, you can either add it to fstab or make a small procd init script something like (not tested):

#!/bin/sh /etc/rc.common

START=19

start() {
	if ! mount | grep -q 'configfs on /sys/kernel/config'; then
		mount -t configfs configfs /sys/kernel/config
	fi
}

Don't forget to enable it first.

thanks, this did work.
I wonder why it doesn't mount by default

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.