# Building Kubos Linux for the ISIS-OBC¶

## Overview¶

This supplementary document covers specific features and components of Kubos Linux for the ISIS-OBC.

The Kubos Linux Overview doc covers the major components of Kubos Linux.

Additionally, this document covers the steps required in order to build Kubos Linux.

## Reference Documents¶

### iOBC Documentation¶

The ISIS-OBC Quickstart Guide should have been packaged with the iOBC and is a useful document for learning what each of the hardware components are, how to connect them, and what drivers need to be installed to support them.

## Software Components¶

The ISIS bootloader lives in the very beginning of the NOR flash. It should come pre-loaded on the board and should not need to be modified. It initializes the memory hardware and then copies U-Boot into the SDRAM and starts its execution.

If for some reason this bootloader needs to be reloaded, the relevant instructions can be found in section 8.1 of the ISIS-OBC Quickstart Guide.

### SAM-BA¶

Product Page

The software tool used to program the iOBC’s NOR flash storage area.

Note

The ISIS-OBC SDK includes the SAM-BA application. You should install this version, rather than the default Atmel version, since it is packaged with several iOBC configuration files which are required to successfully connect to the board.

## Kubos Linux Build Process¶

If for some reason you want or need to modify and rebuild the Kubos Linux components, follow the steps in this section.

### Build the OS Files¶

Warning

The OS files cannot be built using a synced folder in a Vagrant box (or regular VM). VirtualBox does not support hard links in shared folders, which are crucial in order to complete the build.

SSH into a Kubos SDK box

In order to build Kubos Linux, two components are needed:

These components should be setup as children of the same parent directory. There are several commands and variables in the build process which use relative file paths to navigate between the components.

After the environment has been set up, all build commands will be run from the BuildRoot directory unless otherwise stated.

To set up a build environment and build Kubos Linux:

Create a new parent folder to contain the build environment

$mkdir kubos-linux  Enter the new folder $ cd kubos-linux


Download BuildRoot-2017.02 (more current versions of BuildRoot may work as well, but all testing has been done against 2017.02)

Note

All Kubos documentation will refer to v2017.02.8, which is the latest version of the LTS release at the time of this writing.

$wget https://buildroot.uclibc.org/downloads/buildroot-2017.02.8.tar.gz && tar xvzf buildroot-2017.02.8.tar.gz && rm buildroot-2017.02.8.tar.gz  Pull the kubos-linux-build repo $ git clone http://github.com/kubos/kubos-linux-build


Move into the buildroot directory

$cd buildroot-2017.02.8  Point BuildRoot to the external kubos-linux-build folder and tell it to build the iOBC. Note You will need to build with sudo if you are using the default iOBC configuration, since it points the output toolchain to “/usr/bin/iobc_toolchain”, which is a protected directory. $ sudo make BR2_EXTERNAL=../kubos-linux-build at91sam9g20isis_defconfig


Build everything