Linux Kernel GPU Driver (Power VR)¶
Note: If you are building the kernel via Yocto, it is likely that the GPU driver is already being compiled and installed in your filesystem and you do not need these instructions.
The kernel module driver for the AM62x/AM62p is not part of the main kernel build. If you manually build your own kernel, you will need to compile this module and manually install it in your /lib/modules
directory in order to use the MitySOM-AM62x/AM62p GPU features.
The GPU is in the Power VR family. The driver consists of a kernel module, pvrsrvkm.ko
, that is loaded automatically via system scripts. In most cases, you want this kernel module to be located in /lib/modules/$KERNEL_VER/updates
.
Note for the AM62P : You will have to change some of these instructions slightly. You will need to update the paths to point to the AM62p sdk, you will want to cd to the build/linux/am62p_linux
directory and PVR_BUILD_DIR should be set to am62p_linux
The source for the driver can be found in TI's Processor SDK (the SDK installs to your home directory by default):
/home/user/ti-processor-sdk-linux-am62xx-evm-10.00.07.04/board-support/extra-drivers/ti-img-rogue-driver-24.1.6554834/
To build the module, please setup a few environment variables (similar to the kernel build), and then run make. You must modify these values for your own kernel source location and toolchain. Please contact Critical Link if you are unsure about these variables.
# export KERNELDIR=/home/USER/productline/linux-ti/build-mitysom62x/ # export PATH=/home/tools/mitysom-62x/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu/bin:$PATH # export ARCH=arm64 # export CROSS_COMPILE=aarch64-none-linux-gnu- # cd /home/user/ti-processor-sdk-linux-am62xx-evm-10.00.07.04/board-support/extra-drivers/ti-img-rogue-driver-1.15.6133109/ # cd build/linux/am62_linux # make clean # make BUILD=release PVR_BUILD_DIR=am62_linux WINDOW_SYSTEM=lws-generic
You will see messages similar to the following:
******* Multiarch build: no ******* Primary arch: target_aarch64 ******* Secondary arch: none ******* PVR top-level arch: rogue ******* PVR DEFS arch: rogue ******* PVR USC arch: rogue ******* PVR TPU arch: rogue ******* HWDefs Root: /home/user/ti-processor-sdk-linux-am62xx-evm-10.00.07.04/board-support/extra-drivers/ti-img-rogue-driver-24.1.6554834/hwdefs/rogue ******* Host OS: linux ******* Target OS: linux WARNING: You are not specifying how to find dependent libraries, e.g., by specifying SYSROOT. The build may fail. GEN binary_am62_linux_lws-generic_release/target_aarch64/install_km.sh GEN binary_am62_linux_lws-generic_release/install.sh ... LD [M] /home/user/ti-processor-sdk-linux-am62xx-evm-10.00.07.04/board-support/extra-drivers/ti-img-rogue-driver-24.1.6554834/binary_am62_linux_lws-generic_release/target_aarch64/kbuild/pvrsrvkm.ko
The last line indicates the location of the compiled kernel module, pvrsrvkm.ko
. You will need to manually install this module on your root filesystem under /lib/modules/$KERN_VER/updates
. You may need to create the updates
directory.
Then, reboot your system. After you login, run lsmod | grep pvr
to make sure that the module has been loaded.
Go to top