This repository contains everything that is necessary to run an RTEMS application on the Beagle Bone Black. It includes the libbsd for USB, SD and WiFi support.
Currently supported WiFi adapters are the RT8188EU and RT8188CUS based ones.
Building was tested on Arch GNU/Linux and OpenSUSE GNU/Linux.
This repository is heavily based on the build scripts for GRiSP - a project that runs a Erlang VM on RTEMS. See the grisp-software repository for the original scripts.
Note that a lot of hardware support for the Beagle Bone Black has been done during GSoC. A lot of thanks to the students offering their time for RTEMS. Related projects from the last years are the one from Punit Vara (GSoC 2016) and Sichen Zhao (GSoC2017).
This repository is organized as follows:
-
apps
: Various RTEMS applications. -
build
: Scripts that help building RTEMS and all tools. -
Datasheets
: Datasheets that are used during development. -
debug
: Scripts to start a debugger. Currently only Segger is supported. -
libs
: Libraries like RTEMS or libbsd. -
tools
: Tools and other stuff that is generally useful (for example for generating a SD card image) -
install
(generated): All tools and libraries will be installed in this folder.
To build all necessary tools and libraries just call ./build/build.sh
. This
will install all that is necessary to build an application into the install
folder.
Note that if you have problems building U-Boot and there are errors of
redefinitions of a lot of *fdt*
symbols, you most likely have a problem that
some system include files collide with the ones expected by U-Boot. I had to
uninstall my system dtc
to solve that issue.
After building the toolchain, you can build the WiFi sample application. To do
that, change into the apps/wifi-sample
directory and call make
.
You’ll get a b-beagleboneblack/wifi-sample_sdcard.img
that can be written to a
SD-Card using dd
or some similar tool. Mount the SD card on your computer and
create a wpa_supplicant.conf
in the root directory of the SD. An example can
be found in wifi-sample/wpa_supplicant.conf
.
After that you can just put the SD-Card into a BBB (with recent U-Boot), connect
a RT8188EU based USB WiFi dongle and boot the system. There will be a shell on
the serial port of the
BBB. After the connection is established (take a look whether you got an IP via
DHCP with ifconfig
) you can start an ftp-server using the startftp
command
and do some file transfers.
There are multiple possible boot methods
If you flashed a recent (> about 2017) version of the official Debian Linux
image your board will have an U-Boot in the eMMC that reads the uEnv.txt from
the SD card (if available) and execute the commands from it. The image generated
by build/create-sdcardimage.sh
contains all necessary files for that. You can
also copy the files to any other FAT formatted SD card in that case.
Alternatively you can use the U-Boot build by build/build-u-boot.sh
. Again:
Everything that is necessary is already on the image generated by
build/create-sdcardimage.sh
. To use that U-Boot either press the "S2" button
of the BBB during power up or erase the eMMC. In both cases the SD card will be
used for boot.