Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.96 KB

linux-setup.rst

File metadata and controls

68 lines (47 loc) · 1.96 KB

Linux Software Requirements

This document describes the common software requirements that a Linux machine requires in order to connect to Greybus devices.

Recommended Linux Distribution

The recommended Linux distribution for evaluating Greybus is Ubuntu Focal Fossa (as of December, 2020) primarily because it already includes most of the required Linux kernel modules and configuration.

If running Ubuntu natively is not an option, an alternative solution is to run it inside of a virtual machine such as Qemu or VirtualBox.

Greybus Linux Kernel Modules

First, the main Greybus kernel modules will need to be added to the running Linux kernel.

MODULES=$(ls /lib/modules/$(uname -r)/kernel/drivers/staging/greybus)
for m in ${MODULES//.ko/}; do
    sudo modprobe $m
done

The gb-netlink Kernel Module

Next, clone and build Greybus, and insert the gb-netlink kernel module into the running Linux kernel.

git clone -b gb_netlink https://github.com/cfriedt/gb-netlink.git
cd gb-netlink
make -j$(nproc --all)
sudo insmod gb-netlink.ko

Gbridge

The final component required is Gbridge so clone and build that.

This step assumes that the gb-netlink directory is in the present working directory.

git clone https://github.com/cfriedt/gbridge.git
cd gbridge
autoreconf -vfi
GBDIR="$PWD/../gb-netlink" ./configure --disable-bluetooth --enable-tcpip --enable-uart --enable-netlink --disable-gbsim
make -j$(nproc --all)

Finally, start gbridge to begin using Greybus!

./gbridge