Need help to install build custom kernel module

548 views
Skip to first unread message

Praveenkumar Jangala

unread,
Nov 28, 2020, 6:23:06 AM11/28/20
to andro...@googlegroups.com
Hi ,

 My laptop is having relatek 8822ce hardware which is not working with pie-x86 iso. So, I checked out pie-x86 branch, also checkout code dkms module of respective hardware from github and copied to kernel/drivers/net/wireless/realtek folder. Modified KConfig and Makefile. But when the kernel is built using "make kernel". KO object is not available in $OUT/obj/kernel/drivers/net/wireless/realtek folder . Even , i didn't get any compilations errors. Can anyone suggest what I am doing wrong?
 

Thanks & Regards
PRAVEENKUMAR JANGALA

Chih-Wei Huang

unread,
Nov 28, 2020, 10:17:52 PM11/28/20
to Android-x86
Praveenkumar Jangala <pravee...@gmail.com> 於 2020年11月28日 週六 下午7:22寫道:
> My laptop is having relatek 8822ce hardware which is not working with pie-x86 iso. So, I checked out pie-x86 branch, also checkout code dkms module of respective hardware from github and copied to kernel/drivers/net/wireless/realtek folder. Modified KConfig and Makefile. But when the kernel is built using "make kernel". KO object is not available in $OUT/obj/kernel/drivers/net/wireless/realtek folder . Even , i didn't get any compilations errors. Can anyone suggest what I am doing wrong?

Have you enabled its config?
If not, add it to kernel/arch/x86/configs/android-x86*_defconfig


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Praveenkumar Jangala

unread,
Nov 29, 2020, 1:54:37 AM11/29/20
to andro...@googlegroups.com
I am sorry Chih-Wei , I  do not understand what line I should add to that config file. This is the first time for me to peep into system software. Please teach me in that perspective

#Added this line to to android-x86_64_defconfig under the line CONFIG_WLAN_VENDOR_REALTEK=y . I do not know what config I should make in order to make this work 
CONFIG_RTW88=m
 
#Added below line to net/wireless/realtek/KConfig
source "drivers/net/wireless/realtek/rtw88/Kconfig"

#Added below line to net/wireless/realtek/Makefile
obj-$(CONFIG_RTLW88) += rtw88/
FInally, added rtw88 folder from  https://github.com/lwfinger/rtw88 . This folder is missing KConfig. So i searched in internet and added KConfig file with below content

# SPDX-License-Identifier: GPL-2.0-only
menuconfig RTW88
tristate "Realtek 802.11ac wireless chips support"
depends on CFG80211
help
  This module adds support for mac80211-based wireless drivers that
  enables Realtek IEEE 802.11ac wireless chipsets.

  If you choose to build a module, it'll be called rtw88.

if RTW88

config RTW88_CORE
tristate

config RTW88_PCI
tristate

config RTW88_8822BE
bool "Realtek 8822BE PCI wireless network adapter"
depends on PCI
select RTW88_CORE
select RTW88_PCI
help
  Select this option will enable support for 8822BE chipset

  802.11ac PCIe wireless network adapter

config RTW88_8822CE
bool "Realtek 8822CE PCI wireless network adapter"
depends on PCI
select RTW88_CORE
select RTW88_PCI
help
  Select this option will enable support for 8822CE chipset

  802.11ac PCIe wireless network adapter

config RTW88_DEBUG
bool "Realtek rtw88 debug support"
depends on RTW88_CORE
help
  Enable debug support

  If unsure, say Y to simplify debug problems

config RTW88_DEBUGFS
bool "Realtek rtw88 debugfs support"
depends on RTW88_CORE
help
  Enable debug support

  If unsure, say Y to simplify debug problems

endif


When the build is completed build shows successful, but the module is not present. Can you please tell me what I am missing in these steps.
 
 

Thanks & Regards
PRAVEENKUMAR JANGALA
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/CAKc24n3gbFbmdvhJguCZn0QvBzvyrO0%2BiB2FygvrV-44dKjGTw%40mail.gmail.com.

Huy Minh Bui

unread,
Nov 29, 2020, 7:26:13 AM11/29/20
to Android-x86
For lwfinger's rtw88 you just need to clone his repo into external/kernel/drivers and then add this Android.mk file

Then try to compile
Vào lúc 13:54:37 UTC+7 ngày Chủ Nhật, 29 tháng 11, 2020, pravee...@gmail.com đã viết:

Praveenkumar Jangala

unread,
Nov 30, 2020, 2:59:35 AM11/30/20
to andro...@googlegroups.com
Thank You Huy Minh Bui. I am able to compile and build but, when ISO is generated it is not present in drivers 
 
 

Thanks & Regards
PRAVEENKUMAR JANGALA

Huy Minh Bui

unread,
Nov 30, 2020, 5:56:26 AM11/30/20
to Android-x86
Check if you actually compile the module in /system/lib/modules/<your_kernel_name>/extra/rtw88*

If not, then there's something wrong while you compile. If it's present, it mean the problem is on lwfinger's driver

Vào lúc 14:59:35 UTC+7 ngày Thứ Hai, 30 tháng 11, 2020, pravee...@gmail.com đã viết:

crw

unread,
Dec 1, 2020, 1:09:27 AM12/1/20
to Android-x86
rtw88 is included in kernel 5.8+
use kernel 5.8 or newer, it has support for a lot of realtek chipsets.

Praveenkumar Jangala

unread,
Dec 1, 2020, 2:10:25 AM12/1/20
to andro...@googlegroups.com
Thank you for your reply . I don't think it is easy to change the kernel for a beginner like me. Thank you for your suggestion, android-x86 team is already porting Q-x86 branch with kernel version 5+, I think.
 
Hi Huy Minh Bui,

 I have attached "make kernel" log which is successful and log shows rtw88 drivers compiled and Kernel Objects are generated. But when i give ISO generation command, ISO is generated successfully but it is not having generated KO files. I have opened ISO file with 7zip and checked kernel/drivers inside system.sfs. If I am looking in the wrong location can you please guide me. 
 
Installing additional kernel module rtw88
make: Entering directory '/media/praveen/EXT4/android-x86/pie-branch/kernel'
make[1]: Entering directory '/media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kernel'
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8723d.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8723de.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8821c.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8821ce.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8822b.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8822be.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8822c.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_8822ce.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_core.ko
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/rtw88/rtw_pci.ko
  DEPMOD  4.19.122-android-x86_64-g464351ddb855-dirty
make[1]: Leaving directory '/media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kernel'
make: Leaving directory '/media/praveen/EXT4/android-x86/pie-branch/kernel'
Installing additional kernel module wl
make: Entering directory '/media/praveen/EXT4/android-x86/pie-branch/kernel'
make[1]: Entering directory '/media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kernel'
  INSTALL /media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kmodule/wl/wl.ko
  DEPMOD  4.19.122-android-x86_64-g464351ddb855-dirty
make[1]: Leaving directory '/media/praveen/EXT4/android-x86/pie-branch/out/target/product/x86_64/obj/kernel'
make: Leaving directory '/media/praveen/EXT4/android-x86/pie-branch/kernel'

#### build completed successfully (10:46 (mm:ss)) ####


Thanks & Regards
PRAVEENKUMAR JANGALA
make_kernel.log

crw

unread,
Dec 2, 2020, 11:03:21 AM12/2/20
to Android-x86
If its hard for you to change kernel,
Download a bliss OS 12 iso file, bliss os 12 has kernel 5.8
and open it with 7-zip, take the /system/lib/modules and /system/lib/firmware and the kernel file in root directory,  put those two folders and the kernel file in android x86 9.0 iso, you may delete the old modules
Then you have a android 9 iso with kernel 5.8 from bliss os.

Praveenkumar Jangala

unread,
Dec 2, 2020, 11:36:05 AM12/2/20
to andro...@googlegroups.com
Thank you for your reply. This seems very simple and let me give a try.

Praveenkumar Jangala

unread,
Dec 3, 2020, 1:32:43 AM12/3/20
to andro...@googlegroups.com
Hi ,

        i am  not able to modify system.img it says read-only. On other side, i have found my drivers in the build , Now i need to check why its not loading
ogPwfiAauD.png

 
 

Thanks & Regards
PRAVEENKUMAR JANGALA

Reply all
Reply to author
Forward
0 new messages