Setting Up DRM on Dom0

Back to Xen J6 Main Page

Overview
This wiki describes how to setup the DRM libraries and modules for Dom0 on the J6 board, and get the LCD display working with basic tests. To see how to get DRM working on DomU guests, see Setting up DRM for DomU's.

Prerequisites
Your system must be setup according to the method outlined in System Setup. Also, you must be able to successfully login to the Dom0 kernel. To see how to get Dom0 to boot, see Booting with Xen on the J6.

System Overview
These instructions were run and tested with the following software and hardware:
 * Board: J6 Eco
 * Chip: DRA72x
 * Laptop OS: Ubuntu 12.04 (64-bit)
 * Board OS: Ubuntu 14.04 (32-bit)
 * Cross-Compiler GCC Version: 4.6.3


 * UBoot:
 * Version: 2014.07-dirty
 * Release: 6AL.1.0
 * Linux Kernel:
 * Version: 3.14
 * Release: 6AL.1.0
 * Xen:
 * Version: 4.6-unstable (master branch)

Package Dependencies
First, install the package dependencies for the DRM library:

Environment Setup
For reference, we assume that the following environment variables are defined:

Create the directory structure:

Clone Repository Sources
Clone the DRM library repository:

Build DRM Library
Build and install the DRM library on the core filesystem:

Please note that CROSS_COMPILE is arm-linux-gnueabihf-, not arm-linux-gnueabi-. The hf stands for "hard float", and basically means that a hard floating point unit is available for floating-point calculations. Kernel code is forbidden from using the floating-point unit (for the overhead of maintaining floating-point register context), and so is compiled without hf. In general, user code requires compilation with hf, so any userspace code should be compiled with arm-linux-gnueabihf.

Install Kernel Modules
Build and install kernel modules onto the root filesystem:

Update the root filesystem image
Remove the root filesystem and replace it with the new one (assumes the rootfs partition is mounted at /media/rootfs/):

Unmount the SD card:

Note that you can also directly update the rootfs partition on the SD card by changing the prefixes used for the install commands in the above builds.

For libDRM, change the --prefix argument to the location where your rootfs is mounted:

Verify the Installation
Now that we have installed all the components necessary for DRM on the J6, we can test that all the components are working properly. Boot up your J6 board, and log in.

Verify that the DRM setup works. The following command should display the SMPTE color bars (stereotypical test pattern displayed on TV's):

GPU Acceleration
In subsequent parts, we're assuming that the GPU is a DRM device, and therefore can simply be plugged in to accelerate whatever DRM operations programs in the DomU guests or Dom0 require.

In order to get the GPU working, you're going to need the binaries for Imagination Technology's GPU driver. To get these binaries, and for instructions on installing the driver, contact [mailto:hemanthariyani@ti.com?Subject=%20Getting%20Imagination%20Studio's%20GPU%20DDK%20For%20the%20J6 Hemant Hariyani].

Next Steps
With the DRM software stack now installed on Dom0, we can now setup DRM on DomU guests.

For setting up DRM on DomU guests, see Setting up DRM on DomU Guests.