Page 1 of 1
Build Kernel Module
Posted: Thu May 27, 2021 2:29 pm
by sonik
I want to build and test a simple kernel module on Mister.
It's possible to ssh into mister and compile the module there or must cross compile?
There's any guidance?
Re: Build Kernel Module
Posted: Thu May 27, 2021 4:59 pm
by RealLarry
Re: Build Kernel Module
Posted: Thu May 27, 2021 5:58 pm
by sonik
Need to build and deploy entire kernel?
Or it's possible to just build a module, copy and load with depmod?
Re: Build Kernel Module
Posted: Fri May 28, 2021 5:10 am
by RealLarry
sonik wrote: ↑Thu May 27, 2021 5:58 pmNeed to build and deploy entire kernel?
Yes.
Or it's possible to just build a module, copy and load with depmod?
No. MiSTer isn't using any module as it is driven by a monolithic kernel.
RTFM. But if you couldn't get it to work, talk to me about it again and I may bake one for you.
Re: Build Kernel Module
Posted: Wed Jun 22, 2022 2:40 pm
by christian776
Hi !
I'm very new to Mister and Kernel development, so I thought I could ask here to make sure I'm following the right steps. I'd like to compile support for a TP Link Bluetooth adapter model UB500 that is being detected by Mister by it doesn't seem to work when scanning for devices. Some people seem to have patched `btusb.c` for Linux in Ubuntu like in here
https://askubuntu.com/questions/1370663 ... untu-21-10, so I was wondering if this could also apply for Mister. Thanks!
Re: Build Kernel Module
Posted: Mon Jun 27, 2022 9:06 am
by riperme
christian776 wrote: ↑Wed Jun 22, 2022 2:40 pm
Hi !
I'm very new to Mister and Kernel development, so I thought I could ask here to make sure I'm following the right steps. I'd like to compile support for a TP Link Bluetooth adapter model UB500 that is being detected by Mister by it doesn't seem to work when scanning for devices. Some people seem to have patched `btusb.c` for Linux in Ubuntu like in here
https://askubuntu.com/questions/1370663 ... untu-21-10, so I was wondering if this could also apply for Mister. Thanks!
Hi,
I also have this adapter (TP Link UB500) and although it seems to work (the logo appears in the Mister menu) but it does not find any device.
I've read the tutorial about how to compile the Mister kernel to know what to do to make it works.
And that's right, the UB500 works.
The only thing that I worry is the "weight" of the
zImage_dtb. The size of the original kernel is about 7.5MB and my compilation is about 6.8MB.
I entered this forum to see if there was a document or something that says the basic configuration of the kernel, and the base to this configuration add the UB500. It may be that with the configuration that I have made, I have left something basic for the correct functioning of the Mister. But the truth is, I've been using it for 1 month and I don't notice anything.
If you want to try it I can send it you by email.
Bye.
Re: Build Kernel Module
Posted: Tue Jun 28, 2022 9:15 pm
by christian776
That's great news ! I'm actually interested on what guides/steps did you follow to get the kernel compiled with support for UB500. Thanks!
Re: Build Kernel Module
Posted: Sat Sep 10, 2022 3:43 am
by thiagoauler
Hi,
I have the same BT dongle (UB500, icon shows but doesn't pair) and a wifi dongle that already works.
As stated in the latest commit, the BT dongle should work after recompiling the kernel manually (
https://github.com/MiSTer-devel/Linux-K ... 3cac71a392).
I followed the steps in the wiki page (
https://github.com/MiSTer-devel/Main_Mi ... for-MiSTer). The new kernel I compiled boots OK, but doesn't work wifi anymore, and the BT icon doesn't appear either.
In the guide there is an optional step to modify ".cofig" file... I haven't changed anything here. Is it necessary to edit it? Is there something else I'm missing?
Re: Build Kernel Module
Posted: Sat Sep 10, 2022 4:25 am
by wizzo
You can give my one a shot:
https://github.com/wizzomafizzo/mrext/b ... zImage_dtb
I use the same dongle with a patch I found and compiled all the bt and wifi stuff into the kernel instead of using modules. No issues. I expect this'll be fixed eventually because the latest commit for this on the official kernel is pretty much identical to the one I applied.
Re: Build Kernel Module
Posted: Sat Sep 10, 2022 4:58 pm
by thiagoauler
Wizzo,
Thank you SO MUCH!
Worked Great!!