AnsweredAssumed Answered

libimxdmabuffer-master for imx8mini

Question asked by tan yd on Jun 30, 2020

hi 

 

imx8mini

imx-yocto-L4.14.98_2.0.0_ga

 

 

I want to use libimxdmabuffer ,but I compile  failed  .

 

从编译错误 信息来看,应当时版本不对。

libimxdmabuffer 是从freescale的github上下载的。按理不会报错。

 

请指导一下怎么正确编译

 

root@sunday:~/gpu/libimxdmabuffer-master# ./waf
Waf: Entering directory `/home/sunday/gpu/libimxdmabuffer-master/build'
[ 7/10] Compiling imxdmabuffer/imxdmabuffer_ion_allocator.c
../imxdmabuffer/imxdmabuffer_ion_allocator.c: In function ‘imx_dma_buffer_ion_allocate_dmabuf’:
../imxdmabuffer/imxdmabuffer_ion_allocator.c:312:2: error: unknown type name ‘ion_user_handle_t’
ion_user_handle_t user_handle;
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:333:4: error: unknown field ‘align’ specified in initializer
.align = alignment,
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:335:20: warning: initialized field overwritten [-Woverride-init]
.heap_id_mask = ion_heap_id_mask,
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:335:20: note: (near initialization for ‘allocation_data.heap_id_mask’)
../imxdmabuffer/imxdmabuffer_ion_allocator.c:348:33: error: ‘struct ion_allocation_data’ has no member named ‘handle’
user_handle = allocation_data.handle;
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:351:11: error: variable ‘fd_data’ has initializer but incomplete type
struct ion_fd_data fd_data =
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:353:5: error: unknown field ‘handle’ specified in initializer
.handle = user_handle
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:353:15: warning: excess elements in struct initializer
.handle = user_handle
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:353:15: note: (near initialization for ‘fd_data’)
../imxdmabuffer/imxdmabuffer_ion_allocator.c:351:23: error: storage size of ‘fd_data’ isn’t known
struct ion_fd_data fd_data =
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:356:23: error: ‘ION_IOC_MAP’ undeclared (first use in this function)
if ((ioctl(ion_fd, ION_IOC_MAP, &fd_data) < 0) || (fd_data.fd < 0))
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:356:23: note: each undeclared identifier is reported only once for each function it appears in
../imxdmabuffer/imxdmabuffer_ion_allocator.c:351:23: warning: unused variable ‘fd_data’ [-Wunused-variable]
struct ion_fd_data fd_data =
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:376:10: error: variable ‘handle_data’ has initializer but incomplete type
struct ion_handle_data handle_data =
^
../imxdmabuffer/imxdmabuffer_ion_allocator.c:378:4: error: unknown field ‘handle’ specified in initializer

Outcomes