Compiling AT91bootstrap 4.0.4

AT91bootstrap is the 2nd level bootloader used by the Microchip ARM MPUs to initializate the internal hardware (clocks, peripherals, DDR DRAM, etc) at startup and load the Linux Kernel image from the first microSD partition. This article illustrates how to compile at91bootstrap for the RoadRunner module

Toolchain installation

First of all you need to install the toolchain (cross compiler, linker, etc) on your Linux Ubuntu PC following this article (tested on Ubuntu 18.04.4 LTS):

Download the sources from Microchip GitHub repository

wget https://github.com/linux4sam/at91bootstrap/archive/refs/tags/v4.0.4.zip
unzip v4.0.4.zip
cd at91bootstrap-4.0.4

Download and apply the Acme patches

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

Roadrunner

make roadrunner_defconfig

Acqua

make acqua_defconfig

Source compiling

To compile at91bootstrap type:

make CROSS_COMPILE=arm-linux-gnueabihf-

it will generate a binary file in build/binaries directory called __boot.bin_.

Copy boot.bin on a bootable MicroSD

Insert a microSD on your Linux PC and type:

cp build/binaries/boot.bin /media/$USER/boot

Be sure that PA30 (MMC1 CD) is wired on GND.

File used

Links

Sergio Tanzilli
Systems designer, webmaster of www.acmesystems.it and founder of Acme Systems srl

Personal email: tanzilli@acmesystems.it
Web pages: https://www.acmesystems.it --- https://www.acmestudio.it
Github repositories: https://github.com/tanzilli --- https://github.com/acmesystems
Telegram group dedicated to the Acme Systems boards: https://t.me/acmesystemssrl