Skip to content
Kelly Ledford edited this page Nov 16, 2018 · 1 revision

Build Instructions

Dependencies

Minimum kernel version: 4.10rc6+

Install these packages in your linux setup:

$ sudo apt-get install xutils-dev autoconf libtool bison flex python-mako \
  libpciaccess-dev libomxil-bellagio-dev llvm libexpat1-dev Clang-format-3.5 \
  zlib1g-dev libx11-dev libelf-dev ncurses-*

Clone other projects:

Clone libdrm: git clone git@github.com:projectceladon/external-libdrm.git libdrm

Clone Mesa: git clone git@github.com:projectceladon/external-mesa.git mesa

Clone Vulkan-LVL: git clone https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git

Clone HWC: git clone git@github.com:projectceladon/IA-Hardware-Composer.git hwc

Clone libva: git clone git@github.com:projectceladon/libva.git libva

Clone vaapi: git clone git@github.com:projectceladon/vaapi.git vaapi

Set up custom install path:

$ mkdir $HOME/hwc-install
$ export WLD=$HOME/hwc-install
$ export LD_LIBRARY_PATH=$WLD/lib
$ export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig
$ export PATH=$WLD/bin:$PATH
$ export ACLOCAL_PATH=$WLD/share/aclocal
$ export ACLOCAL="aclocal -I $ACLOCAL_PATH"
$ mkdir -p $WLD/share/aclocal

Build and install projects:

libdrm:

$ cd ../libdrm
$ ./autogen.sh --disable-radeon --disable-nouveau --disable-amdgpu \
  --enable-udev --enable-libkms --prefix=$WLD
$ make && make install

Mesa:

Note: You can ignore --with-vulkan-drivers=intel if you don't intend to test / develop on vulkan

$ cd ../mesa
$ ./autogen.sh --prefix=$WLD \
  --with-platforms=surfaceless --disable-dri3 --enable-shared-glapi \
  --enable-texture-float --disable-glx --disable-glx-tls --enable-gbm \
  --with-gallium-drivers= --with-dri-drivers=i965 --with-vulkan-drivers=intel
$ make && make install

Vulkan-LVL:


Note: This step is needed only if you are going to develop/test vulkan support for HWC.

$ sudo apt-get install git cmake build-essential bison libx11-xcb-dev libxkbcommon-dev \
  libmirclient-dev libwayland-dev libxrandr-dev

$ cd Vulkan-LoaderAndValidationLayers
$ ./update_external_sources.sh cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug \
  -DCMAKE_INSTALL_PREFIX=$WLD
$ cd dbuild
$ make && make install

Run vulkaninfo to see if the drivers and layers have been installed properly

Libva:

$ cd ./libva
$ ./autogen.sh --prefix=$WLD
$ make && make install

Vaapi:

$ cd ./vaapi
$ ./autogen.sh --prefix=$WLD
$ make && make install

HWComposer:

$ cd ./hwc
$ ./autogen.sh --prefix=$WLD
$ #add --enable-vulkan to switch to the Vulkan backend
$ Make

Testing your installation

Set up Environment to run tests:

Restart the device Goto Virtual terminal by pressing ctrl + Alt + f1

$ su (to become root)
$ export WLD=$HOME/hwc-install
$ export LD_LIBRARY_PATH=$WLD/lib

run the commands:

cd tests
./testlayers -j ./jsonconfigs/kmscube1layer.json