Open mlaugharn opened 4 years ago
Hello @mlaugharn,
Select 19.3 branch:
# git checkout 19.3
I'm cross-compiling mesa and meson
command looks like this in my case:
meson -Dprefix=/usr/armv7a-hardfloat-linux-gnueabi/usr/ -Dgallium-drivers=grate -Ddri-drivers=swrast -Dplatforms=x11,drm -Dshared-glapi=true -Dgbm=true -Dglx=dri -Dosmesa=none -Dgles1=false -Dgles2=true -Degl=true -Dgallium-xa=false -Dgallium-vdpau=false -Dgallium-va=false -Dgallium-xvmc=false -Duse-elf-tls=false -Dgallium-nine=false -Db_ndebug=true -Dvulkan-drivers= -Dlibunwind=false -Dllvm=false --cross-file=/home/dima/vl/meson_cross build
The contents of /home/dima/vl/meson_cross
:
[binaries]
ar = ['armv7a-hardfloat-linux-gnueabi-ar']
c = ['armv7a-hardfloat-linux-gnueabi-gcc']
cpp = ['armv7a-hardfloat-linux-gnueabi-g++']
fortran = ['gfortran']
llvm-config = 'llvm-config'
objc = ['cc']
objcpp = ['armv7a-hardfloat-linux-gnueabi-c++']
pkgconfig = 'armv7a-hardfloat-linux-gnueabi-pkg-config'
strip = ['armv7a-hardfloat-linux-gnueabi-strip']
windres = ['windres']
[properties]
c_args = ['-O2', '-pipe', '-g', '-fPIC', '-mcpu=cortex-a9', '-mfpu=vfpv3-d16', '-mfloat-abi=hard']
c_link_args = ['-O2', '-pipe', '-g', '-fPIC', '-mcpu=cortex-a9', '-mfpu=vfpv3-d16', '-mfloat-abi=hard', '-L/usr/armv7a-hardfloat-linux-gnueabi/', '-L/usr/armv7a-hardfloat-linux-gnueabi/lib', '-L/usr/armv7a-hardfloat-linux-gnueabi/usr/lib', '-Wl,-O1', '-Wl,--as-needed']
cpp_args = ['-O2', '-pipe', '-g', '-fPIC', '-mcpu=cortex-a9', '-mfpu=vfpv3-d16', '-mfloat-abi=hard']
cpp_link_args = ['-O2', '-pipe', '-g', '-fPIC', '-mcpu=cortex-a9', '-mfpu=vfpv3-d16', '-mfloat-abi=hard', '-L/usr/armv7a-hardfloat-linux-gnueabi/', '-L/usr/armv7a-hardfloat-linux-gnueabi/lib', '-L/usr/armv7a-hardfloat-linux-gnueabi/usr/lib', '-Wl,-O1', '-Wl,--as-needed']
fortran_args = ['-O2', '-pipe', '-march=armv7-a']
fortran_link_args = ['-O2', '-pipe', '-march=armv7-a', '-L/usr/armv7a-hardfloat-linux-gnueabi/', '-L/usr/armv7a-hardfloat-linux-gnueabi/lib', '-L/usr/armv7a-hardfloat-linux-gnueabi/usr/lib', '-Wl,-O1', '-Wl,--as-needed']
objc_args = []
objc_link_args = ['-L/usr/armv7a-hardfloat-linux-gnueabi/', '-L/usr/armv7a-hardfloat-linux-gnueabi/lib', '-L/usr/armv7a-hardfloat-linux-gnueabi/usr/lib', '-Wl,-O1', '-Wl,--as-needed']
objcpp_args = []
objcpp_link_args = ['-L/usr/armv7a-hardfloat-linux-gnueabi/', '-L/usr/armv7a-hardfloat-linux-gnueabi/lib', '-L/usr/armv7a-hardfloat-linux-gnueabi/usr/lib', '-Wl,-O1', '-Wl,--as-needed']
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv7a'
endian = 'little'
Finally, run the compilation:
cd build && ninja
Please let me know if the above isn't helpful.
@okias Could you you please show the commands that used for the PostmarketOS builds?
it's generally https://gitlab.com/postmarketOS/pmaports/-/blob/master/temp/mesa-git/APKBUILD#L112 with added ,grate
in that line.
Trying to adapt the https://github.com/grate-driver/grate/wiki/Grate-driver instructions from autogen.sh to meson but grate is not listed under the option gallium-drivers