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/linux4microchip/u-boot-mchp.git
Cloning into 'u-boot-mchp'...
remote: Enumerating objects: 951876, done.
remote: Counting objects: 100% (17718/17718), done.
remote: Compressing objects: 100% (5735/5735), done.
remote: Total 951876 (delta 12391), reused 15314 (delta 11846), pack-reused 934158
Receiving objects: 100% (951876/951876), 164.77 MiB | 401.00 KiB/s, done.
Resolving deltas: 100% (790362/790362), done.
$ cd u-boot-mchp/
Cross-compiling U-Boot - sama7g5-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 eMMC flash:
sama7g5ek_mmc_defconfig
# To put environment variables in SD/MMC card:
sama7g5ek_mmc1_defconfig
# To put environment variables in qspi flash:
sama7g5ek_qspi0_defconfig
Here are the building steps for the SAMA7G5-EK board:
# You can change the config according to your needs.
make sama7g5ek_mmc1_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 - 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.
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:
sam9x60_curiosity_nandflash_defconfig
# To put environment variables in SD/MMC card:
sam9x60_curiosity_mmc_defconfig
Here are the building steps for the SAM9X60-Curiosity board:
# You can change the config according to your needs.
make sam9x60_curiosity_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.
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:
sam9x75_curiosity_nandflash_defconfig
# To put environment variables in SD/MMC card:
sam9x75_curiosity_mmc_defconfig
Here are the building steps for the SAM9X75-Curiosity board:
# You can change the config according to your needs.
make sam9x75_curiosity_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 - sama5d29_curiosity
Once the Microchip 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 uSD card:
sama5d29_curiosity_mmc_defconfig
# To put environment variables in SD card:
sama5d29_curiosity_mmc1_defconfig
# To put environment variables in quad-SPI serial flash:
sama5d29_curiosity_qspiflash_defconfig
Here are the building steps for the SAMA5D29-Curiosity board:
# You can change the config according to your needs.
make sama5d29_curiosity_mmc_defconfig
make or make -j <num_of_cpus> or make -j $(nproc --all)
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/linux4microchip/u-boot-mchp.git
Cloning into 'u-boot-mchp'...
remote: Enumerating objects: 951876, done.
remote: Counting objects: 100% (17718/17718), done.
remote: Compressing objects: 100% (5735/5735), done.
remote: Total 951876 (delta 12391), reused 15314 (delta 11846), pack-reused 934158
Receiving objects: 100% (951876/951876), 164.77 MiB | 401.00 KiB/s, done.
Resolving deltas: 100% (790362/790362), done.
$ cd u-boot-mchp/
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.