Building

Building

The Base Stack source code consists of a number of subsystems. A top-level Makefile is provided which builds the subsystems and deposits the build products into directories.

The Makefile uses GNU autoconf and automake to configure the build.

The following directories are created during the build. Directories are relative to the root of the source tree.

    • staging: Subsystems install libraries, headers, and other files in staging (i.e. what “make install” would do). The build will reference staging as the root filesystem for the purposes of locating libraries ad header files.
    • package: If “make package” is run then select files from staging are copied into package. package is intended to contain files which end up on the target device and serves as an in input to, for example, RPM creation.

The following environment variables must be set prior to building so that build-time generated executables can be used in the build. These environment variables are also required when running Base Stack executables.

    • LD_LIBRARY_PATH must include the lib and lib64 staging directories.
    • PATH must include the bin staging directory.

As an example, if the Base Stack is deposited into /build/entangle-base-stack, then:

export LD_LIBRARY_PATH=/build/entangle-base-stack/staging/opt/entangle/lib:/build/entangle-base-stack/staging/opt/entangle/lib64
export PATH=$PATH:/build/entangle-base-stack/staging/opt/entangle/bin

Once the environment variables have been set run “make” from the Base Stack root directory. The build will configure and build the various subsystems (see COMPONENTS in the top-level Makefile)

Airwavz RedZone Receiver Support

The Base Stack distribution contains a skeleton for including the Airwavz RZR SDK 2.0 as part of its build, however you must obtain the SDK, populate the skeleton, and enable librzrsdk2 as part of the build.

You can obtain the SDK from https://redzonereceiver.tv.

Once you have obtained the SDK, populate the skeleton as follows:

      1. Place the following header files in the include directory:
          • alpparser.h
          • api_c.h
          • api.h
          • basebandparser.h
          • dll_public.h
          • props_api.h
          • redzone_c_api_defs.h
          • redzone_c_api.h
          • redzone_c_vdev_api.h
          • rzr_atsc3_enum.h
      2. Place the following shared library files in lib directory (you may need to
        create the directory first):

          • libredzone_api.so
          • libredzone_c_api.so
          • libRedZoneATSC3Parsers.so
          • libredzone_c_vdev_api.so

Enable the librzrsdk2 in the top-level Makefile by changing the line

ENABLE_RZR := no

to

ENABLE_RZR := yes

Alternately set ENABLE_RZR in the environment, for example

ENABLE_RZR=yes make -f Makefile
SIlicondust HDHomerun Support

The Base Stack distribution includes a version of the SiliconDust libhdhomerun library which has been modified to create MPEG2-TS enatsc3cap capture files (for ATSC 1.0 sources), provide additional statistics, and improve performance through the use of locked memory and realtime CPU scheduling.

The version of the library incorporated is libhdhomerun_20200907. The source tarball as it was obtained from SiliconDust’s web site can be found on the Releases page.

Changes made by Koherence, LLC can be identified by blocks of code delimited by

#ifdef ENTANGLE
...
#endif

The Silicondust libhdhomeun library is copyright Silicondust USA, Inc, distributed under the GNU Lesser General Public License 2.1. Please refer to the license for use and distribution restrictions and requirements.

By default HDHomerun support is disabled in the Base Stack build. To enable HDHomerun support change the following line in the top-level Makefile from

ENABLE_HDHR : = no

to

ENABLE_HDHR := yes

Alternately set ENABLE_HDHR in the environment, for example

ENABLE_HDHR=yes make -f Makefile