# Compile from scratch Buildroot 2022.02.9 for Roadrunner

<abstract>
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation 
</abstract>

* <a href="https://buildroot.org/" target="_new">Buildroot home page</a>
* <a href="https://www.linux4sam.org/bin/view/Linux4SAM/BuildRoot" target="_new">Microchip page on Buildroot</a>

<img src="./roadrunner_buildroot_tux.png"/>

This article illustrates how to generate a ready-to-use microSD image 
from scratch using the Buildroot scripts and utilities to download 
the sources of any code, compile them and generate a fully working bootable microSD.

The version used are:

* At91Boostrap version 4.0.4
* Linux Kernel 5.15.86
* Buildroot 2022.02.9

The article steps has been tested using a Linux PC with Linux Debian 10.

It is advisable to have a [Debug Port Interface](/DPI) or an [USB to 3V TTL serial cable](/USB-3V-SER).

## Building procedure

Install on your Linux PC the requested packages listed here:

* <http://buildroot.uclibc.org/downloads/manual/manual.html#requirement-mandatory>

Open a command line terminal and download Buildroot from the official web site:

	wget https://buildroot.org/downloads/buildroot-2022.02.9.tar.gz
	tar -xvf buildroot-2022.02.9.tar.gz
	cd buildroot-2022.02.9
	
Download and apply the Acme Systems patch: 

	wget https://www.acmesystems.it/www/roadrunner_buildroot/acme.patch
	patch -p1 < acme.patch

select the Roadrunner configuration for Buildroot by typing:

	make acmesystems_roadrunner_defconfig
	
Launch the compilation:

	make

This operation will take about 1 hour to download and compile any sources. 

If all went well you will obtain this file in <code>output/images</code> directory:

	sdcard.img

Download and install the free tool [Balena Etcher](https://www.balena.io/etcher/) available for any platform to write the microSD using the 
<code>sdcard.img</code> generated:

* <https://www.balena.io/etcher/>

Insert the microSD generated in your Berta D2 board and use the debug port to check the boot messages and get the 
access to the Linux prompt.

## How to install new packages

To install new packages from the menuconfig menu type:

	make menuconfig
	
Then repeat the procedure to generate the new microSD image from <code>Make</code> command.

<br>

@include='bio_tanzilli'


