VIM3 linux 5.15 fail to build module

Which Khadas SBC do you use?


Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 22.04 kernel 5.15

Which version of system do you use? Khadas official images, self built images, or others?

official Khadas

Please describe your issue below:

Error wile building module
I want to build ath10k module, i got code from git,

i did
make vims_defconfig
make menuconfig, enabled ath10k module i tried to build, make modules.
error is symbol exported twice, i mentioned same files in common drivers and drivers.

Post a console log of your issue below:

**Delete this line and post your log here.**

Fenix have integrated the function you want.

Enter fenix folder
After source

Run make kernel and make kernel-config to check the ath 10k module.

Run make kernel-saveconfig to save your modification.

on linux host, or can make on vim3? i want ath10k-ct, i should modify files in fenix folder with drivers?

on linux host i got
valeriy@valeriy-Z390:~/project/khadas/fenix$ make kernel
[i] FENIX (scripts/ BUILD: /home/valeriy/project/khadas/fenix/build | DL: /home/valeriy/project/khadas/fenix/downloads | sudo: sudo -E
Info: Build host: bionic target: jammy
Info: Installing build dependencies
Info: Requires root privileges, please enter your passowrd!
many such things…as
E: The repository ‘Index of /lutris-team/lutris/ubuntu bionic Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Makefile:18: recipe for target ‘kernel’ failed
make: *** [kernel] Error 100

how can be resolved problem with export twice symbols, this is because same .c files make export, how can we ignore this or forbid export from folder common_drivers

how can be resolved problem with export twice symbols, this is because same .c files make export, how can we ignore this or forbid export from folder common_drivers

Please input git status in common_driver folder and post the log.
I think maybe you have modifeid something file which lead to this error.

The correct steps are like followings:

$ source
$ make kernel
$ make kernel-config

Then press the “/” key on your keyboard, input ATH, you will see a window like this

Then you can enable the function you want.

i want to build modules without fenix, can it be?
khadas@Khadas:/media/khadas/ROOTFS/home/khadas/linux_khadas/common_drivers$ git status
On branch khadas-vims-5.15.y
Your branch is up to date with ‘origin/khadas-vims-5.15.y’.
nothing to commit, working tree clean
khadas@Khadas:/media/khadas/ROOTFS/home/khadas/linux_khadas$ sudo make -j4 modules
cp: cannot create regular file ‘./.git/hooks/’: No such file or directory
make: [Makefile:2112: FORCE] Error 1 (ignored)
chmod: cannot access ‘./.git/hooks/commit-msg’: No such file or directory
make: [Makefile:2114: FORCE] Error 1 (ignored)
LD [M] common_drivers/drivers/drm/aml_drm.o
make[2]: warning: Clock skew detected. Your build may be incomplete.
AR common_drivers/drivers/built-in.a
AR drivers/built-in.a
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: warning: Clock skew detected. Your build may be incomplete.
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
AR init/built-in.a
LD vmlinux.o
MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
KSYMS .tmp_vmlinux.kallsyms1.S
AS .tmp_vmlinux.kallsyms1.S
LD .tmp_vmlinux.kallsyms2
KSYMS .tmp_vmlinux.kallsyms2.S
AS .tmp_vmlinux.kallsyms2.S
LD vmlinux
SORTTAB vmlinux
make[1]: Warning: File ‘common_drivers/drivers/adla/kmd/adla_core.o’ has modification time 1850824519 s in the future
MODPOST modules-only.symvers
FATAL: modpost: common_drivers/drivers/clk/meson/amlogic-clk: ‘meson_aoclkc_probe’ exported twice. Previous export was in vmlinux
make[1]: *** [scripts/Makefile.modpost:157: modules-only.symvers] Error 1
make: *** [Makefile:1899: modules] Error 2
i have downloaded kernel as zip file, without git

I enable some ath10 configuration, because I don’t know which configuration is you wanted.

I make image in fenix, did’t meet your error and succeed to build the module

jacobe@jacobe:~/project/release/fenix/build/linux$ ll drivers/net/wireless/ath/ath10k/*.ko
-rw-rw-r-- 1 jacobe jacobe 929680 Mar 13 17:42 drivers/net/wireless/ath/ath10k/ath10k_core.ko
-rw-rw-r-- 1 jacobe jacobe 114288 Mar 13 17:42 drivers/net/wireless/ath/ath10k/ath10k_pci.ko
-rw-rw-r-- 1 jacobe jacobe  56688 Mar 13 17:42 drivers/net/wireless/ath/ath10k/ath10k_sdio.ko
-rw-rw-r-- 1 jacobe jacobe  25800 Mar 13 17:42 drivers/net/wireless/ath/ath10k/ath10k_usb.ko
jacobe@jacobe:~/project/release/fenix/build/linux/common_drivers$ git diff
diff --git a/arch/arm64/configs/kvims_defconfig b/arch/arm64/configs/kvims_defconfig
index 3befa62a..44329392 100644
--- a/arch/arm64/configs/kvims_defconfig
+++ b/arch/arm64/configs/kvims_defconfig
@@ -37,7 +37,6 @@ CONFIG_CGROUP_BPF=y
 # CONFIG_RD_BZIP2 is not set
 # CONFIG_RD_LZMA is not set
 # CONFIG_RD_XZ is not set
@@ -889,7 +888,15 @@ CONFIG_USB_NET_CH9200=m
@@ -1117,8 +1124,8 @@ CONFIG_GPIO_PISOSR=m

can ypu please use files from this git

and send me modules via email?
in fenix i have errors
GPG error: Index of /opera-stable/ stable InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 24A1004B1F11DCC9
and some others and error
Makefile:2: recipe for target ‘all’ failed
make: *** [all] Error 100

I clone the respority you post. Copy all files of 5.15 kernel.

cd ath10k-ct/ath10k-5.15
cp * fenix/build/linux/driver/net/wireless/ath/ath10k
cd fenix/

And build image successfully, so you need which driver?

jacobe@jacobe:~/project/release/fenix/build/linux$ git status
On branch khadas-vims-5.15.y
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   drivers/net/wireless/ath/ath10k/Makefile
        modified:   drivers/net/wireless/ath/ath10k/core.c
        modified:   drivers/net/wireless/ath/ath10k/core.h
        modified:   drivers/net/wireless/ath/ath10k/coredump.c
        modified:   drivers/net/wireless/ath/ath10k/coredump.h
        modified:   drivers/net/wireless/ath/ath10k/debug.c
        modified:   drivers/net/wireless/ath/ath10k/debug.h
        modified:   drivers/net/wireless/ath/ath10k/hif.h
        modified:   drivers/net/wireless/ath/ath10k/htc.c
        modified:   drivers/net/wireless/ath/ath10k/htt.c
        modified:   drivers/net/wireless/ath/ath10k/htt.h
        modified:   drivers/net/wireless/ath/ath10k/htt_rx.c
        modified:   drivers/net/wireless/ath/ath10k/htt_tx.c
        modified:   drivers/net/wireless/ath/ath10k/hw.c
        modified:   drivers/net/wireless/ath/ath10k/hw.h
        modified:   drivers/net/wireless/ath/ath10k/mac.c
        modified:   drivers/net/wireless/ath/ath10k/mac.h
        modified:   drivers/net/wireless/ath/ath10k/pci.c
        modified:   drivers/net/wireless/ath/ath10k/rx_desc.h
        modified:   drivers/net/wireless/ath/ath10k/snoc.c
        modified:   drivers/net/wireless/ath/ath10k/targaddrs.h
        modified:   drivers/net/wireless/ath/ath10k/txrx.c
        modified:   drivers/net/wireless/ath/ath10k/wmi-ops.h
        modified:   drivers/net/wireless/ath/ath10k/wmi-tlv.c
        modified:   drivers/net/wireless/ath/ath10k/wmi.c
        modified:   drivers/net/wireless/ath/ath10k/wmi.h
        modified:   drivers/net/wireless/ath/ath10k/wow.c

no changes added to commit (use "git add" and/or "git commit -a")
jacobe@jacobe:~/project/release/fenix/build/linux$ ll drivers/net/wireless/ath/ath10k/*.ko
-rw-rw-r-- 1 jacobe jacobe 1070112 Mar 13 18:22 drivers/net/wireless/ath/ath10k/ath10k_core.ko
-rw-rw-r-- 1 jacobe jacobe  121376 Mar 13 18:22 drivers/net/wireless/ath/ath10k/ath10k_pci.ko
-rw-rw-r-- 1 jacobe jacobe   56760 Mar 13 18:22 drivers/net/wireless/ath/ath10k/ath10k_sdio.ko
-rw-rw-r-- 1 jacobe jacobe   25872 Mar 13 18:22 drivers/net/wireless/ath/ath10k/ath10k_usb.ko

send me all ath10k please

It’s been e-mailed to you. Please check.

thank you.
have you build on host PC? (my host Linux valeriy-Z390 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux)
what is the right sequence?
git clone -b khadas-vims-5.15.y GitHub - khadas/linux: Linux kernel for Khadas VIMs & Edges
cd linux
git clone GitHub - khadas/common_drivers: Linux kernel drivers & device trees for VIMs.
make vims_defconfig
make menuconfig
“enable modules”
i tried to build on VIM3 SBC

For ture, I still suggest you to build in fenix, our SDK can check the linux repository and common_driver folder exist or not. If don’t exist, it will run git clone to download these repositories.

My host PC is Linux jacobe 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
The only difference between us is the kernel version, but it won’t be the key reason.

my problem with fenix is in : #$sudo apt-get update commented it in common-functions

with this comment, all builded. thanks a lot. from fenix
to update kernel what file to update. and how to make a SD card?

from fenix
to update kernel what file to update

In linux folder, make sure your git HEAD is on branch named khadas-vims-5.15.y, you can check with shell git log. If see words like this HEAD -> khadas-vims-5.15.y is correct.Then run git pull origin khadas-vims-5.15.y , it will fetch and merge coding from Khadas repository. Then enter common_driver folder, the steps are likewise.

and how to make a SD card?

You can follow this website.

i have build
make kernel
make kernel-config
make kernel with ath10k modules, vmlinux was build, but in boot folder on emmc was vmlinuz-5.15.149 or some how, i replaced this file with vmlinux, but it doesnot boot.
to make sd image what is the comand?

When you run source
Choose SD-USB

Choose install type:
1. EMMC - Image For Writing to eMMC Storage With USB Burning Tool
2. SD-USB - Image For Writing to SD/USB Storage

Which install type would you like? [1] 2

Then run make
After buidling, there is a .img file in fenix/build/image/ folder, then you can follow the document which I post last time to make sd card.

Thanks, now i made an image and burned sd card, but sbc boots from emmc. Tried image for emmc, make, but it is not recognized by windows usb tool. and utils burn tool for ubuntu doesnot burn it.
How to boot from SD, krescue sd card now doesnot boot too.