LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 08-13-2019, 10:13 PM   #1
elyk
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 208

Rep: Reputation: 33
Installing out-of-tree kernel modules with SARPi


I'm trying to install the v4l2loopback kernel module. Quick instructions are to clone that repo, then run `make` and `make install`. This should install /lib/modules/$(uname -r)/extra/v4l2loopback.ko.

Somewhere in the build process it's using the files in /usr/src/linux from the kernel-source package. I currently have version 4.19.65 of both kernel-source and kernel_sarpi3, so it seems like everything should work together just fine. But it doesn't. kernel-source has some files that were generated as part of building kernel_armv7 and those are being used during this kernel module's build process. The file is placed in /lib/modules/4.19.65-armv7 instead of /lib/modules/4.19.65-v7-arm. Trying to insmod it gives an error that it's an "invalid module format".

I think if I had a sarpi kernel-source package (with all the generated files from building the sarpi kernel), then everything would work fine.

What is different about the sarpi kernel vs. the one in Slackware ARM? Is there a way to replace the generated files in the kernel-source package with ones specific to the sarpi kernel?
 
Old 08-14-2019, 03:02 AM   #2
Exaga
Member
 
Registered: Nov 2012
Posts: 176

Rep: Reputation: 88
Quote:
Originally Posted by elyk View Post
I'm trying to install the v4l2loopback kernel module. Quick instructions are to clone that repo, then run `make` and `make install`. This should install /lib/modules/$(uname -r)/extra/v4l2loopback.ko.

Somewhere in the build process it's using the files in /usr/src/linux from the kernel-source package. I currently have version 4.19.65 of both kernel-source and kernel_sarpi3, so it seems like everything should work together just fine. But it doesn't. kernel-source has some files that were generated as part of building kernel_armv7 and those are being used during this kernel module's build process. The file is placed in /lib/modules/4.19.65-armv7 instead of /lib/modules/4.19.65-v7-arm. Trying to insmod it gives an error that it's an "invalid module format".

I think if I had a sarpi kernel-source package (with all the generated files from building the sarpi kernel), then everything would work fine.

What is different about the sarpi kernel vs. the one in Slackware ARM? Is there a way to replace the generated files in the kernel-source package with ones specific to the sarpi kernel?
There's probably a link to /usr/src/linux in your package source-tree or it is referred to in the build process. That's where the build process expects to find the Linux source. You need to tell it where the Linux source is located [if it's not in /usr/src/linux], would be my guess.

You can download the Raspberry Pi Linux Kernel source from https://github.com/raspberrypi/linux - this is the repository which SARPi uses. The generated files from building the kernel can be found in the installer images and packages available from http://sarpi.fatdog.nl/index.php?p=downloads - the SARPi downloads page.

Which files are you referring to that you want to replace in the kernel?

The differences between the kernel(s) that SARPi provides and the ones in Slackware ARM are quite fundamental. Slackware ARM kernels are built from the official Linux Foundation [kernel.org] source. SARPi kernels are built from the Raspberry Pi Foundation's GitHub [unofficial] Linux kernel source. There's one MAJOR difference right there! The SARPi kernel(s) obviously support the Raspberry Pi device. Slackware ARM kernels don't. MoZes builds his kernels the way that suits him and/or to support Slackware ARM and end-users. SARPi builds kernels entirely based on running Slackware ARM on the Raspberry Pi for the end-user. SARPi does not cater for any other device so everything available from the SARPi Project is bespoke in that respect. SARPi kernels are built on the Raspberry Pi device for which they are intended to run to ensure the highest level of compatibility is maintained, and that's not always 100% guaranteed. Slackware ARM kernels are the official kernel releases for the OS. SARPi kernels are not official and include a lot of hacked/patched shizzle that comes with the Raspberry Pi. Slackware ARM kernels are built by the Slackware developers in a professional manner and environment that are ultimately reliable. SARPi kernels are not.

If you have a '/lib/modules/4.19.65-armv7' directory on your system I'm interested in how that came about.

Last edited by Exaga; 08-14-2019 at 03:24 AM. Reason: because more coffee
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SARPi out of space in /boot elyk Slackware - ARM 7 08-14-2019 01:16 AM
[SOLVED] Slackware 14.2 Install mkinitrd ERROR: No /lib/modules/4.4.14-smp kernel modules tree found for kernel " 4.4.14-smp" laxware Slackware 4 01-04-2019 12:40 PM
SARPi website new URL - sarpi.co.uk Exaga Slackware - ARM 4 01-28-2018 06:36 PM
SARPi installer and packages using kernel 4.9.61 Exaga Slackware - ARM 1 11-19-2017 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration