matrix-io / matrixio-kernel-modules

MATRIX HAL in kernel space
22 stars 23 forks source link

matrixio-kernel-modules on rpi4 buster kernel 5.4.51+ #48

Closed ciro73 closed 4 years ago

ciro73 commented 4 years ago

Hi,

I try to install & build the matrix-kernel-modules on a rpi4 with buster running an 5.4.51+ kernel but it fails

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l GNU/Linux
apt install ``` pi@raspberrypi:~ $ sudo apt install matrixio-kernel-modules Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig matrixio-kernel-modules ist schon die neueste Version (0.2.3). 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. 1 nicht vollständig installiert oder entfernt. Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt. Möchten Sie fortfahren? [J/n] matrixio-kernel-modules (0.2.3) wird eingerichtet ... Removing old matrixio-kernel-modules-0.2.3 DKMS files... ------------------------------ Deleting module version: 0.2.3 completely from the DKMS tree. ------------------------------ Done. Loading new matrixio-kernel-modules-0.2.3 DKMS files... It is likely that 5.4.51-v7l+ belongs to a chroot's host Building for 5.4.51+, 5.4.51-v7+, 5.4.51-v7l+ and 5.4.51-v8+ Building initial module for 5.4.51+ Error! Bad return status for module build on kernel: 5.4.51+ (armv7l) Consult /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/make.log for more information. dpkg: Fehler beim Bearbeiten des Paketes matrixio-kernel-modules (--configure): »installiertes matrixio-kernel-modules-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 10 zurück Fehler traten auf beim Bearbeiten von: matrixio-kernel-modules E: Sub-process /usr/bin/dpkg returned an error code (1) ```
make.log ``` DKMS make.log for matrixio-kernel-modules-0.2.3 for kernel 5.4.51+ (armv7l) Fr 24. Jul 13:22:37 CEST 2020 make: Verzeichnis „/usr/src/linux-headers-5.4.51+“ wird betreten AR /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/built-in.a CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-core.o CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-uart.o CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-everloop.o CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.o /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:34:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’; did you mean ‘stream_name’? .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~~~~~~~~~ stream_name /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:34:20: error: initialization of ‘struct snd_soc_dai_link_component *’ from i ncompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types] .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:34:20: note: (near initialization for ‘matrixio_snd_soc_dai[0].cpus’) /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:35:3: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’; d id you mean ‘stream_name’? .cpu_dai_name = "matrixio-mic.0", ^~~~~~~~~~~~ stream_name /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:35:18: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion] .cpu_dai_name = "matrixio-mic.0", ^~~~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:35:18: note: (near initialization for ‘matrixio_snd_soc_dai[0].num_cpus’) /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:36:3: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’? .platform_name = "matrixio-mic", ^~~~~~~~~~~~~ platforms /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:36:19: error: initialization of ‘struct snd_soc_dai_link_component *’ from i ncompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types] .platform_name = "matrixio-mic", ^~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:36:19: note: (near initialization for ‘matrixio_snd_soc_dai[0].codecs’) /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:37:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’; did you mean ‘stream_name’? .codec_name = "snd-soc-dummy", ^~~~~~~~~~ stream_name /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:37:16: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion] .codec_name = "snd-soc-dummy", ^~~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:37:16: note: (near initialization for ‘matrixio_snd_soc_dai[0].num_codecs’) /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:42:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’; did you mean ‘stream_name’? .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~~~~~~~~~ stream_name /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:42:20: error: initialization of ‘struct snd_soc_dai_link_component *’ from i ncompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types] .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:42:20: note: (near initialization for ‘matrixio_snd_soc_dai[1].cpus’) /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:43:3: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’; d id you mean ‘stream_name’? .cpu_dai_name = "matrixio-pcm-out.0", ^~~~~~~~~~~~ stream_name /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:43:18: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion] .cpu_dai_name = "matrixio-pcm-out.0", ^~~~~~~~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:43:18: note: (near initialization for ‘matrixio_snd_soc_dai[1].num_cpus’) /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:44:3: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’? .platform_name = "matrixio-playback", ^~~~~~~~~~~~~ platforms /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:44:19: error: initialization of ‘struct snd_soc_dai_link_component *’ from i ncompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types] .platform_name = "matrixio-playback", ^~~~~~~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:44:19: note: (near initialization for ‘matrixio_snd_soc_dai[1].codecs’) /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:45:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’; did you mean ‘stream_name’? .codec_name = "snd-soc-dummy", ^~~~~~~~~~ stream_name /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:45:16: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion] .codec_name = "snd-soc-dummy", ^~~~~~~~~~~~~~~ /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:45:16: note: (near initialization for ‘matrixio_snd_soc_dai[1].num_codecs’) cc1: some warnings being treated as errors make[1]: *** [scripts/Makefile.build:266: /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.o] Fehler 1 make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet.... make: *** [Makefile:1709: /var/lib/dkms/matrixio-kernel-modules/0.2.3/build] Fehler 2 make: Verzeichnis „/usr/src/linux-headers-5.4.51+“ wird verlassen ```

Not sure if I'm missing something.

Cheers ciro73

RastonWarrior commented 4 years ago

I'm having the exact same issue and I'm surprised the only response so far is a "thumbs up".

Same kernel version, full and new bare-metal reinstall with latest image on an RPi 4. Have to run all programs as root in order to access the HAL so I've been logged in as root for everything. All sensors and LED array work just fine, but I have to compile the kernel modules in order to use the mic array and get beamforming put together.

Option 1 results in a stuck apt package that I can't clear and won't complete. Reflash to the latest RPiOS Buster build from: https://www.raspberrypi.org/downloads/raspberry-pi-os/

Option 2 works until I get to make & make install and it starts vomiting at matrixio-codec.o .

All other installation options and steps followed to the letter, the MCreator works fine up to this point.

----- raw output follows root@voicebox:~/scripts/matrix/matrixio-kernel-modules/src# make && make install dtc -W no-unit_address_vs_reg -@ -I dts -O dtb -o matrixio.dtbo matrixio.dts make -C /lib/modules/5.4.51-v7l+/build M=/root/scripts/matrix/matrixio-kernel-modules/src modules make[1]: Entering directory '/usr/src/linux-headers-5.4.51-v7l+' CC [M] /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-core.o CC [M] /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-uart.o CC [M] /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-everloop.o CC [M] /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.o /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:34:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’; did you mean ‘stream_name’? .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~ stream_name /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:34:20: error: initialization of ‘struct snd_soc_dai_link_component ’ from incompatible pointer type ‘char ’ [-Werror=incompatible-pointer-types] .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:34:20: note: (near initialization for matrixio_snd_soc_dai[0].cpus’) /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:35:3: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’; did you mean ‘stream_name’? .cpu_dai_name = "matrixio-mic.0", ^~~~ stream_name /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:35:18: warning: initialization of ‘unsigned int’ from ‘char ’ makes integer from pointer without a cast [-Wint-conversion] .cpu_dai_name = "matrixio-mic.0", ^~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:35:18: note: (near initialization for matrixio_snd_soc_dai[0].num_cpus’) /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:36:3: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’? .platform_name = "matrixio-mic", ^~~~~ platforms /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:36:19: error: initialization of ‘struct snd_soc_dai_link_component ’ from incompatible pointer type ‘char ’ [-Werror=incompatible-pointer-types] .platform_name = "matrixio-mic", ^~~~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:36:19: note: (near initialization for matrixio_snd_soc_dai[0].codecs’) /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:37:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’; did you mean ‘stream_name’? .codec_name = "snd-soc-dummy", ^~~~~~ stream_name /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:37:16: warning: initialization of ‘unsigned int’ from ‘char ’ makes integer from pointer without a cast [-Wint-conversion] .codec_name = "snd-soc-dummy", ^~~~~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:37:16: note: (near initialization for matrixio_snd_soc_dai[0].num_codecs’) /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:42:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’; did you mean ‘stream_name’? .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~ stream_name /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:42:20: error: initialization of ‘struct snd_soc_dai_link_component ’ from incompatible pointer type ‘char ’ [-Werror=incompatible-pointer-types] .codec_dai_name = "snd-soc-dummy-dai", ^~~~~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:42:20: note: (near initialization for matrixio_snd_soc_dai[1].cpus’) /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:43:3: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’; did you mean ‘stream_name’? .cpu_dai_name = "matrixio-pcm-out.0", ^~~~ stream_name /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:43:18: warning: initialization of ‘unsigned int’ from ‘char ’ makes integer from pointer without a cast [-Wint-conversion] .cpu_dai_name = "matrixio-pcm-out.0", ^~~~~~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:43:18: note: (near initialization for matrixio_snd_soc_dai[1].num_cpus’) /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:44:3: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’? .platform_name = "matrixio-playback", ^~~~~ platforms /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:44:19: error: initialization of ‘struct snd_soc_dai_link_component ’ from incompatible pointer type ‘char ’ [-Werror=incompatible-pointer-types] .platform_name = "matrixio-playback", ^~~~~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:44:19: note: (near initialization for matrixio_snd_soc_dai[1].codecs’) /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:45:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’; did you mean ‘stream_name’? .codec_name = "snd-soc-dummy", ^~~~~~ stream_name /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:45:16: warning: initialization of ‘unsigned int’ from ‘char ’ makes integer from pointer without a cast [-Wint-conversion] .codec_name = "snd-soc-dummy", ^~~~~~~ /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.c:45:16: note: (near initialization for matrixio_snd_soc_dai[1].num_codecs’) cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:266: /root/scripts/matrix/matrixio-kernel-modules/src/matrixio-codec.o] Error 1 make[1]: [Makefile:1709: /root/scripts/matrix/matrixio-kernel-modules/src] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.4.51-v7l+' make: *** [Makefile:5: all] Error 2 root@voicebox:~/scripts/matrix/matrixio-kernel-modules/src# uname -a Linux voicebox 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l GNU/Linux

samreenislam commented 4 years ago

Hi @ciro73 and @RastonWarrior,

Our engineers are working to update the MATRIX kernel modules to be compatible with the latest Linux kernel 5.4 and expect to have a solution soon. I will keep you updated on that.

In the meantime, I would recommend downgrading to Linux kernel 4.19. I will test and confirm this shortly. Thanks!

Best, Samreen

RastonWarrior commented 4 years ago

Oh thank you SO, so much! :D This will get me on my feet and moving forward until then :)

On July 30, 2020 2:30:42 PM MDT, Samreen notifications@github.com wrote:

Hi @ciro73 and @RastonWarrior,

Our engineers are working to update the MATRIX kernel modules to be compatible with the latest Linux kernel 5.4 and expect to have a solution soon. I will keep you updated on that.

In the meantime, I would recommend downgrading to Linux kernel 4.19. I will test and confirm this shortly. Thanks!

Best, Samreen

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/matrix-io/matrixio-kernel-modules/issues/48#issuecomment-666676188

RastonWarrior commented 4 years ago

I'm working on this and am coming up with unusual results. Looking at raspbian-2020-02-07 (https://downloads.raspberrypi.org/raspbian/images/raspbian-2020-02-07/) the .info file shows:

Firmware: https://github.com/raspberrypi/firmware/tree/149cd7f0487e08e148efe604f8d4d359541cecf4

Kernel: https://github.com/raspberrypi/linux/tree/f16e91dad2af9d57aef477cc1f522040353849f5

Uname string: Linux version 4.19.97-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1294 SMP Thu Jan 30 13:15:58 GMT 2020

I install the HAL, then go through these instructions (package installation):

https://github.com/matrix-io/matrixio-kernel-modules

This is what I get:

-- Setting up dkms (2.6.1-4) ... Setting up raspberrypi-kernel-headers (1.20200723-1) ... run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51+ run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7+ run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7l+ run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v8+ Setting up matrixio-kernel-modules (0.2.3) ... Loading new matrixio-kernel-modules-0.2.3 DKMS files... It is likely that 4.19.97-v7l+ belongs to a chroot's host Building for 4.19.97+, 4.19.97-v7+, 4.19.97-v7l+, 4.19.97-v8+, 5.4.51+, 5.4.51-v7+ and 5.4.51-v7l+ Module build for kernel 4.19.97+ was skipped since the kernel headers for this kernel does not seem to be installed. Module build for kernel 4.19.97-v7+ was skipped since the kernel headers for this kernel does not seem to be installed. Module build for kernel 4.19.97-v7l+ was skipped since the kernel headers for this kernel does not seem to be installed. Module build for kernel 4.19.97-v8+ was skipped since the kernel headers for this kernel does not seem to be installed. Building initial module for 5.4.51+ Error! Bad return status for module build on kernel: 5.4.51+ (armv7l) Consult /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/make.log for more information. dpkg: error processing package matrixio-kernel-modules (--configure): installed matrixio-kernel-modules package post-installation script subprocess returned error exit status 10 Processing triggers for man-db (2.8.5-2) ... Errors were encountered while processing: matrixio-kernel-modules E: Sub-process /usr/bin/dpkg returned an error code (1)

root@raspberrypi:~# uname -r 4.19.97-v7l+

root@raspberrypi:~# cat /etc/issue Raspbian GNU/Linux 10 \n \l

So while this kernel confirms it's 4.19, the package is forcing 5.4.51 . The same thing happens if I build from source.

Is there a very specific URL and image version that we should use, or a different and matching source library?

R

On 7/30/20 2:30 PM, Samreen wrote:

Hi @ciro73 and @RastonWarrior,

Our engineers are working to update the MATRIX kernel modules to be compatible with the latest Linux kernel 5.4 and expect to have a solution soon. I will keep you updated on that.

In the meantime, I would recommend downgrading to Linux kernel 4.19. I will test and confirm this shortly. Thanks!

Best, Samreen

RastonWarrior commented 4 years ago

Thank you for the reply Samreen - do still need to know though, what exact RPi image do you use that works? My development progress is stuck without use of the microphone array.

On 7/30/20 2:30 PM, Samreen wrote:

Hi @ciro73 and @RastonWarrior,

Our engineers are working to update the MATRIX kernel modules to be compatible with the latest Linux kernel 5.4 and expect to have a solution soon. I will keep you updated on that.

In the meantime, I would recommend downgrading to Linux kernel 4.19. I will test and confirm this shortly. Thanks!

Best, Samreen

eljuguetero commented 4 years ago

Hi @RastonWarrior and @ciro73,

Some things changed in kernel 4.5.x. We have already made the necessary fixes.

BR

RastonWarrior commented 4 years ago

THANK YOU for your work! I'm running 5.4.51-v7l+ and the apt-install method worked perfectly, allowing me to proceed with the matrix-lite recording tests using Python, and there onwards.

This hardware is exciting and powerful, I'm glad to integrate it into my project and, hopefully, expand this project for a much larger consumer base. If this goes over, you'll be selling a lot more of the Matrix boards!