MiCode / Xiaomi_Kernel_OpenSource

Xiaomi Mobile Phone Kernel OpenSource
8.65k stars 3.19k forks source link

Redmi 6/6A (cactus-o-oss) broken kernel modules #1027

Open mkaliaha opened 5 years ago

mkaliaha commented 5 years ago

Builded kernel can't load modules from /vendor/lib/modules (broken wifi, gps, fm, etc.). Even with force load (insmod says wrong exec format). And sources for these modules (and fpsgo.ko from lib/modules) are not included into kernel sources (vendor/mediatek/kernel_modules). Please, move sources to kernel...

SamarV-121 commented 5 years ago

Yep ! exactly need module source

ramabondanp commented 5 years ago

or find hacky way to use prebuilt miui modules

mkaliaha commented 5 years ago

I tried enabling modversions — no result. I tried enabling force modules load — no result. Insmod always gives me wrong exec format error. I even tried to backport modules from alps 9.0 — device bootloops, can't even take logs. With what toolchain was stock kernel built? Maybe it's a key...

fpgadsp commented 5 years ago

Builded kernel can't load modules from /vendor/lib/modules (broken wifi, gps, fm, etc.). Even with force load (insmod says wrong exec format). And sources for these modules (and fpsgo.ko from lib/modules) are not included into kernel sources (vendor/mediatek/kernel_modules). Please, move sources to kernel... hi Dhoine,Did you compile the kernel with alps? Could you tell me how to compile?

mkaliaha commented 5 years ago

I didn't compile these sources with alps. It's useless, all references to mtk vendor were removed. I've found references only on mtk's generic sources from alps (I can't share link to alps, sorry, the guy who uploaded it don't want this) I've seen your issues here. The kernel builds as any generic android kernel. With google toolchain. Alps uses it too.

mkaliaha commented 5 years ago

Fixed by hacking kernel/module.c to bypass module symbols crc check... Haven't found another way.

minhducsun2002 commented 3 years ago

The Pie version seems to work with community patches, but is there any progress with kernel modules?

mkaliaha commented 3 years ago

As far as I remember, Pie kernel sources don't have module sources. So, the problem remains. I haven't tried it, cause my first attempt with it costed me $10 for unbricking the device. I stopped further attempts.

minhducsun2002 commented 3 years ago

@Dhoine you might want to log into XDA again and check the old thread. I found a solution to this problem.