dudeiot Posted October 28, 2023 Share Posted October 28, 2023 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 0 Quote Link to comment Share on other sites More sharing options...
Werner Posted October 29, 2023 Share Posted October 29, 2023 Providing logs with armbianmonitor -u helps with troubleshooting and significantly raises chances that issue gets addressed. 0 Quote Link to comment Share on other sites More sharing options...
Gunjan Gupta Posted October 29, 2023 Share Posted October 29, 2023 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 0 Quote Link to comment Share on other sites More sharing options...
dudeiot Posted October 29, 2023 Author Share Posted October 29, 2023 (edited) 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 October 29, 2023 by dudeiot 0 Quote Link to comment Share on other sites More sharing options...
Gunjan Gupta Posted October 30, 2023 Share Posted October 30, 2023 15 hours ago, dudeiot said: Is there a simple way to generate uInitrd-5.15.85-sunxi only? if you want to do it on the device itself, use the following command update-initramfs -u -k all 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.