# BuildRoot 2021.02.6 + Linux 4.19.x on Aria G25

<abstract>
This article explains how to prepare a Buildroot distribution for Aria G25
</abstract>

##Building procedure

On your Linux PC move inside your home directory and download the BuildRoot version 2021.02.5
tested on this article by typing:

	wget https://buildroot.org/downloads/buildroot-2021.02.6.tar.bz2

Uncompress and move inside the new directory:

	tar xjvf buildroot-2021.02.6.tar.bz2
	cd buildroot-2021.02.6

Download our patch file to add the file requested by Aria G25:

<a class="btn btn-primary" href="./acme.patch">
acme.patch
</a>

and apply it by typing:

	patch -p1 < acme.patch

Select the Aria G25 minimal configuration:

	make aria_defconfig

If you want to change something of the basic BuildRoot configuration 
(like adding packages) type:

	make menuconfig

Save and exit from the configuration menu and launch the BuildRoot compilation.
 
This operation will take about 1 hour to download and compile any 
source of any part of your Linux distribution. 

	make

If everything goes well you will obtain these binary files in __output/images__ directory:

* The bootloader image: __at91sam9x5_aria-sdcardboot-linux-zimage-dt-3.7.bin__ 
* The Linux Kernel image: __zImage__
* The device tree blob file: __aria.dtb__  
* The whole root file system contents: __rootfs.tar__ 

Insert a microSD formated in this way using gparted:

* a first fat16 or fat32 partition (>6 MB) labeled __boot__
* a second ext4 partition (>32 MB) labeled __rootfs__

Copy the files generated renaming some of them in this way:

<pre class="minicom">
<b>cp output/images/at91sam9x5_aria-sdcardboot-linux-zimage-dt-3.7.bin /media/$USER/boot/boot.bin</b>
<b>cp output/images/aria.dtb /media/$USER/boot/at91-ariag25.dtb</b>
<b>cp output/images/zImage /media/$USER/boot</b>
<b>sudo tar xvf output/images/rootfs.tar -C /media/$USER/rootfs</b>
</pre>

Unmount the microSD and boot on your Aria. It will take about 2 minutes the first time 
to calculate the openssh keys. The next boots it will take just 5 secs.

At login:

* login: __root__
* password: __acmesystems__

##Related links

* [The BuildRoot user manual](http://buildroot.uclibc.org/downloads/manual/manual.html)
* [BuildRoot web page](http://www.buildroot.net/)
* [BuildRoot G+ page](https://plus.google.com/100084591154899263420/posts)
* [Browseable BuildRoot repository](http://git.buildroot.net/buildroot)
* [Appfruits GitHub Project - Buildroot on Acqua A5](https://github.com/appfruits/buildroot-boards)

