SPRADI3 June 2024 AM625 , AM62P , AM67 , AM67A , AM68 , AM68A , AM69 , AM69A , DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4AEN-Q1 , TDA4AH-Q1 , TDA4AL-Q1 , TDA4AP-Q1 , TDA4VE-Q1 , TDA4VEN-Q1 , TDA4VH-Q1 , TDA4VL-Q1 , TDA4VM , TDA4VM-Q1 , TDA4VP-Q1
The KM driver is provided in TI's SDK under the following directory: ti-processor-sdk-linux-adas-j721s2-evm-09_02_00_05/board-support/extra-drivers/ti-img-rogue-driver-23.3.6512818
The driver is also posted in TI's public repository: https://git.ti.com/cgit/graphics/ti-img-rogue-driver/.
The build instructions can be extracted from TI's SDK build infrastructure, but the instructions are added here for clarity. The environment variables, which can be set in the shell or passed on the make command, are as follows:
Environment Variable Name | Value | Description |
---|---|---|
ARCH | arm64 | Architecture of target CPU |
CROSS_COMPILE | aarch64-none-linux-gnu- | The cross compiler being used |
KERNELDIR | <absolute path to linux kernel on the system> | Path to the Linux kernel source directory |
RGX_BVNC | 36.53.104.796 - TDA4VL, TDA4VH, TDA4AEN, AM62P 22.104.208.318 - TDA4VM 33.15.11.3 - AM62x | Version of GPU to use, particular version of hardware revision |
BUILD | release or debug | Build profile to use |
PVR_BUILD_DIR | <soc>_linux | Which build directory to use within the driver, each SOC has a directory |
WINDOW_SYSTEM | lws-generic | Which window system to use, only lws-generic is supported after SDK 9.0. |
With these variables set, the make command ought to work. Build within the ti-processor-sdk-linux-adas-j721s2-evm-09_02_00_05/board-support/extra-drivers/ti-img-rogue-driver-23.3.6512818/build/linux/j721s2_linux
in the SDK or the ti-img-rogue-driver/build/linux/j721s2_linux
, if manually cloned.
To install on the target filesystem, the SDK runs the following make command from the create binary directory: binary_j721s2_linux_wayland_release/target_aarch64/kbuild
make -C ${LINUXKERNEL_INSTALL_DIR} INSTALL_MOD_PATH=${DESTDIR} INSTALL_MOD_STRIP=${INSTALL_MOD_STRIP} M=`pwd` modules_install
If installing from the build directory, one or more environment variable is required: DISCIMAGE=<path-to-rootfs-root-directory>
Example:
export DISCIMAGE=/media/user/rootfs
sudo -E env PATH=$PATH make install
Another way to install the KM library is to use the install.sh
script in the output directory:
Example:
cd binary_j721s2_linux_lws-generic_release
sudo ./install.sh --root <path-to-rootfs-directory>
Always check that you rebuild and reinstall the GPU kernel driver when rebuilding the Linux kernel if the Linux kernel version changes. Most notably, when installing the Linux kernel modules, a folder is created in the filesystem such as /lib/modules/6.1.80-ti-g2e423244f8c0
. Modifying a kernel usually introduces the suffix -dirty
which causes a new modules directory to be created. Thus, the GPU kernel driver must be reinstalled as well into the new kernel module directory.
Example: Manual Build of GPU Kernel Driver for AM62
make \
ARCH=arm64 CROSS_COMPILE=/home/toolchains/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- \
KERNELDIR=/home//am625_sdk/ti-processor-sdk-linux-am62xx-evm-09.01.00.08/board-support/ti-linux-kernel-6.1.46+gitAUTOINC+247b2535b2-g247b2535b2 \
BUILD=release PVR_BUILD_DIR=am62_linux
Example: Manual Installation of GPU Kernel Driver
cd binary_j721s2_linux_lws-generic_release
sudo install.sh -root <path to rootfs>