Developer Guide

  • 2021.2
  • 06/11/2021
  • Public
Contents

Install Host Dependencies Manually

Default Setup describes how to use
install_host_dependencies.sh
to install all host dependencies. You can customize your setup by manually installing only the components you need.
The following list contains dependencies needed to use Intel® TCC Tools on your host system:
  • ittapi (for applications using the measurement library and measurement library build)
  • g++-multilib (for ittapi as build dependencies, verified on version 4:9.3.0-1ubuntu2)
  • cmake (for application build, verified on version 3.16.3.-1ubuntu1)
  • json-c (for the cache allocation library build, verified on version 0.13.1+dfsg-7ubuntu0.3)
  • python3-pip (for the data streams optimizer and cache allocation capabilities, verified on version 20.0.2-5ubuntu1.1)
  • msgfmt (for data streams optimizer and cache configurator, verified on version 0.19.8.1-10build1)
  • checkinstall (required for libbpf and open62541 installation)
  • python modules for samples (modules listed in
    ${TCC_ROOT}/samples/plot_scripts/prerequisites.txt
    )
  • python modules for data streams optimizer and cache configurator (modules listed in
    ${TCC_TOOLS_PATH}/prerequisites.txt
    )
  • Firmware and BIOS Utilities located in the GitHub* software development platform (for data streams optimizer and cache configurator demo)
  • Test certificates (for data streams optimizer and cache configurator demo)
  • python3-sphinx (required for building eXpress Data Path, XDP, supporting libraries)
  • libelf-dev library (for XDP libraries support)
  • libbpf library (for XDP libraries support)
  • Open62541 library (for real-time communication demo support)
The following steps show how to install each dependency manually to customize your setup:
  1. Create a temporary directory:
    TEMP_DIR=$(mktemp -d)
  2. Install ittapi:
    1. Clone the ittapi repository:
      cd ${TEMP_DIR} git clone -b v3.18.10 https://github.com/intel/ittapi
    2. Install build dependencies:
      sudo apt-get install cmake g++-multilib
    3. Build itt:
      cd ittapi python3 buildall.py
    4. Copy itt parts to system folders:
      sudo cp build_linux/64/bin/libittnotify.a /usr/lib sudo cp -r include /usr/include/ittnotify sudo cp src/ittnotify/*.h /usr/include/ittnotify/ sudo rm -r /usr/include/ittnotify/fortran/win32 sudo rm -r /usr/include/ittnotify/fortran/posix/x86 cd ../
  3. Install json-c:
    sudo apt-get install libjson-c-dev
  4. Install dependencies for host-side tools:
    The dependencies are required for the data streams optimizer, cache allocation capabilities, and to build samples.
    1. Install the pip tool for Python* 3 release:
      sudo apt-get install python3-pip
      Skip this step if you have already installed pip for the Python* 3 release.
    2. Install the msgfmt as part of gettext utilities:
      sudo apt-get install gettext
    3. Install the checkinstall package:
      sudo apt-get install checkinstall
    4. Go to the following directory:
      cd ${TCC_ROOT}/samples/plot_scripts
    5. Install the required Python* modules for samples:
      sudo -S pip3 install -r prerequisites.txt
    6. Go to the following directory:
      cd ${TCC_TOOLS_PATH}
    7. Install the required Python* modules for tools:
      sudo -S pip3 install -r prerequisites.txt
    8. Install Firmware and BIOS Utilities v0.7.7:
      rm -rf capsule git clone --depth 1 --branch v0.7.7 https://github.com/intel/iotg-fbu capsule/uefi sudo chmod -R a+rx capsule
    9. Provision certificates/public key:
      The Firmware and BIOS Utilities software requires certificates or Rivest–Shamir–Adleman (RSA) signing key pair during capsule file generation. RSA signing keys are required to sign and authenticate the Intel® TCC subregion, and a certificate is needed to sign the capsule. Intel recommends that you generate your own certificates/RSA key pair for capsule and subregion signing and work with your BIOS vendor to enroll them into the BIOS. For details about the signing and enrolling mechanism, see the white paper Intel® Time Coordinated Computing (Intel® TCC) Security for UEFI BIOS. For test purposes, you can download testing certificates for capsule signing from the EDK2 repository. You also need to generate test RSA keys. Run the following command:
      cd ${TCC_TOOLS_PATH} mkdir ./keys/uefi openssl req -new -x509 -newkey rsa:3072 -subj "/CN=Secure_b=Boot_test/" -keyout ./keys/uefi/Signing.key -out ./keys/uefi/Signing.crt -days 365 -nodes -sha384
    10. Install python3-sphinx and libelf-dev libraries:
      sudo apt-get install python3-sphinx libelf-dev
    11. Go to the following directory:
      cd ${TEMP_DIR}
    12. Clone the Yocto Project*-based BSP layer with patches, which you will need later.
      git clone https://github.com/intel/iotg-yocto-ese-main.git cd iotg-yocto-ese-main git checkout 56aceb22632b9451c991529889f8c90def22153e
    13. Clone the libbpf project:
      cd ${TEMP_DIR} git clone https://github.com/libbpf/libbpf.git
    14. Go to the libbpf directory:
      cd libbpf
    15. Check out the required version of libbpf:
      git checkout ab067ed3710550c6d1b127aac6437f96f8f99447
    16. Apply the patches from the Yocto Project*-based BSP layer:
      git apply ../iotg-yocto-ese-main/backports/dunfell/recipes-connectivity/libbpf/libbpf/0001-libbpf-add-txtime-field-in-xdp_desc-struct.patch git apply ../iotg-yocto-ese-main/backports/dunfell/recipes-connectivity/libbpf/libbpf/0002-makefile-don-t-preserve-ownership-when-installing-fr.patch git apply ../iotg-yocto-ese-main/backports/dunfell/recipes-connectivity/libbpf/libbpf/0003-makefile-remove-check-for-reallocarray.patch
    17. Go to the libbpf source directory:
      cd src
    18. Make the libbpf library:
      make
    19. Install the libbpf library and copy required headers:
      sudo checkinstall -D --pkgname=libbpf -y sudo make install_uapi_headers cd .. sudo -S cp ./include/uapi/linux/*.h /usr/include/linux/
    20. Clone the Open62541 library:
      cd ${TEMP_DIR} git clone https://github.com/open62541/open62541.git
    21. Go to the Open62541 directory:
      cd open62541/
    22. Check out the required version of Open62541:
      git checkout a77b20ff940115266200d31d30d3290d6f2d57bd
    23. Apply the XDP patches to Open62541:
      git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0001-fix-PubSub-Enable-dynamic-compilation-of-pubsub-exam.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0002-feature-PubSub-Use-libbpf-for-AF_XDP-receive-update-.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0003-feature-PubSub-add-support-for-AF_XDP-transmission.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0004-fix-PubSub-XDP-dynamic-compilation.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0005-fix-PubSub-update-example-to-set-XDP-queue-flags.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0006-test-PubSub-Configuration-used-for-compile-test.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0007-feature-PubSub-Add-ETF-LaunchTime-support-for-XDP-tr.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0008-fix-PubSub-AF_XDP-RX-release-mechanism-AF_PACKET-com.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0009-fix-PubSub-Fix-ETF-XDP-plugin-buffer-overflow.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0010-fix-PubSub-xdp-socket-cleanup-routine.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0011-fix-PubSub-fix-null-checking-possible-memleak-klocwo.patch git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0012-fix-PubSub-remove-hardcoded-etf-layer-receive-timeou.patch
    24. Create the build directory and go into the build directory:
      mkdir build && cd build
    25. Build open62541:
      cmake -DUA_ENABLE_PUBSUB=ON -DUA_ENABLE_PUBSUB_ETH_UADP=ON -DUA_ENABLE_PUBSUB_ETH_UADP_ETF=ON -DUA_ENABLE_PUBSUB_ETH_UADP_XDP=ON -DUA_ENABLE_SUBSCRIPTIONS=ON -DUA_ENABLE_PUBSUB_SOCKET_PRIORITY=ON -DUA_ENABLE_PUBSUB_CUSTOM_PUBLISH_HANDLING=ON -DUA_ENABLE_PUBSUB_SOTXTIME=ON -DUA_ENABLE_SCHEDULED_SERVER=ON -DUA_BUILD_EXAMPLES=OFF -DUA_ENABLE_AMALGAMATION=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/ ..
    26. Install the Open62541 library:
      sudo checkinstall -D --pkgname=open62541-iotg -y
  5. Set permissions for the tools directory:
    chmod 0776 -R ${TCC_TOOLS_PATH}

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.