I managed to find the correct kernel modules and its working now. Here the complete process:
Add the following lines to your local.conf:
BB_DANGLINGAPPENDS_WARNONLY ?= "true"
MACHINE ?= "colibri-imx6ull"
DISTRO_FEATURES_append = " wifi packagegroup-base-wifi dhcp-client" // add wifi tools like iw and a dhcp client
MACHINE_FEATURES_append = " wifi" // add wifi at machine level
IMAGE_INSTALL_append = " linux-firmware dhcp-client" // install all firmware (needed for wifi) and the dhcp client
Next start menuconfig to add kernel modules by entering the build directory:
And run the command
bitbake virtual/kernel -c menuconfig
If you get errors of undefined sysmbols you are probably missing the ncurses library. Install it with
sudo apt-get install libncurses-dev
From the menu that opened in a console tab go to
Networking support > Wireless.
Check the following modules:
Next go back to the main menu and enter
Device Drivers > Network device support > Wireless LAN
Select the marvell drivers:
Save the changes and run:
Now the necessary firmware, drivers and tools should be installed.