build-at91bootstrap-sama7d65

Last modified by Microchip on 2025/07/17 12:13

This section describes how to get source code from the git repository, how to configure with the default configuration, how to customize AT91Bootstrap based on the default configuration and finally to build AT91Bootstrap to produce the binary. take the default configuration to download U-Boot from !NandFlash for example.

SAM-BA tool

SAM-BA tool is required to add a header in at91bootstrap image (for both manual compilation and
through build-systems like Buildroot or Yocto Project). Download SAM-BA software with the following link:
https://github.com/atmelcorp/sam-ba/releases/tag/v3.8

Uncompress the tgz file in your workspace with:

$ tar xvzf sam-ba_v3.9.1-linux_x86_64.tar.gz

Make sure to add the sam-ba application to your $PATH and verify that you have the correct
version:

$ sam-ba -v
SAM-BA Command Line Interface Tool v3.9.1 (linux - x86_64-little_endian-lp64)
Copyright 2025 Microchip Technology
Information

Note: this tool was tested with distribution Ubuntu 22.04 onward.
It is known to not work on Ubuntu 20.04 and previous ones, generating such kind of issues:

sam-ba: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by sam-ba)

Get AT91Bootstrap Source Code

You can easily download !AT91Bootstrap source code on the [[https://github.com/linux4sam/at91bootstrap][at91bootstrap]] git repository.<br>

To get the source code, you should clone the repository by doing:

$ git clone https://github.com/linux4sam/at91bootstrap.git
Cloning into 'at91bootstrap'...
remote: Enumerating objects: 17621, done.
remote: Counting objects: 100% (3324/3324), done.
remote: Compressing objects: 100% (1029/1029), done.
remote: Total 17621 (delta 2465), reused 3102 (delta 2285), pack-reused 14297
Receiving objects: 100% (17621/17621), 5.65 MiB | 4.65 MiB/s, done.
Resolving deltas: 100% (13459/13459), done.
$ cd at91bootstrap/

Configure AT91Bootstrap

Customize AT91Bootstrap

If the default configuration doesn't meet your need, after configuring with the default configuration, you can customize it by doing:

$ make menuconfig

Now, in the menuconfig dialog,  you can easily add or remove some features to/from !AT91Bootstrap as the same way as kernel configuration.
Move to <Exit> with arrows and press this button hitting the Enter key to exit from this screen.

Build AT91Bootstrap

Then you can build the !AT91Bootstrap binary by doing:

$ make

If the building process is successful, the final .bin image is build/binaries/boot-plaintextimg.bin.
The boot-plaintextimg.bin, is the boot format to be used for booting the sama7d65 !SoC.

Warning

Warning:this boot-plaintextimg.bin file name is different from the preceding !SoC in the Microchip MPU family, pay attention to that while re-building !AT91Bootstrap.