Adding a kernel module for USB wifi adapter
-
I assumed correctly. Here is the section referencing Mediatek in the
.config
thatmake_defconfig.sh
would generate:CONFIG_WLAN_VENDOR_MEDIATEK=y
Compare 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
.config
I generated withmake ARCH=arm menuconfig
:CONFIG_WLAN_VENDOR_MEDIATEK=y CONFIG_MT7601U=m
I'll try to simply manually add these two lines to
hammerhead_defconfig
andcyanogenmod_hammerhead_defconfig
for the next build. -
Found this in the
mt7601u
'sKconfig
:depends on MAC80211 depends on USB
mac80211
is something that can be selected in the config menu in Networking support → Wireless. It is not selected by default. When you select it, themt7601u
driver appears in the Mediatek wireless driver section of the menu as it should.I edited both
hammerhead_defconfig
andcyanogenmod_hammerhead_defconfig
like this (usingmake_defconfig.sh
of 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
,modinfo
andfind
. It looks like, despite everything, the module was still not installed. -
device/lge/hammerhead/BoardConfig.mk
confirms 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/hammerhead
device/lge/hammerhead/init.hammerhead.rc
has something that could be relevant:# wifi chown wifi system /persist/wifi insmod /system/lib/modules/bcmdhd.ko
I'll add another
insmod
line formt7601u
and 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.h
files 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.