Hi:
I've ported ubuntu18.04 on i.mx8mq-evk, and enabled the docker by modifying the kernel options.
But, for now, on this platform(ubuntu with docker), I can not insmod the qca6174.ko into kernel, the debug information shows that a segmentfault occured during insertion, which caused by illegal pointer access.
I consider that this problem is caused by kernel options modification, So I use the previous version of kernel Image(ubuntu without docker associate kernel options modification),it works OK,The qca6174.ko can normally insmod.
Considering that qca6174.ko was copied from the official imx8mq-evk image,I try to compile a qca6174 image myself to see if it can solve the problem,The source code of qca6174 on:
platform/vendor/qcom-opensource/wlan/qcacld-2.0 - Unnamed repository
But I don't know which branch or tag should I use, I tried the latest one, But it compiles failed. The error message is:
```
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_dma_pvt.h: In function ‘__adf_os_dmamem_alloc’:
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_dma_pvt.h:77:16: error: implicit declaration of function ‘dma_alloc_noncoherent’; did you mean ‘dma_alloc_coherent’? [-Werror=implicit-function-declaration]
vaddr = dma_alloc_noncoherent(osdev->dev, size, &lmap->seg[0].daddr,
^~~~~~~~~~~~~~~~~~~~~
dma_alloc_coherent
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_dma_pvt.h:77:14: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
vaddr = dma_alloc_noncoherent(osdev->dev, size, &lmap->seg[0].daddr,
^
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_dma_pvt.h: In function ‘__adf_os_dmamem_free’:
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_dma_pvt.h:103:9: error: implicit declaration of function ‘dma_free_noncoherent’; did you mean ‘dma_free_coherent’? [-Werror=implicit-function-declaration]
dma_free_noncoherent(osdev->dev, size, vaddr, dmap->seg[0].daddr);
^~~~~~~~~~~~~~~~~~~~
dma_free_coherent
In file included from /home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/adf_nbuf.h:46:0,
from /home/hzh/qca6174/qcacld-2.0/CORE/VOSS/inc/vos_packet.h:60,
from /home/hzh/qca6174/qcacld-2.0/CORE/VOSS/inc/i_vos_list.h:46,
from /home/hzh/qca6174/qcacld-2.0/CORE/VOSS/inc/vos_list.h:73,
from /home/hzh/qca6174/qcacld-2.0/CORE/VOSS/inc/vos_api.h:64,
from /home/hzh/qca6174/qcacld-2.0/CORE/HDD/inc/wlan_hdd_includes.h:55,
from /home/hzh/qca6174/qcacld-2.0/CORE/HDD/src/wlan_hdd_assoc.c:50:
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h: At top level:
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h:39:10: fatal error: asm/scatterlist.h: No such file or directory
#include <asm/scatterlist.h>
^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
So, my questions are:
1. Could I solve this problem by regenerating a qca6471.ko? If not, please give me some suggestions about this problem.
2. If the answer to the first question is yes, Is there any guide to help me know how to recompile a qca6174.ko, or how can I config the qca6174 source code?
If you can provide some help, I will be very grateful.
Thanks.
Best Regards.
downey
UPDATE.
I've found a git repo:GitHub - boundarydevices/qcacld-2.0 at boundary-CNSS.LEA.NRT_2.0
It saws that the code has been tested againt the 4.14.x kernel branches.
I followed the step and still get trouble with compiling:
...
/home/hzh/qca6174/qcacld-2.0/CORE/SERVICES/COMMON/adf/linux/adf_os_dma_pvt.h:140:5: error: implicit declaration of function ‘dmac_inv_range’; did you mean ‘time_in_range’? [-Werror=implicit-function-declaration]
dmac_inv_range(start, end);
^~~~~~~~~~~~~~
time_in_range
cc1: some warnings being treated as errors
...
It seems that the kernel API is incompatible.
Best Regards.
downey.
BTW,The kernel version is 4.14.98.