Setting Up DRM on DomU Guests

Back to Xen J6 Main Page

Overview
This wiki describes how to setup paravirtualized DRM on a Linux DomU guest. The PV DRM module will enable DomU guests to display to the LCD screen or other devices.

Prerequisites
Your system must be setup according to the method outlined in Xen J6 System Setup. Also, you must be able to successfully boot the Dom0 kernel, and boot DomU guests. See Booting with Xen on the J6 and Creating DomU Guests on the J6 Board for how to do this.

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)

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

Install the DRM Library on the Guest's Filesystem
Mount the guest's filesystem:

Build and install the DRM library onto the guest's filesystem:

Build the DRM Drivers
This assumes that your kernel configuration file is already setup to compile the kernel for a Xen boot. For setting up the kernel configuration, see Build the Dom0 Linux Kernel

Add the following lines to the config file ${SW_DIR}/kernels/linux-3.14/.config:

File:xen_pv_drm.config

Sync the changes to the config file and build the drivers:

Install the Drivers onto the Filesystems
Install the modules to both Dom0's and DomU's filesystems:

Unmount the guest's filesystem:

Insert the SD card. Remove the old filesystem and replace it with the new one:

Unmount the SD card:

Load and Probe the Drivers
Boot up the SD card and login. Insert the backend module into Dom0:

Create the DomU guest, and insert the frontend module into DomU:

For convenience, create the following script to probe the paravirtualized DRM drivers. For an explanation of the script, see Writing a Xen Paravirtualized (PV) Driver:

File:probe_drm_device.sh

With the script, probe the drivers:

Verify the Drivers
Now that the frontend and backend driver have been inserted into the kernel and probed, we should be to display on the lcd screen from DomU.

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