Thanks a lot,
I had the same issue that 56630895e967c78a4f7e45d869166b8418c96f6b fixes in MidasMainline (HACK: brcmfmac: defer initialization for firmware to load).
In Replicant 6 the WiFi module was loaded with insmod / modprobe anyway so it could avoid that but here we'd rather not do that as:
- The way to build Linux in Replicant 11 doesn't support modules yet either. I half-backported the kernel build from LineageOS and I disabled the modules builds along the way to make the integration easier. Do you know a cleaner implementation (still without the modules building)?
- It would be better not to load any modules right now as it would makes the images less generic. The downside of doing that it that the kernel images will use a bit more RAM.
- Android is probably not meant to have modules autodetected and loaded like in GNU/Linux with udev / mdev / systemd.
So I tried to find a way to get something upstreamable, but it seems that late_initcall and late_initcall_sync don't wait for the rootfs to be mounted.
I digged more and I didn't find anything that would tell a driver to wait for the rootfs to be mounted as the code that does the mounts the rootfs (in init/main.c and init/do_mounts.c) doesn't signal it to the drivers.
We could still have userspace code trigger the driver probe again with a generic version of that code in the meantime:
echo 'mmc1:0001:2' > /sys/bus/sdio/drivers_probe
We could probably autodetect what to echo where somehow.
I then need to integrate the MidasMainline userspace changes into Replicant.
Also I tried to make usbip work to forward ath9k_htc cards for easy testing (including with multiple WiFi cards) but apparently enabling the modules required for usbip in the kernel configuration makes the device not expose adb anymore.
This is probably because we use a kernel approach to have ADB. We should probably move that to userspace setup scripts instead at some point.
Denis.
edit1: add question about kernel build implementation