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:
- Create a temporary directory:TEMP_DIR=$(mktemp -d)
- Install ittapi:
- Clone the ittapi repository:cd ${TEMP_DIR} git clone -b v3.18.10 https://github.com/intel/ittapi
- Install build dependencies:sudo apt-get install cmake g++-multilib
- Build itt:cd ittapi python3 buildall.py
- 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 ../
- Install json-c:sudo apt-get install libjson-c-dev
- Install dependencies for host-side tools:The dependencies are required for the data streams optimizer, cache allocation capabilities, and to build samples.
- Install the pip tool for Python* 3 release:sudo apt-get install python3-pipSkip this step if you have already installed pip for the Python* 3 release.
- Install the msgfmt as part of gettext utilities:sudo apt-get install gettext
- Install the checkinstall package:sudo apt-get install checkinstall
- Go to the following directory:cd ${TCC_ROOT}/samples/plot_scripts
- Install the required Python* modules for samples:sudo -S pip3 install -r prerequisites.txt
- Go to the following directory:cd ${TCC_TOOLS_PATH}
- Install the required Python* modules for tools:sudo -S pip3 install -r prerequisites.txt
- Install Firmware and BIOS Utilities:rm -rf capsule git clone --depth 1 --branch v0.8.1 https://github.com/intel/iotg-fbu capsule/uefi sudo chmod -R a+rx capsule cd ${TCC_TOOLS_PATH}/capsule/uefi pip3 install -r requirements.txt
- Install Slim Bootloader toolscd ${TCC_TOOLS_PATH}/capsule rm -rf sbl git clone https://github.com/slimbootloader/slimbootloader.git sbl chmod -R a+rx sbl
- 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 -sha384Slim Bootloader tools requires several keys for the Slim Bootloader creation. See SBL Keys Generation for details on keys generation.Intel® TCC Tools looks for your keys in the default location of$TOOLS_PATH/keys/sbl. You can copy your keys into that default location, or change the scripts to search for keys in a different location. See Capsule Create Script for an example.
- Install python3-sphinx and libelf-dev libraries:sudo apt-get install python3-sphinx libelf-dev
- Go to the following directory:cd ${TEMP_DIR}
- 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
- Clone the libbpf project:cd ${TEMP_DIR} git clone https://github.com/libbpf/libbpf.git
- Go to the libbpf directory:cd libbpf
- Check out the required version of libbpf:git checkout ab067ed3710550c6d1b127aac6437f96f8f99447
- 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
- Go to the libbpf source directory:cd src
- Make the libbpf library:make
- 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/
- Clone the Open62541 library:cd ${TEMP_DIR} git clone https://github.com/open62541/open62541.git
- Go to the Open62541 directory:cd open62541/
- Check out the required version of Open62541:git checkout a77b20ff940115266200d31d30d3290d6f2d57bd
- Apply the XDP patches to Open62541:git apply ../iotg-yocto-ese-main/recipes-connectivity/open62541/open62541-iotg/0001-CMakeLists.txt-Mark-as-IOTG-fork.patch 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
- Create the build directory and go into the build directory:mkdir build && cd build
- 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/ ..
- Install the Open62541 library:sudo checkinstall -D --pkgname=open62541-iotg -y
- Set permissions for the tools directory:chmod 0776 -R ${TCC_TOOLS_PATH}