WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Wrong Kernel Modules  (Read 1750 times)

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 265
Wrong Kernel Modules
« on: March 10, 2021, 02:32:00 AM »
I'm trying to add the dwc2 USB driver to PiCore 13's "modules-5.10.16-piCore.gz" because the standard RPi dwc-otg driver causes problems in my application (due to using the FIQ).

dwc2.ko is in 5.10.13-piCore_modules.tar.xz at:
http://tinycorelinux.net/13.x/armv6/releases/RPi/src/kernel/

But if I try to load it manually (it's not loading automatically with "dtoverlay=dwc2,dr_mode=host" in config.txt like it does in RPi OS, maybe the same problem):
Code: [Select]
$ sudo modprobe dwc2
modprobe: can't load module dwc2 (kernel/drivers/usb/dwc2/dwc2.ko): unknown symbol in module, or unknown parameter
$ sudo insmod /lib/modules/5.10.16-piCore/kernel/drivers/usb/dwc2/dwc
2.ko
insmod: can't insert '/lib/modules/5.10.16-piCore/kernel/drivers/usb/dwc2/dwc2.ko': unknown symbol in module, or unknown parameter

The obvious issue here is that 5.10.13-piCore_modules.tar.xz isn't for the 5.10.16-piCore kernel that PiCore 13 actually uses!

So I'm guessing this is @bmarkus: Could you upload the extra modules for the current kernel in PiCore 13 please?

P.S. I did also add udc-core.ko which dwc2 requires, and it loads OK. So I think my method is correct, it's just that something that dwc2 uses has changed in the newer kernel.
« Last Edit: March 10, 2021, 02:37:15 AM by CNK »

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 265
Re: Wrong Kernel Modules
« Reply #1 on: March 10, 2021, 02:54:36 AM »
Sorry, false alarm. I assumed that dwc2 would have the same dependencies as listed by lsmod in RPi OS. Actually it also needs roles.ko.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11515
Re: Wrong Kernel Modules
« Reply #2 on: March 10, 2021, 07:45:42 AM »
Hi CNK
The  depends:  field in this command will give you the dependencies:
Code: [Select]
modinfo dwc2