Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4906

Beginners • Re: How to add a new driver module to the Raspberry Pi kernel?

$
0
0
But I have a new question. I copied the st7789vw.ko file and placed it in another bookworm (v12-5 32bit) system, in the "/lib/modules/6.1.0-rpi7-rpi-v8/kernel/kernel" directory. I tried to insert this module by running the command "sudo depmod -a" and "sudo modprobe st7789vw", but it gave me an error "modprobe: ERROR: could not insert 'st7789vw': Exec format error". Is there something wrong with my steps?
All modules have a signature, eg

Code:

pi@bookworm64:~ $ modinfo v3dfilename:       /lib/modules/6.6.17-v8+/kernel/drivers/gpu/drm/v3d/v3d.ko.xzlicense:        GPL v2author:         Eric Anholt <eric@anholt.net>description:    Broadcom V3D DRM Driveralias:          platform:v3d-drmsrcversion:     5DE2CE3C92A0243DD6C1B56alias:          of:N*T*Cbrcm,7278-v3dC*alias:          of:N*T*Cbrcm,7278-v3dalias:          of:N*T*Cbrcm,7268-v3dC*alias:          of:N*T*Cbrcm,7268-v3dalias:          of:N*T*Cbrcm,2711-v3dC*alias:          of:N*T*Cbrcm,2711-v3dalias:          of:N*T*Cbrcm,2712-v3dC*alias:          of:N*T*Cbrcm,2712-v3ddepends:        drm,gpu-sched,drm_shmem_helperintree:         Yname:           v3dvermagic:       6.6.17-v8+ SMP preempt mod_unload modversions aarch64 <<<<<<<<<<<<
If that vermagic information doesn't match the kernel you're trying to load the module into, then it will refuse to load as there is no guarantee that the in-kernel APIs match.
There are ways to build additional modules for the running kernel if you need to. DKMS is probably the cleanest as it should automatically rebuild the modules should apt update the kernel version.

Statistics: Posted by 6by9 — Mon Feb 26, 2024 2:45 pm



Viewing all articles
Browse latest Browse all 4906

Trending Articles