-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i2smic.py script FAILS with latest Linux Kernel 6.1.21-v8+ #247
Comments
Looking into the issue, I found that script didn´t work due it was not able to found the right directory /lib/modules/6.1.21-v8+/build In a fresh install, following the guide mentioned previously, after updating the raspberry with update/upgrade, you can can check that version bumped to 6.1.21-v8+ (from original RPi OS Lite 32-bit -> 5.15.84-v7l+). I could check that once script installs raspberrypi-kernel-headers, it installs headers in lib/modules/:
But 6.1.21-v8+/ does not contains /build folder whereas the rest do. I tried to modify the Makefile MDIR & KDIR pointing to an existing headers files (e.g 6.1.21-v7+/)
But script failed with the following log:
@makermelissa @caternuson could you please review and check? The script seems to have conflicts with the latest released kernel versions. I have tried looking for alternative methods to get the hardware working, but they all refer to the same sources and script published by Adafruit. I would therefore be grateful if it can be fixed as soon as possible :-) Thanks in advance. |
This sounds similar to what I encountered in #242. What's happening is Raspberry Pi is upgrading the kernel to 64-bit, but leaving the user space at 32-bit. Then when it tries to install the kernel headers, it only installs the 32-bit ones and not the 64-bit. This was by design (on Raspberry Pi's part) and a huge change that was different than anything Raspberry Pi had done before, so the guide is likely describing something that we weren't expecting. With regards to the display driver, the answer ended up being to not worry about compiling it and just use a built-in one. I wonder if something similar can be done here. For the time being, you may want to try installing the 64-bit version of Raspberry Pi. |
There doesn't appear to be a simple solution like with the display driver. If you do find it works on 64-bit, I can modify the script to check if it is 32-bit user space and a 64-bit kernel and make some suggestions to the user:
This would be more of a temporary fix until Raspberry Pi can figure out a better solution (see raspberrypi/firmware#1795). Additionally, it would be nice to see if it compiles in 32-bit. On the Pi 4B, it should be the |
Hi @makermelissa, First of all, thank you so much for your quick review and response :-) ! Thanks for sharing this further info that let me understand better what's happening... Regarding installing the 64-bit version of RPi OS, I can't as I'm using a software that needs to be run on RPi OS 32-bit. |
Thanks for your feedback. For the time being, I've been able to compile the module in a fresh RPi OS 32bit install following the below steps:
I tried it as well yesterday (with UPDATE ❗ : After setting it to 32-bit by adding
I'll let you know any feedback If I try to compile it with a RPi OS 64bit. Meanwhile, I agree with you to apply the temporary fix you mentioned previously to let other users skip the error or my workaround might help you indeed. |
@makermelissa FYI
I've just tried to install a fresh RPi OS 64bit image to test. After issuing the sudo apt-get update/upgrade commands,
If you list the /lib/modules installed, there's only 6.1.21-v8+/ listed and this are the contents: I manually installed the headers with Then I run the script and it compiled and installed the module successfully.
|
Thank you SO much for testing this out. It helps immensely. |
If you manually download the version-matching arm64 kernel header package from |
If you're running a Raspberry Pi OS 64bit, YES it should work. I tested it yesterday on a fresh install, and after installing the headers, the script run without issues. Please note I installed manually the raspberrypi-kernel-headers manually, but script should do the work for you as well. Please let us know any feedback. |
First of all, thanks for the links. I wasn't sure where those were kept.
I'm guessing @HinTak is referring to the case when the 32-bit OS is in place with the 64-bit kernel upgrade (without the If you'd like to test, that would be awesome. If not, I'll get to it soon. I agree the script should do the work. We're mostly figuring out what we want the script to do differently at this point. ;) |
I've just tried and it does not work. I got the following error:
Please review and check below log:
Please let me know if I can help you with any other test. |
Thanks for checking. It appears the 32-bit user space with a 64-bit kernel is a bit of a no man's land in regards to compiling at the moment. |
Yes, I think the raspberrypi people confirmed it : raspberrypi/linux#5408 - anything that requires out-of-tree drivers (and therefore matching kernel headers) does not currently work on the "64-bit kernel with 32-bit userspace" systems. Options are basically pure 64-bit or pure 32-bit (small addition in /boot/config.txt), at the moment. |
Hi to everyone! I've read all your comments and it sounds me really tricky.
|
I'm having the same problem as @KePere on Raspberry Pi 3B. I see:
|
Fwiw, those two are not the same problems - one is against 6.1 headers, the other against 6.6 headers. Kernel sources have evolved / changed between those. Anyway, I'll unsubscribe now, since I don't want to hear from random people commenting "same problem" on "definitely not same problem" anymore. |
@cjvanlissa I forked and fixed the problem: virtualmatador/snd-i2smic-rpi@e17a66b |
Script Command
Explanation
Running the i2smic.py script fails to build and install the module if you're running the latest Linux Kernel 6.1.21-v8+
Script fails when tries to do the make command.
I've followed these Guide steps on new fresh SD Raspberry Pi OS Lite 32-bit install.
Operating System
32-bit Raspberry Pi Os Lite with Bullseye
Hardware
RaspberryPi 4B
Behavior
Cloning into 'Raspberry-Pi-Installer-Scripts'...
make -C /lib/modules/6.1.21-v8+/build M=/home/ansible/Raspberry-Pi-Installer-Scripts/i2s_mic_module clean
make[1]: *** /lib/modules/6.1.21-v8+/build: No such file or directory. Stop.
make: *** [Makefile:38: clean] Error 2
make -C /lib/modules/6.1.21-v8+/build M=/home/ansible/Raspberry-Pi-Installer-Scripts/i2s_mic_module modules
make[1]: *** /lib/modules/6.1.21-v8+/build: No such file or directory. Stop.
make: *** [Makefile:35: all] Error 2
make: *** No rule to make target 'snd-i2smic-rpi.ko', needed by 'install'. Stop.
DONE.
Settings take effect on next boot.
REBOOT NOW? [Y/n]
Description
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: