config-cross-recipe.sh
Helper script to configure CMake to cross-compile P4 Control Plane for the Arm Compute Complex (ACC).
Build flow
The config-cross-recipe.sh script is run after make-cross-ovs.sh,
to configure the remainder of the P4 Control Plane build.
After running this script, you will need to issue a separate command to build and install the software. For example:
cmake --build build -j8 --target install
Syntax
./scripts/es2k/config-cross-recipe.sh \
[--help|-h] \
[--dry-run|-n] \
[--build=BLDDIR | -B BLDDIR] \
[--deps=DEPS | -D DEPS] \
[--host=HOSTDEPS | -H HOSTDEPS] \
[--ovs=OVS | -O OVS] \
[--prefix=PREFIX | -P PREFIX] \
[--sde=SDE | -S SDE] \
[--toolchain=TOOLFILE | -T TOOLFILE ] \
[--no-krnlmon] \
[--no-ovs]
Command-line parameters
General
--dry-run,-nDisplays the parameters that will be passed to CMake, and exits.
--help,-hDisplays usage information and exits.
Host paths
--build=BLDDIR,-B BLDDIRDirectory that CMake will use to perform the build. Will be created if it does not exist.
Specifies the value of the
-BCMake option. Can be used to create separate build directories for native and cross-compiled builds. Defaults tobuild.--host=HOST,-H HOSTDirectory in which the Stratum dependencies for the development system are installed.
Used to compile Protobufs to C++ during cross-compilation. Supplies the value of the
HOST_DEPEND_DIRlistfile variable. Defaults to the value of theHOST_INSTALLenvironment variable, if defined. Otherwise, defaults tosetup/hostdeps.--toolchain=FILE,-T FILEPath to the CMake toolchain file.
Specifies the value of the
CMAKE_TOOLCHAIN_FILEvariable. Defaults to the value of theCMAKE_TOOLCHAIN_FILEenvironment variable.
Target paths
--deps=DEPS,-D DEPS(see note)Directory in which the Stratum dependencies for the runtime system are installed.
P4 Control Plane will be linked with these libraries. Supplies the value of the
DEPEND_INSTALL_DIRlistfile variable. Defaults to the value of theDEPEND_INSTALLenvironment variable, if defined. Otherwise, defaults to//opt/deps.--ovs=OVS,-O OVS(see note)Directory in which Open vSwitch is installed.
May be omitted if the
--no-ovsoption is specified. Supplies the value of theOVS_INSTALL_DIRlistfile variable for the P4 Control Plane build. May be the same as theprefixdirectory, in which case OVS and P4 Control Plane will be installed to the same directory tree. Defaults to the value of theOVS_INSTALLenvironment variable, if defined. Otherwise, defaults to//opt/ovs.--prefix=PREFIX,-P PREFIX(see note)Directory in which P4 Control Plane will be installed. Will be created if it does not exist.
May be the same as the
--ovsoption, in which case OVS and P4 Control Plane will be installed to the same directory tree. Specifies the value of theCMAKE_INSTALL_PREFIXvariable when building P4 Control Plane.--sde=SDE,-S SDE(see note)Directory in which the SDK for the Intel® IPU E2100 is installed.
Supplies the value of the
SDE_INSTALL_DIRlistfile variable. Defaults to the value of theSDE_INSTALLenvironment variable, if defined. Otherwise, defaults to//opt/p4sde.
Note
// at the beginning of the directory path will be replaced with
the sysroot directory path.
Options
--no-krnlmonExcludes the Kernel Monitor from the build.
Sets the
WITH_KRNLMONlistfile option to FALSE.--no-ovsExcludes OVS from the build.
Sets the
WITH_OVSP4RTlistfile option to FALSE.
Environment variables
CMAKE_TOOLCHAIN_FILEPath to the CMake toolchain file to be used. Specifies the value of the
CMAKE_TOOLCHAIN_FILEvariable. May be overridden by--toolchain=TOOLFILE. Must be defined.DEPEND_INSTALLDirectory in which the Stratum dependencies for the runtime system are installed. Supplies the default value of the
--depsoption.HOST_INSTALLDirectory in which the Stratum dependencies for the development system are installed. Supplies the default value of the
--hostoption.OVS_INSTALLDirectory in which Open vSwitch is installed. Supplies the default value of the
--ovsoption.SDE_INSTALLDirectory in which the SDK for the IPU E2100 is installed. Supplies the default value of the
--sdeoption.SDKTARGETSYSROOTPath to the system root (sysroot) directory for the ARM Compute Complex (ACC) of the IPU E2100. Must be defined.