sfera-labs/iono-pi-max-kernel-module

iono pi module fails to build

Closed this issue · 8 comments

The module fails to build:

cd iono-pi-max-kernel-module
pi@pimax:~/iono-pi-max-kernel-module $ make
make -C /lib/modules/6.1.32-v7+/build/ M=/home/pi/iono-pi-max-kernel-module modules
make[1]: *** /lib/modules/6.1.32-v7+/build/: No such file or directory.  Stop.
make: *** [Makefile:10: all] Error 2

pi@pimax:~/iono-pi-max-kernel-module $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

pi@pimax:~/iono-pi-max-kernel-module $ uname -a
Linux pimax 6.1.32-v7+ #1656 SMP Wed Jun  7 11:31:19 BST 2023 armv7l GNU/Linux

Hello,
This happens when the kernel headers are not installed or the installed version does not match the running kernel.
Make sure you run the below commands before installing the kernel module:

sudo apt update
sudo apt upgrade
sudo reboot
sudo apt install git raspberrypi-kernel-headers

If it still fails, I'd suggest starting from a fresh RPi OS installation.
Alternatively, you can install and use rpi-source: https://github.com/RPi-Distro/rpi-source

done exactly as above and it still fails.

This happened after I upgraded the pi using rpi-update that upgraded the eeprom and installed kernel 6.1.32

Did you try my two suggestions above?

Yes I did. I am not sure why you closed the issue before any further investigation and without waiting for feedback over the outcome. You have done it twice. It is professionally and ethically incorrect.
Besides, having the opportunity to discuss and work on issues can only improve your product.

Please consider this a formal complaint.

Closing an issue does not block the conversation.
We use issues to track work that needs to be done on a repo, and here there is nothing concerning this specific repo as it is related to kernel headers installation.
So we close it and continue with the support. I hope this is not an issue for you.

Going back to the point: did you solve the problem starting from a fresh RPi OS installation?

OK, thank you.
Given my reports, perhaps some tweaks to the code will be required. I would not exclude it just yet.

  1. buster: buster is on kernel 5 by default. The issue I reported appeared after I upgraded the rpi firmware using rpi-update. This activated kernel 6.1. As a consequence, the kernel modules for iono were no longer available (new kernel). On attempting to rebuild the modules I get the error as reported above. A fresh install of buster (that takes me back to kernel 5), solves the issue. However from buster I now know that I cannot update the kernel. I would encourage you to try these steps: a) fresh raspbian buster, b) run an update then c) rpi-upgrade. d) iono module requires to be rebuilt and re-installed, but it fails.

I tried buster first, because I have a whole home automation running on a iono pi which is running buster. I would like to upgrade it to a iono pi max with minimal effort. But the RPI B inside the iono pi was upgraded and runs kernel 6.1

  1. bullseye: bullseye comes with kernel 6.1, iono kernel module build is successful, it looks OK, switches work (I haven't tried sensors yet because there is no iono utility like for the iono pi). However when turning on sd1, at its first access the whole system freezes. On a power cycle it then fails to reboot because the A sd card gets corrupted (I am using iono max headless without serial as I do not have an adapter). So I have to take the OS (A) sd card into another system and fsck everything before I can re-insert it and boot again.

one more question: do you have sample code to read 1 wire / wiegand DHT and DS18B20 sensors with a iono pi max?

On buster, after running rpi-upgrade which brings the kernel to 6.1, an apt upgrade or an installation of the headers after the the rpi-upgrade should bring the kernel headers to 6.1 too.
If this does not happen then rpi-source could be used.
I'd recommend just using bullseye.

About the SD, please follow by email as per issue #2.

For Wiegand:
https://github.com/sfera-labs/iono-pi-max-kernel-module#wiegand---sysclassionopimaxwiegand

For 1-Wire:
You can use the w1-gpio dtoverlay (https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README#L4635)
setting the gpiopin parameter to the GPIO corresponding to the used DTn pin.
Then read under /sys/bus/w1/devices/