Octopi - Kernel Headers

Linux octopi 5.4.77-v7+ #1371 SMP Tue Nov 17 13:32:02 GMT 2020 armv7l GNU/Linux

I'm trying to build a kernel module on the above version of octopi and need specifically named headers for the module to build. It's looking for linux-headers-5.4.77-v7+ but APT doesn't contain any such headers. Basically the module wants the header name to be the exact same as uname -r.

Any ideas as to how a person could find these?

This is what I'm trying to build and the error I see:

Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/pi/v4l2loopback modules
make[1]: *** /lib/modules/5.4.77-v7+/build: No such file or directory.  Stop.
make: *** [Makefile:44: v4l2loopback.ko] Error 2

Thanks for any information.

that's interesting, my octopi 0.18rc1 is on 5.4.51-v7+, did you dist-upgrade or something?


If you run sudo apt-cache search linux-headers do you have linux-headers-5.4.51-v7+ in the list?

linux-headers-4.18.0-3-common - Common header files for Linux 4.18.0-3
linux-headers-4.18.0-3-common-rt - Common header files for Linux 4.18.0-3-rt
linux-headers-4.9.0-6-all - All header files for Linux 4.9 (meta-package)
linux-headers-4.9.0-6-all-armhf - All header files for Linux 4.9 (meta-package)
linux-headers-4.9.0-6-common - Common header files for Linux 4.9.0-6
linux-headers-4.9.0-6-common-rt - Common header files for Linux 4.9.0-6-rt
linux-headers-4.9.0-6-rpi - Header files for Linux 4.9.0-6-rpi
linux-headers-4.9.0-6-rpi2 - Header files for Linux 4.9.0-6-rpi2
linux-headers-rpi - Header files for Linux rpi configuration (meta-package)
linux-headers-rpi-rpfv - This metapackage will pull in the headers for the raspbian kernel for the
linux-headers-rpi2 - Header files for Linux rpi2 configuration (meta-package)
linux-headers-rpi2-rpfv - This metapackage will pull in the headers for the raspbian kernel for the

That's the same kinda results I'm getting as well, nothing that looks like linux-headers-$(uname -r)

@PrintedWeezl or @guysoft would probably have a better idea. I'm more curious as to why your compiling a loopback video device.

I have a few old Android cellphones and was going to try to use them as webcams for OctoPrint.

why not just use the "IP webcam" software?

https://play.google.com/store/apps/details?id=com.pas.webcam is the software I was referring.

Oh man... that sounds easier! I will give that a try first, thanks for pointing me in that direction. Funny that didn't come up when I was searching for ideas.

1 Like

Thanks for the help, I appreciate it! Messing around with it now.

The kernel is the same one of Rpi OS which is built from the sources here: https://github.com/raspberrypi/linux