Skip to contentSkip to conversation

WiFi driver on Radxa Zero 3W #devicedriver #make

DISCUSSION [email protected] 2 participants 4 messages Jun 28, 2025 – Jun 30, 2025

lore
Share & tools
lore
#0 lore raw

Hi all,
I am building a custom linux for Radxa Zero 3W with Yocto. I am fairly new to yocto project. As of now almost all the peripherals are running. But the WiFi chip on the board needs AIC8800 driver to run. This driver should work: https://github.com/radxa-pkg/aic8800.
I tried building some custom recipes and running, but can never get it working.

Quoted 14 lines

Here is the recipe I have written:
SUMMARY = "Aicsemi aic8800 Wi-Fi driver"
DESCRIPTION = "Aicsemi aic8800 Wi-Fi driver installation" LICENSE = "CLOSED"
SRC_URI = "git://github.com/radxa-pkg/aic8800.git;branch=main;protocol=https" SRCREV = "ac5c387ca74e17e91d14d87cd3ba140bb21faf6e"
S = "${WORKDIR}"
inherit module
# If the Makefile is in the root of the repo, this is fine. # If it's in src/, set S = "${WORKDIR}/git/src" and adjust accordingly. EXTRA_OEMAKE = ""
# Install the kernel module

Quoted 10 lines

do_install() {
install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra install -m 0644 ${B}/src/*.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra/ }
# Ensure the module is packaged
FILES_${PN} += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra/*.ko"

I am getting different errors, the last one being - no targets specified and no makefile found.
I strongly believe there is a different way to write a recipie that installs the driver from git. Much obliged to anyone who can help me here.

#1 lore raw
Quoted 9 lines · On 6/28/25 15:26, ferdinand0022 via lists.yoctoproject.org wrote:

Hi all,
I am building a custom linux for Radxa Zero 3W with Yocto. I am fairly new to yocto project.
As of now almost all the peripherals are running. But the WiFi chip on the board needs AIC8800 driver to run.
This driver should work: https://github.com/radxa-pkg/aic8800.
I tried building some custom recipes and running, but can never get it working.

Quoted 9 lines

Here is the recipe I have written:
SUMMARY = "Aicsemi aic8800 Wi-Fi driver"
DESCRIPTION = "Aicsemi aic8800 Wi-Fi driver installation" LICENSE = "CLOSED"
SRC_URI = "git://github.com/radxa-pkg/aic8800.git;branch=main;protocol=https" SRCREV = "ac5c387ca74e17e91d14d87cd3ba140bb21faf6e"
S = "${WORKDIR}"

The S variable should be set most likely to "${WORKDIR}/git" - most probably this will be the reason why it cannot find a makefile, because it is looking in the wrong folder - by default git repos are checked out in this folder (in the current stable releases, at least).

Quoted 7 lines
    inherit module
    # If the Makefile is in the root of the repo, this is fine.
    # If it's in src/, set S = "${WORKDIR}/git/src" and adjust
    accordingly.
    EXTRA_OEMAKE = ""
    # Install the kernel module
    do_install() {
Quoted 9 lines
        install -d
    ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra
        install -m 0644 ${B}/src/*.ko
    ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra/
    }
    # Ensure the module is packaged
    FILES_${PN} +=
    "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra/*.ko"

This line looks outdated - assuming that you are using some non-EOL Yocto version, it should be FILES:${PN}, instead of FILES_${PN} - this syntax has changed some versions ago. (If you are using an old pre-Honister version that does use this syntax, consider upgrading to Kirkstone at the very least, which is a still supported release)

Quoted 4 lines

I am getting different errors, the last one being - no targets specified and no makefile found.
I strongly believe there is a different way to write a recipie that installs the driver from git. Much obliged to anyone who can help me here.

There is a sample recipe[1] in the openembedded-core repository, that shows how to install a very basic external kernel module - I think your recipe is almost there.

[1]:
https://git.openembedded.org/openembedded-core/tree/meta-skeleton/recipes-kernel/hello-mod

#2 lore raw

Thanks a lot for the reply. It proceeded a bit more, but now it seems like the compilation is not running correctly.

Quoted 11 lines

My edited file looks like this:
SUMMARY = "Aicsemi aic8800 Wi-Fi driver"
DESCRIPTION = "Aicsemi aic8800 Wi-Fi driver installation" LICENSE = "CLOSED"
SRC_URI = "git://github.com/radxa-pkg/aic8800.git;branch=main;protocol=https" SRCREV = "ac5c387ca74e17e91d14d87cd3ba140bb21faf6e"
S = "${WORKDIR}/git"
inherit module

Quoted 2 lines

RPROVIDES:${PN} += "kernel-module-aic8800"

After running the bitbake command on the module,  compilation from the makefile seems to show this error:

Quoted 11 lines

src/tools/aicrf_test/bt_test.c:1:10: fatal error: stdio.h: No such file or directory

|     1 | #include <stdio.h>
|       |          ^~~~~~~~~
| src/tools/aicrf_test/wifi_test.c:1:10: fatal error: stdio.h: No such
file or directory
|     1 | #include <stdio.h>
|       |          ^~~~~~~~~
| compilation terminated.

Basically the default header files are not getting detected in the yocto build process. I have gcc 13.3 already installed on the build host. I have attached the generated logfile here.

#3 lore raw
Quoted 29 lines · On 6/30/25 12:56, ferdinand0022 via Lists.Yoctoproject.Org wrote:

Thanks a lot for the reply. It proceeded a bit more, but now it seems like the compilation is not running correctly.

My edited file looks like this:
SUMMARY = "Aicsemi aic8800 Wi-Fi driver"
DESCRIPTION = "Aicsemi aic8800 Wi-Fi driver installation" LICENSE = "CLOSED"
SRC_URI = "git://github.com/radxa-pkg/aic8800.git;branch=main;protocol=https" SRCREV = "ac5c387ca74e17e91d14d87cd3ba140bb21faf6e"
S = "${WORKDIR}/git"
inherit module

RPROVIDES:${PN} += "kernel-module-aic8800"

After running the bitbake command on the module,  compilation from the makefile seems to show this error:

 src/tools/aicrf_test/bt_test.c:1:10: fatal error: stdio.h: No such file or directory
|     1 | #include <stdio.h>
|       |          ^~~~~~~~~
| src/tools/aicrf_test/wifi_test.c:1:10: fatal error: stdio.h: No such file or directory
|     1 | #include <stdio.h>
|       |          ^~~~~~~~~
| compilation terminated.

Quoted 4 lines


Basically the default header files are not getting detected in the yocto build process. I have gcc 13.3 already installed on the build host. I have attached the generated logfile here.

Right, looking at the repo, the top level Makefile seems to build some userspace testing tools. The driver makefiles seem to be in src/SDIO/driver_fw/driver/aic8800 and src/PCIE/driver_fw/driver/aic8800/aic8000_fdrv folders.

Pick the appropriate one, and set that as S value. E.g. for the SDIO driver set S = "${WORKDIR}/git/src/SDIO/driver_fw/driver/aic8800".

Also, possibly you want to take a look at the Makefiles themselves, they have a couple of hardcoded values that doesn't look very Yocto compatible at the first sight, e.g. the SDIO driver has Ubuntu config enabled by default, and some of the directory settings are fairly opinionated also (e.g. KDIR is set to be on the build host).