Adding a kernel module for USB wifi adapter
-
I assumed correctly. Here is the section referencing Mediatek in the
.configthatmake_defconfig.shwould generate:CONFIG_WLAN_VENDOR_MEDIATEK=yCompare the Broadcom (I think) drivers section:
CONFIG_BCMDHD=y CONFIG_BCM4339=y CONFIG_BCMDHD_FW_PATH="/vendor/firmware/fw_bcmdhd.bin" CONFIG_BCMDHD_NVRAM_PATH="/etc/wifi/bcmdhd.cal"And the Mediatek section in a
.configI generated withmake ARCH=arm menuconfig:CONFIG_WLAN_VENDOR_MEDIATEK=y CONFIG_MT7601U=mI'll try to simply manually add these two lines to
hammerhead_defconfigandcyanogenmod_hammerhead_defconfigfor the next build. -
Found this in the
mt7601u'sKconfig:depends on MAC80211 depends on USBmac80211is something that can be selected in the config menu in Networking support → Wireless. It is not selected by default. When you select it, themt7601udriver appears in the Mediatek wireless driver section of the menu as it should.I edited both
hammerhead_defconfigandcyanogenmod_hammerhead_defconfiglike this (usingmake_defconfig.shof course). Building again. -
Build finished. Seemingly no change. Maybe
out/is supposed to be like this. Will flash tomorrow and check. -
Flashed and checked with
lsmod,modinfoandfind. It looks like, despite everything, the module was still not installed. -
device/lge/hammerhead/BoardConfig.mkconfirms that the configuration file I've been working with is the right one:# Define kernel config for inline building TARGET_KERNEL_CONFIG := cyanogenmod_hammerhead_defconfig TARGET_KERNEL_SOURCE := kernel/lge/hammerheaddevice/lge/hammerhead/init.hammerhead.rchas something that could be relevant:# wifi chown wifi system /persist/wifi insmod /system/lib/modules/bcmdhd.koI'll add another
insmodline formt7601uand see what happens. My guess is it will either break something or do nothing. -
I tried
mkap, which failed to push anything to the device, but it did create./out/target/product/hammerhead/obj/KERNEL_OBJ/include/config/mt7601u.h. I also noticed that all the.hfiles inobj/KERNEL_OBJ/include/config/are empty.Flashed, replaced system image, no change.
-
I am literally unable to tell you what happened next, because all my posts are being flagged as spam.
-
@zehkira maybe because of external links. Happens sometimes.
-
I'm out of ideas.
-
@zehkira I congratulate you on your remarkable persistence, even though I have little understanding of what you have been doing.