-
Notifications
You must be signed in to change notification settings - Fork 20
Grate driver
❗ The GRATE drivers are for older NVIDIA Tegra20/30/114 SoCs only! If you're looking for drivers for TK1/TX1, then you should use Nouveau drivers.
https://aur.archlinux.org/packages/?K=aa13q&SeB=m
https://github.com/grate-driver/grate-overlay
https://code.launchpad.net/~grate-driver/+archive/ubuntu/ppa
https://copr.fedorainfracloud.org/coprs/kwizart/grate-driver/
https://wiki.postmarketos.org/wiki/Nvidia_Tegra_2_(tegra20)
https://wiki.postmarketos.org/wiki/Nvidia_Tegra_3_(tegra30)
- Use the master branches.
- Install autotools and gcc.
- Compile and install libdrm first.
- Use the most recent mainline linux kernel or at least the most recent stable. You may also try the experimental grate kernel.
- Update all
libdrmopentegramesalibvdpau-tegraat once as there could be interdependencies, start from libdrm.
git clone https://github.com/grate-driver/libdrm.gitcd libdrmsh autogen.sh --prefix=/usr --enable-tegra-experimental-api --disable-freedreno --disable-vmwgfx --disable-nouveau --disable-amdgpu --disable-radeon --disable-intel --disable-vc4make install
git clone https://github.com/grate-driver/xf86-video-opentegra.gitcd xf86-video-opentegrash autogen.sh --prefix=/usrmake install
Note that Display Managers may require GL support, but it's not available yet and automatic fallback doesn't work with Opentegra. Add these lines to /etc/security/pam_env.conf to fix this problem:
QT_QUICK_BACKEND=software
LIBGL_ALWAYS_SOFTWARE=1
This will provide a system-wide fall back to software GL.
By default the llvmpipe Mesa driver will be used and it doesn't work on Tegra20 or if NEON is disabled. In this case use softpipe driver:
GALLIUM_DRIVER=softpipe
git clone https://github.com/grate-driver/mesa.gitcd mesagit checkout 21.1.0meson -Dgallium-drivers=grate,swrast -Dplatforms=x11 -Dshared-glapi=true -Dgbm=true -Dglx=dri -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 buildcd build/ninja && ninja install
[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'
Outdated instructions:
- for older Mesa 19 and older versions only!
git clone https://github.com/grate-driver/mesa.gitcd mesameson -Dprefix=/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 buildcd build/ninja && ninja install
Outdated instructions:
- for older Mesa versions only!
git clone https://github.com/grate-driver/mesa.gitcd mesash autogen.sh --prefix=/usr --enable-dri --enable-glx --enable-shared-glapi --enable-texture-float --disable-nine --enable-debug --enable-dri3 --enable-egl --enable-gbm --enable-gles1 --enable-gles2 --enable-glx-tls --enable-valgrind=auto --enable-llvm-shared-libs --with-dri-drivers=swrast --with-gallium-drivers=swrast,grate --with-vulkan-drivers= --with-egl-platforms=x11,drm --disable-nine --disable-llvm --disable-omx-bellagio --disable-va --disable-vdpau --disable-xa --disable-xvmc --disable-gallium-osmesa --disable-libunwindmake install
git clone https://github.com/grate-driver/libvdpau-tegra.gitcd libvdpau-tegrash autogen.sh --prefix=/usrmake installudevadm trigger