Bug 9991

Summary: SGX Error implicit declaration of function ‘dmac_map_area’
Product: buildroot Reporter: michalciolek
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: 2017.02.1   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description michalciolek 2017-06-29 13:05:25 UTC
Hello, 

I would like to compile the image for BeagleBone Black with QT5 and SGX (eglfs). 

My host: 
4.10.0-21-generic 
Ubuntu 17.04 x64 

I tried with branch 2017.05 and 2017.02.3: 

make beaglebone_defconfig
make menuconfig

I enabled: 
BR2_TOOLCHAIN_BUILDROOT_GLIBC
BR2_TOOLCHAIN_BUILDROOT_CXX
BR2_PACKAGE_TI_GFX
BR2_PACKAGE_TI_GFX_ES8
BR2_PACKAGE_QT5
BR2_PACKAGE_QT5BASE_EXAMPLES
BR2_PACKAGE_QT5BASE_GUI
BR2_PACKAGE_QT5BASE_EGLFS

After make I get error: 

/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c: In function ‘pvr_dmac_inv_range’:
/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c:4331:2: error: implicit declaration of function ‘dmac_map_area’ [-Werror=implicit-function-declaration]
  dmac_map_area(pvStart, pvr_dmac_range_len(pvStart, pvEnd), DMA_FROM_DEVICE);
  ^
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxtransfer.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxinit.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxutils.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxkick.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/pb.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/mmu.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxreset.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/devices/sgx/sgxpower.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/bridged/bridged_support.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/bridged/bridged_pvr_bridge.o
  CC [M]  /mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/bridged/sgx/bridged_sgx_bridge.o
cc1: some warnings being treated as errors
scripts/Makefile.build:258: polecenia dla obiektu '/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/env/linux/osfunc.o' nie powiodły się
make[4]: *** [/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM/services4/srvkm/env/linux/osfunc.o] Błąd 1
make[4]: *** Oczekiwanie na niezakończone zadania....
Makefile:1401: polecenia dla obiektu '_module_/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM' nie powiodły się
make[3]: *** [_module_/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/GFX_Linux_KM] Błąd 2
Makefile:478: polecenia dla obiektu 'all' nie powiodły się
make[2]: *** [all] Błąd 2
package/pkg-generic.mk:227: polecenia dla obiektu '/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/.stamp_built' nie powiodły się
make[1]: *** [/mnt/ssd2/buildroot/output/build/ti-gfx-5_01_01_02/.stamp_built] Błąd 2
Makefile:79: polecenia dla obiektu '_all' nie powiodły się
make: *** [_all] Error 2

How to fix it?
Comment 1 Arnout Vandecappelle 2017-07-01 10:14:18 UTC
As far as I know, ti-gfx is no longer supported and for recent SoCs with recent kernels you should use ti-gfx-km (and -um). That's why beaglebone_qt5_defconfig selects it. Is there any reason why you don't use that defconfig?
Comment 2 michalciolek 2017-07-04 14:40:59 UTC
I followed the tutorial: http://vanguardiasur.com.ar/opengl-es-on-beaglebone-black/ and I did not know that ti-gfx is no longer supported... With (beaglebone_qt5_defconfig) ti-gfx-km (and -um) options works! Thanks!
Comment 3 Arnout Vandecappelle 2017-07-04 15:01:24 UTC
(In reply to michalciolek from comment #2)
> I followed the tutorial: http://vanguardiasur.com.ar/opengl-es-on-beaglebone-black/

Could you contact the people on that site and ask them to update their page to use the beaglebone_qt5_defconfig?