V4L-Utils & Libdrm Build Instructions

V4L-Utils & Libdrm Build Instructions

1 Introduction


This wiki page summarizes the build steps for the v4l-utils and LibDRM repositories as used in various versions of the Zynq Base TRD .
Different TRD release versions use different versions of v4l-utils and libdrm. Please refer to the respective TRD tutorial for the exact versions to be used. This tutorial provides generic instructions.

2 Prerequisites


This tutorial requires the ARM GNU tools, which are part of the Xilinx Software Development Kit (SDK), to be installed on your host system. Refer to the Zynq Tools wiki page for more information on how to set up the tool chain and known issues.

Note: These instructions currently require a Linux host for building.


For simplicity, we define the following environment variable in this tutorial:
  • INSTALL_PREFIX refers to the installation area of the cross-compiled libraries and headers


3 Cross-compile v4l-utils


The v4l-utils are a series of packages that provide libraries and utilities for handling media devices such as image sensors, HDMI receivers or USB webcams.

3.1 Download the v4l-utils source archive


Download the v4l-utils sources and extract the archive. Please use the version number as indicated on the specific TRD page.


Note: By default, libmediactl and libv4l2subdev will be compiled statically as the APIs are not deemed stable yet. Also, the generated libraries and headers will be excluded from the installation.

In order to generate shared libraries instead of static libraries and to include the libraries and headers with the installation, modify the file utils/media-ctl/Makefile.am as follows:


Lines prefixed with - are removed and lines prefixed with + are added.

3.2 Configure the target build


Configure the build as follows.


3.3 Build and install


The output products will be installed in the INSTALL_PREFIX directory. Please inspect the include, lib, and bin directories.


4 Cross-compile LibDRM


The LibDRM development repository provide libraries and user-space utilities to test and access display devices.

4.1 Clone the LibDRM repository


Download the libdrm sources and extract the archive. Please use the version number as indicated on the specific TRD page.


4.2 Configure the target build


Configure the build as follows.


4.3 Build and Install


The output products will be installed in the INSTALL_PREFIX directory. Please inspect the include, lib, and bin directories.