[Mesa-users] Can I buld mesa swrast on system without GPU?

Oleg Gavrilchenko gavrilchenko at avionica.spb.ru
Mon Dec 16 16:41:58 UTC 2019


Hello!
Sorry for my English. It is no my first language(Russian).
I have embedded system with XILINX ZYNQ-7000 processor(ARM Cortex-A9 2 
cores). This system also has framebuffer video device. Framebuffer with 
image contains in DDR memory and is transmitted in display by HDMI 
interface through special DMA(Framebuffer DMA in FPGA). I write simple 
fbdev driver for this device and it work fine. This system not has any GPU.
I found out, that mesa can perform software rasterization for Open GL 
swrast. Can I build mesa swrast for my device and how can I do it?

I try do this with use cross compilation file.

This is a cross compilation file for meson, cross_file.txt:

[binaries]
c = 'arm-linux-gnueabihf-gcc'
cpp = 'arm-linux-gnueabihf-g++'
ar = 'arm-linux-gnueabihf-ar'
strip = 'arm-linux-gnueabihf-strip'
pkgconfig = 'pkg-config'

[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv7hl'
endian = 'little'

[properties]
needs_exe_wrapper = true
sys_root = '/home/oleg/work/z-turn-dvi/sysroot'

[paths]
prefix ='/usr'



I build mesa with that options:

meson  build/ --cross-file cross_file.txt \
        -Dplatforms=surfaceless \
        -Dosmesa=gallium \
        -Dgallium-drivers=swrast \
        -Ddri-drivers=[] \
        -Dvulkan-drivers=[] \
        -Degl=true \
        -Dgles1=true \
        -Dgles2=true \
        -Dglx=disabled

ninja -C build/

build fail with errors:

[84/882] Linking target src/mapi/es1api/libGLESv1_CM.so.1.1.0.
FAILED: src/mapi/es1api/libGLESv1_CM.so.1.1.0
arm-linux-gnueabihf-gcc  -o src/mapi/es1api/libGLESv1_CM.so.1.1.0 
'src/mapi/es1api/ffa5f0c@@GLESv1_CM at sha/.._entry.c.o' -Wl,--as-needed 
-Wl,--no-undefined -shared -fPIC -Wl,--start-group 
-Wl,-soname,libGLESv1_CM.so.1 src/mapi/shared-glapi/libglapi.so.0.0.0 
-Wl,--gc-sections -pthread -L/home/oleg/work/z-turn-dvi/sysroot/usr/lib 
-ldrm -lm -ldl -Wl,--end-group '-Wl,-rpath,$ORIGIN/../shared-glapi' 
-Wl,-rpath-link,/home/oleg/src/mesa-19.2.7/build/src/mapi/shared-glapi
/opt/Xilinx/SDK/2018.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabihf/7.2.1/../../../../arm-linux-gnueabihf/bin/ld: 
cannot find -ldrm
collect2: error: ld returned 1 exit status

DRM option enable in Linux kernel, but I do not install libdrm on my 
system. Should I do it? And how it will work with my fbdev?
Thank you for answers. And sorry for my English.




More information about the mesa-users mailing list