WiFi module not available

Hi,

I am using an verdin iMX8MP module and building a custom yocto image based on the tdx-reference-minimal-image.
My custom layer removes PCIE support in the kernel and device tree (as we don’t use this), remove uart4 in device tree (as we don’t want Bluetooth) and adds a custom app.
I also replace conman with networkManager and dropbear with openssh.

Recently my images seem to fail to load and initialise the wifi module but I am not sure why.
Everything looks as expected in the image and I can manually ‘lsmod’ to load the mwifiex and mwifiex_sdio modules and it loads and seems to work.

Not sure where to look to figure out why the module driver is not loading.
I also don’t see anything in the startup or dmesg. It is just not even trying to load it.

Any ideas would be useful to help my find what is causing this.
Eventually I will be adding the meta-toradex-security layer for secure boot. But cannot do that until I get WiFi working again.

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Based on the modifications you’ve made to your Yocto build for the Verdin iMX8MP module, there are a few areas that could potentially impact the loading of the WiFi module at boot time.

  1. Kernel Configuration: Removing PCIe support might inadvertently affect other subsystems that are seemingly unrelated but may have dependencies within the kernel. It’s crucial to ensure that the kernel configuration changes do not disable any dependencies required by the WiFi module. Revisit your kernel configuration to verify that all necessary drivers and subsystems for WiFi operation are enabled.

  2. Device Tree Changes: Similarly, changes to the device tree can have unintended consequences. Ensure that the modifications made to disable UART4 and other components do not impact the WiFi module’s initialization. It’s important to verify that the WiFi module’s device tree node is correctly configured and enabled.

  3. Network Manager: Switching from ConnMan to NetworkManager requires proper configuration to manage network interfaces, including WiFi. Ensure that NetworkManager is correctly configured to manage the WiFi interface. You might need to create or modify NetworkManager configuration files to ensure it recognizes and manages the WiFi interface.

  4. Module Loading: Since you can manually load the mwifiex and mwifiex_sdio modules using lsmod, it suggests that the modules are not being automatically loaded at boot. This could be due to the absence of a trigger for automatic loading. Investigate the use of systemd services or udev rules that could be responsible for loading these modules at boot time. Ensure that any blacklisting (as mentioned in the context provided) is not preventing these modules from loading.

  5. System Logs: Even though you mentioned not seeing anything in the startup logs or dmesg, it’s worth revisiting these logs with a focus on any messages related to WiFi, mwifiex, SDIO, or NetworkManager. Sometimes, relevant messages might be overlooked on the first review.

  6. Custom Application: Ensure that your custom application does not interfere with the WiFi module’s operation. This is less likely if the WiFi module fails to load even before your application starts, but it’s worth considering if your application has any network-related functionality.

  7. Security Layer Considerations: While not directly related to the current issue, once you proceed with adding the meta-toradex-security layer for secure boot, ensure that it does not introduce any new restrictions that could affect the loading or operation of the WiFi module.

If after reviewing these areas

Please, also check if these links can help you solve your problem:

Torizon OS Boot Time Optimization | Toradex Developer Center.

I will re-check the udev and systemd items mentioned in point 4. However, all other things have already been ruled out by the fact that it works if I manually load the driver. Point 7 I have already had a discussion on the github issues list and there should not be anything around this that affects anything (which I can prove if all I do is build the tdx-reference-minimal-image with the security layer and adding INHERIT += "tdx-signed" to local.conf

Ok, so the latest update is as follows.
I have reduced the number of changes being applied.
The image I am building now only does the following:

  • Replace conman with NetworkManager
  • Set NetworkManager config (to manage all but usb0 interface, disable DHCP)
  • Replace dropbear with openssh
  • Remove ipv6 DISTRO_FEATURE
  • Set static MAC address for usb-gadget (usb0) interface
  • Set mwifiexconf to be station mode (0x1)

This image still appears to not automatically load the mwifiex driver. However, I can run ‘modprobe mwifiex_sdio’ and it loads and appears to work (after manually setting it to be managed by NetworkManager).

I am still unsure what is causing this as I am sure I have not modified anything that should stop the driver loading.
Any help to debug this issue would be appreciated as I don’t have many more things I can try.