Dedicated page on U-Boot wiki:
http://www.denx.de/wiki/U-Boot/SourceCode
You can easily download U-Boot source code from
Linux4SAM GitHub U-Boot repository
:
- clone the Linux4sam GitHub U-Boot repository
$ git clone https://github.com/linux4sam/u-boot-at91.git
Cloning into 'u-boot-at91'...
remote: Enumerating objects: 824533, done.
remote: Counting objects: 100% (71919/71919), done.
remote: Compressing objects: 100% (15288/15288), done.
remote: Total 824533 (delta 56145), reused 71765 (delta 56072), pack-reused 752614
Receiving objects: 100% (824533/824533), 182.52 MiB | 3.67 MiB/s, done.
Resolving deltas: 100% (677649/677649), done.
Updating files: 100% (17753/17753), done.
$ cd u-boot-at91
Cross-compiling U-Boot - sam9x60 ek
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in nand flash:
sam9x60ek_nandflash_defconfig
# To put environment variables in SD/MMC card:
sam9x60ek_mmc_defconfig
# To put environment variables in qspi flash:
sam9x60ek_qspiflash_defconfig
Here are the building steps for the SAM9X60-EK board:
# You can change the config according to your needs.
make sam9x60ek_mmc_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d3xek
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in serial flash:
sama5d3xek_spiflash_defconfig
# To put environment variables in nandflash (default):
sama5d3xek_nandflash_defconfig
# To put environment variables in SD/MMC card:
sama5d3xek_mmc_defconfig
Here are the building steps for the SAMA5D3x-EK board:
# You can change the config according to your needs.
make sama5d3xek_nandflash_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d4ek
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in serial flash:
sama5d4ek_spiflash_defconfig
# To put environment variables in nandflash (default):
sama5d4ek_nandflash_defconfig
# To put environment variables in SD/MMC card:
sama5d4ek_mmc_defconfig
Here are the building steps for the SAMA5D4EK board:
# You can change the config according to your needs.
make sama5d4ek_nandflash_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d3_xplained
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in nandflash (default):
sama5d3_xplained_nandflash_defconfig
# To put environment variables in SD/MMC card:
sama5d3_xplained_mmc_defconfig
Here are the building steps for the SAMA5D3-Xplained board:
# You can change the config according to your needs.
make sama5d3_xplained_nandflash_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d4_xplained
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in serial flash:
sama5d4_xplained_spiflash_defconfig
# To put environment variables in nandflash (default):
sama5d4_xplained_nandflash_defconfig
# To put environment variables in SD/MMC card:
sama5d4_xplained_mmc_defconfig
Here are the building steps for the SAMA5D4-Xplained board:
# You can change the config according to your needs.
make sama5d4_xplained_nandflash_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d2_xplained
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in serial flash:
sama5d2_xplained_spiflash_defconfig
# To put environment variables in SD/MMC card:
sama5d2_xplained_mmc_defconfig
Here are the building steps for the SAMA5D2-Xplained board:
# You can change the config according to your needs.
make sama5d2_xplained_spiflash_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d27_som1_ek
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in quad-SPI serial flash:
sama5d27_som1_ek_qspiflash_defconfig
# To put environment variables in SD/MMC card:
sama5d27_som1_ek_mmc_defconfig
Here are the building steps for the SAMA5D27-SOM1-EK board:
# You can change the config according to your needs.
make sama5d27_som1_ek_mmc_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d27_wlsom1_ek
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in quad-SPI serial flash:
sama5d27_wlsom1_ek_qspiflash_defconfig
# To put environment variables in SD/MMC card:
sama5d27_wlsom1_ek_mmc_defconfig
Here are the building steps for the SAMA5D27-WLSOM1-EK board:
# You can change the config according to your needs.
make sama5d27_wlsom1_ek_mmc_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d2-icp
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in SD/MMC card:
sama5d2_icp_mmc_defconfig
Here are the building steps for the SAMA5D2-ICP board:
# You can change the config according to your needs.
make sama5d2_icp_mmc_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - sama5d2_ptc_ek
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in nand flash:
sama5d2_ptc_ek_nandflash_defconfig
# To put environment variables in SD/MMC card:
sama5d2_ptc_ek_mmc_defconfig
Here are the building steps for the SAMA5D2-PTC-EK board:
# You can change the config according to your needs.
make sama5d2_ptc_ek_mmc_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Cross-compiling U-Boot - at91sam9x5ek
Once the AT91 U-Boot sources available, cross-compile U-Boot is made in two steps: configuration and compiling. Check the
Configuration chapter
in U-Boot reference manual.

Go to the
configs/
to find the exact target when invoking
make.
The U-Boot environment variables can be stored in different media, above config files can specify where to store the U-Boot environment.
# To put environment variables in serial flash:
at91sam9x5ek_spiflash_defconfig
# To put environment variables in nandflash (default):
at91sam9x5ek_nandflash_defconfig
# To put environment variables in SD/MMC card:
at91sam9x5ek_mmc_defconfig
Here are the building steps for the AT91SAM9x5-EK board:
# You can change the config according to your needs.
make at91sam9x5ek_nandflash_defconfig
make
The result of these operations is a fresh U-Boot binary called
u-boot.bin
corresponding to the binary ELF file
u-boot
.
-
u-boot.bin
is the file you should store on the board
-
u-boot
is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.
Getting U-Boot sources
Dedicated page on U-Boot wiki:
http://www.denx.de/wiki/U-Boot/SourceCode
You can easily download U-Boot source code from
Linux4SAM GitHub U-Boot repository
:
- clone the Linux4sam GitHub U-Boot repository
$ git clone https://github.com/linux4sam/u-boot-at91.git
Cloning into 'u-boot-at91'...
remote: Enumerating objects: 824533, done.
remote: Counting objects: 100% (71919/71919), done.
remote: Compressing objects: 100% (15288/15288), done.
remote: Total 824533 (delta 56145), reused 71765 (delta 56072), pack-reused 752614
Receiving objects: 100% (824533/824533), 182.52 MiB | 3.67 MiB/s, done.
Resolving deltas: 100% (677649/677649), done.
Updating files: 100% (17753/17753), done.
$ cd u-boot-at91
Cross-compiling U-Boot
Before compiling the U-Boot, you need setup cross compile toolchain in the
section.

Latest versions of U-boot (2018.07 and newer) have a minimum requirement of 6.0 version of the GCC toolchain. We always recommend to use the latest versions.