Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Building the Demo App
The easiest way to get started with SDKLT is to build the demo app.
The demo app supports the following build targets:
native_thsim, using the local host with XGSSIM as a simulated Tomahawk device.
xlr_linux, a remote x86 host (Broadcom XLR Silicon Validation Kit) with a physical Tomahawk switch device.
Note that native_thsim is the default build target.
See Build Environment for details on configuring your build environment.
Local Host (native_thsim) Build
The local host target native_thsim will use XGSSIM as a simulated Tomahawk device running on your local machine. This is the default build target.
cd $SDK/appl/demo make -s
Alternatively, the build target can be specified using TARGET_PLATFORM, i.e.
make -s TARGET_PLATFORM=native_thsim
Once the build is complete, the demo app named sdklt will be available in the $SDK/appl/demo/build/native_thsim directory.
Invoke sdklt and refer to the CLI Reference Guide to get familiarized with using the CLI shell.
XLR SVK (xlr_linux) Build
The platform target xlr_linux is used for a physical Tomahawk switch device connected to an x86-based Broadcom XLR Silicon Validation Kit (SVK).
The XLR SVK is needed in order to correctly invoke all of the example scripts in $SDKLT/examples/bcm56960_a0/cli as they depend on a functional pipeline and packet I/O capability.
Before you invoke this build target you must configure your environment to point to the XLR cross-compiler tool chain and the Linux source tree that matches the kernel installed on the XLR CPU board.
export KDIR=<linux-kernel-sources> export TOOLCHAIN_DIR=<toolchain-basedir>
You can inspect $SDK/appl/make/xlr_linux.mk file to get a better idea about how these environment variables are used.
cd $SDK/appl/demo make -s TARGET_PLATFORM=xlr_linux
In addition to the main application, this target also builds two Linux kernel modules (linux_ngbde.ko and linux_ngknet.ko), which must be copied to the same target directory as the main application.
Using the example scripts with the xlr_linux build target
Copy the port configuration YAML file ($SDKLT/examples/bcm56960_a0/config/BCM56960K-56960_A0-32x40.config.yml) to the $SDK/appl/demo/build/xlr_linux directory.
Optionally copy the desired example CLI scripts from $SDKLT/examples/bcm56960_a0/cli to the $SDK/appl/demo/build/xlr_linux directory.
Invoke the demo app from the build directory $SDK/appl/demo/build/xlr_linux as follows:
./sdklt -y BCM56960K-56960_A0-32x40.config.yml
Note you will see the following warning message if the demo app was built without YAML support.
bcmcfg/yaml/null/bcmcfg_read_null.c:113 bcmcfg_file_parse(): Warn: Feature unavailable
Once in the demo application, invoke the example CLI script as follows:
Building the demo application without LibYAML support
Note that if you didn't install LibYAML on your build system, the demo app can still be built using the NO_YAML=1 option:
make -s NO_YAML=1 TARGET_PLATFORM=native_thsim