Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Linux loads "spidev" module even if spidev.ko.xz file is removed

Featured Replies

Hi,

I could  enable  "spidev" support  by  armbian-config -> system -> hardware (enable spidev) . Everything worked fine.

However, the original spidev module supports messages only up to 4096 bytes.

I compiled a new version of custom spidev.ko with the 32,768 buffer size.

Then, converted it to spidev.ko.xz  ( xz -v spidev.ko) and replaced the original file under /lib/modules/5.15.85-sunxi/kernel/drivers/spi/spidev.ko.xz 

The  new module works fine when I install it manually:  insmod /lib/modules/5.15.85-sunxi/kernel/drivers/spi/spidev.ko.xz

However, after the reboot the original 4096-byte version of "spidev"  module is loaded magically.

It is loaded even if I  remove the /lib/modules/5.15.85-sunxi/kernel/drivers/spi/spidev.ko.xz file.

I searched through the whole micro-SD partition and cound not find any copy of spidev.ko.xz or spidev.ko

 

Would you please explaine the mystery ?

Thanks in advance

 

 

17 hours ago, dudeiot said:

Then, converted it to spidev.ko.xz  ( xz -v spidev.ko) and replaced the original file under /lib/modules/5.15.85-sunxi/kernel/drivers/spi/spidev.ko.xz 

In your list of steps, I am not seeing that you ever ran depmod to ensure extraction of updated module deplist and symbols information. Without that kernel will not try to load your module other than you force loading it with insmod.

 

17 hours ago, dudeiot said:

However, after the reboot the original 4096-byte version of "spidev"  module is loaded magically.

It is loaded even if I  remove the /lib/modules/5.15.85-sunxi/kernel/drivers/spi/spidev.ko.xz file.

I searched through the whole micro-SD partition and cound not find any copy of spidev.ko.xz or spidev.ko

Nothing magical about it, The module most likely would also be present inside initrd file and being loaded from there. You never mentioned that you regenerated initrd, so thats a possible explaination

  • Author
Quote

armbianmonitor -u

https://paste.armbian.com/apusitudaq

 

Quote

In your list of steps, I am not seeing that you ever ran depmod 

I did not mention that. However,  I executed

 

depmod -a

sync

reboot

 

It did not help

 

Quote

The module most likely would also be present inside initrd file

Good catch ! If the module is loaded from the initrd  it explains everything.

It seems to solve my problem  it is necessary to change "devspi" module source in Linux source tree and regenerate all images.

Is  there a simple way to generate  uInitrd-5.15.85-sunxi  only?

 

 

Thanks

Edited by dudeiot

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.