Nouveau Support on Jetson TK1
This page keeps track of Nouveau's status on Jetson TK1 and acts as a kind of tutorial to get things running.
Note that Nouveau requires an upstream kernel to work and cannot be used with the L4T kernel. Going through this document will replace your L4T kernel with an upstream one, which may impact your board's usability as upstream kernels are currently less-featured. Due to the current reduced functionality of using Nouveau on Jetson TK1, this should really only be followed by people intending to hack on Nouveau or test it.
The GPU in Jetson TK1 is called GK20A and will be referred as such throughout this document.
Kernel and Nouveau Module
Although the goal is to have all the necessary support in the upstream kernel, a few patches are still on their way there and therefore you will need to use custom Linux kernel and Nouveau modules branches.
Most of the kernel patches have been merged for 3.17, but a few are still pending, hopefully not for too long.
Checkout the 'drm' branch of https://github.com/Gnurou/linux.git. It has just a handful of commits on top of the current -rc.
From the kernel root, create a build directory and go into it:
mkdir build-tegra cd build-tegra
Select the Tegra configuration and cross-compile the kernel and modules (adapt the CROSS_COMPILE parameter to match your cross-compiler):
make -j4 -C .. ARCH=arm O=`pwd` CROSS_COMPILE=arm-none-eabi- tegra_defconfig dtbs zImage modules
Now install the kernel and modules. Mount the root partition of your Jetson TK1 (if you are booting off eMMC, run "ums 0 mmc 0" from U-boot to make it appear as a USB storage device) and adapt the following lines so the mount directory matches:
cp arch/arm/boot/zImage arch/arm/boot/dts/tegra124-* /path/to/jetson/root/boot make -C .. ARCH=arm O=`pwd` CROSS_COMPILE=arm-none-eabi- INSTALL_MOD_PATH=/path/to/jetson/root modules_install
Nouveau Kernel Module
The version of Nouveau in the kernel still lacks a few patches to allow GK20A to be used.
Checkout the 'gk20a' branch of https://github.com/Gnurou/nouveau.git. Then compile the modules against your Linux tree:
cd nouveau/drm make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- O=/path/to/kernel/source/build-tegra M=$PWD -C /path/to/kernel/source modules
Mount your Jetson TK1 root partition again, and install the modules:
make ARCH=arm CROSS_COMPILE=arm-none-eabi- O=/path/to/kernel/source/build-tegra M=$PWD INSTALL_MOD_PATH=/path/to/jetson/root -C /path/to/kernel/source modules_install
NVIDIA GK20A Firmware
GK20A's firmware should eventually end in linux-firmware, but until it is the case you will need to find or extract the 4 firmware files nvea_fuc409c, nvea_fuc409d, nvea_fuc41ac and nvea_fuc41ad. These files are still not officially distributed.
Put the 4 firmware files into /lib/firmware/nouveau of your Jetson TK1 root.
After the kernel, Nouveau modules, and firmware have been installed, you can boot your Jetson: the nouveau module should load successfully despite a few errors in the kernel log. To confirm, check that /dev/dri/renderD128 exists. If it does, the Nouveau module is correctly loaded!
All the needed patches are already in Mesa, horray!
Checkout the '1.5' branch from git://anongit.freedesktop.org/wayland/wayland
Reclocking support is enabled in the kernel, but to support it from user-space the Nouveau module needs to be loaded with a parameter. Paste the following:
options nouveau pstate=1
into /etc/modprobe.d/nouveau.conf and reboot for effect. The pstate file should appear in /sys/devices/soc0/57000000.gpu/. Use cat to list the possible values, and echo 0f to it to max the GPU frequency if needed!