Building LibBSD for RTEMS using Waf
Welcome to building LibBSD for RTEMS using Waf. This package is a library containing various parts of the FreeBSD kernel ported to RTEMS. The library replaces the networking port of FreeBSD in the RTEMS kernel sources.
The following instructions show you how to build and install RTEMS Tools and RTEMS kernel for your BSP in separate paths. The Waf build support for RTEMS requires you provide your BSP name as an architecture and BSP pair.
We will build an Xilinx Zynq QEMU BSP using the arm/xilinx_zynq_a9_qemu.
1. Create a sandbox directory
2. Clone the repositories:
3. Build and install the tools:
4. Bootstrap the RTEMS sources:
5. Build and install the RTEMS Board Support Packages (BSP) you want to use:
6. Populate the rtems_waf git submodule. Note, make sure you specify ‘rtems_waf’ or the FreeBSD kernel source will be cloned:
7. Run Waf’s configure with your specific settings. In this case the path to the tools and RTEMS are provided on the command line and so do not need to be in your path or environment. You can use ‘–rtems-archs=arm,sparc,i386’ or ‘–rtems-bsps=arm/xilinx_zynq_a9_qemu,sparc/sis,i386/pc586’ to build for more than BSP at a time.
8. Build and install:
9. Run the tests on QEMU, for example:
Qemu and Networking
You can use the Qemu simulator to run a LibBSD based application and connect it to a virtual network on your host. You have to create a TAP virtual Ethernet interface for this:
You can show the interface state with the following command:
You may have to assign the interface to a firewall zone.
The Qemu command line varies by board support package, here is an example for the arm/xilinx_zynq_a9_qemu BSP:
After some seconds it will acquire a IPv4 link-local address, e.g.
You can connect to the target via telnet for example:
If you get the above output “Connected 169.254.159.156” then you have successfully connected the host to the target.