Skip to content

Build instructions

Marco Herrera edited this page Feb 2, 2022 · 7 revisions

This project can be built natively in the board as well as cross-compiled from a host device. Find both sections explained below.

Native compilation

This approach allows you to build the project directly onto the target board, without the need for a host device; the steps to follow in order to compile natively are:

  1. Clone the project
git clone https://github.com/TexasInstruments/edgeai-gst-plugins.git
cd edgeai-gst-plugins
  1. Configure, build and install the project
meson build --prefix=/usr -Dpkg_config_path=pkgconfig
ninja -C build 
ninja -C build test
ninja -C build install

For different configurations refer to the following table:

Configuration Option Description
--prefix <path> Set the installation path
-Dpkg_config_path=<path> Set the pkg config path
-Dtests=true Build tests
-Dexamples=true Build examples
-Ddoc=true Enable hotdoc documentation
-Dprofiling=true Enable profiling building

Cross compilation (currently not supported)

  1. Clone the project
git clone https://github.com/TexasInstruments/edgeai-gst-plugins.git
cd edgeai-gst-plugins
  1. Set the path to the SDK
PSDKR_PATH=/path/to/the/ti-processor-rsdk
  1. Create a build directory
mkdir build && cd build
  1. Customize build for your SDK
../crossbuild/environment $PSDKR_PATH > aarch64-none-linux-gnu.ini
  1. Configure and build the project
meson .. --cross-file aarch64-none-linux-gnu.ini --cross-file ../crossbuild/crosscompile.ini
ninja
DESTDIR=$PSDKR_PATH/targetfs ninja install

The DESTDIR variable specifies the root directory where the files will be installed; the command used above will install them in the targetfs for flashing; however, they can be installed somewhere else and then manually copied to the board.

Alternatively the project files can be packaged into a deb file for easier installation like so:

ninja debfile

Once the .deb file is generated, it can be copied to the board and installed there or it can be added to the target filesystem before flashing like so:

dpkg -x deploy/gst-tiovx.deb $PSDKR_PATH/targetfs

Compiling the Project Natively inside the PSDK RTOS Docker container

  1. Build Docker container
cd /opt/edge_ai_apps/docker
./docker_build.sh
./docker_run.sh
cd /opt/edge_ai_apps
./docker_run.sh
  1. Build the tiovx modules
cd /opt/edgeai-tiovx-modules/build
cmake ..
make -j$(nproc)
make install
  1. Build the GStreamer plugin (same as native build)
meson build --prefix=/usr -Dpkg_config_path=pkgconfig
ninja -C build
ninja -C build install
  1. Test plugin is loaded correctly
gst-inspect-1.0 tiovx
Clone this wiki locally