Dev doc index Buy

BuildRoot-at91 2020.02

BuildRoot is a set of makefiles and patches that makes it easy to generate a complete and very small Embedded Linux System. It can generate any or all of a cross-compilation toolchain, a root filesystem, a kernel image and a bootloader image.

This article il just the Acme Systems version of the original article published by Microchip on https://www.linux4sam.org/bin/view/Linux4SAM/BuildRoot tested on a RoadRunner SOM and a Berta D2 dev board

Notes

  • This procedure was tested using a Linux PC with Ubuntu 18.04.4 64bit to cross compile the buildroot image
  • It is advisable to have a Debug Port Interface or another serial adapter

Building procedure

Install the mandatory package listed here:

Download BuildRoot and the Microchip external package from these repositories on GitHub:

git clone https://github.com/linux4sam/buildroot-at91.git
git clone https://github.com/linux4sam/buildroot-external-microchip.git

Select the right versions:

cd buildroot-external-microchip
git checkout linux4sam_6.2 -b buildroot-external-microchip-linux4sam_6.2
cd ../buildroot-at91
git checkout linux4sam_6.2 -b buildroot-at91-linux4sam_6.2

Download this patch file from GitHub:

wget https://raw.githubusercontent.com/AcmeSystems/acmepatches/master/buildroot-at91-2020.02.patch

and apply it by typing:

patch -p1 < buildroot-at91-2020.02.patch

Select the configuration

make acme-bertad2_defconfig

Compile

make

This operation will take about 1 hour to download and compile any source of any part of your Linux distribution.

If everything goes well you will obtain these binary files in output/images directory:

boot.bin
at91-sama5d2_roadrunner.dtb
zImage
rootfs.tar

Create two partitions on microSD using gparted:

| Type  | Label  | Size  |
+-------+--------+-------+
| fat32 | boot   | >8MB  |   
| ext4  | rootfs | >70MB |

and copy the binaries by typing these commands:

cp boot.bin /media/$USER/boot
cp at91-sama5d2_roadrunner.dtb /media/$USER/boot/acme-roadrunner.dtb
cp zImage /media/$USER/boot
sudo tar xvf output/images/rootfs.tar -C /media/$USER/rootfs

Unmount the microSD and boot.

At login and password prompt type:

  • login: root
  • password: acmesystems

Related links

Buildroot pills

Rebuild Linux Kernel

make linux-dirclean
make linux-rebuild

Dev doc index Buy

Bruna Mandolino