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 git://github.com/linux4sam/u-boot-at91.git
       Cloning into 'u-boot-at91'...
       remote: Enumerating objects: 106920, done.
       remote: Counting objects: 100% (106920/106920), done.
       remote: Compressing objects: 100% (24617/24617), done.
       remote: Total 566593 (delta 84756), reused 96342 (delta 81351), pack-reused 459673
       Receiving objects: 100% (566593/566593), 131.67 MiB | 430.00 KiB/s, done.
       Resolving deltas: 100% (456142/456142), done.
       $ cd u-boot-at91
       

  • The source code has been taken from the master branch which is pointing to the latest branch we use. If you want to use the other branch, you can list them and use one of them by doing:
       $ git branch -r
       origin/HEAD -> origin/master
       origin/master
       origin/u-boot-2012.10-at91
       origin/u-boot-2013.07-at91
       origin/u-boot-2014.07-at91
       origin/u-boot-2015.01-at91
       origin/u-boot-2016.03-at91
       origin/u-boot-2017.03-at91
       origin/u-boot-2018.07-at91
       origin/uboot_5series_1.x
       $ git checkout origin/u-boot-2018.07-at91 -b u-boot-2018.07-at91
       Branch u-boot-2018.07-at91 set up to track remote branch u-boot-2018.07-at91 from origin.
       Switched to a new branch 'u-boot-2018.07-at91'
       

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.

Pointing hand 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.

Pointing hand 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.

Pointing hand 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.

Pointing hand 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.

Pointing hand 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.

Pointing hand 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 - 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.

Pointing hand 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.

Pointing hand 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 git://github.com/linux4sam/u-boot-at91.git
       Cloning into 'u-boot-at91'...
       remote: Enumerating objects: 106920, done.
       remote: Counting objects: 100% (106920/106920), done.
       remote: Compressing objects: 100% (24617/24617), done.
       remote: Total 566593 (delta 84756), reused 96342 (delta 81351), pack-reused 459673
       Receiving objects: 100% (566593/566593), 131.67 MiB | 430.00 KiB/s, done.
       Resolving deltas: 100% (456142/456142), done.
       $ cd u-boot-at91
       

  • The source code has been taken from the master branch which is pointing to the latest branch we use. If you want to use the other branch, you can list them and use one of them by doing:
       $ git branch -r
       origin/HEAD -> origin/master
       origin/master
       origin/u-boot-2012.10-at91
       origin/u-boot-2013.07-at91
       origin/u-boot-2014.07-at91
       origin/u-boot-2015.01-at91
       origin/u-boot-2016.03-at91
       origin/u-boot-2017.03-at91
       origin/u-boot-2018.07-at91
       origin/uboot_5series_1.x
       $ git checkout origin/u-boot-2018.07-at91 -b u-boot-2018.07-at91
       Branch u-boot-2018.07-at91 set up to track remote branch u-boot-2018.07-at91 from origin.
       Switched to a new branch 'u-boot-2018.07-at91'
       

Cross-compiling U-Boot

Before compiling the U-Boot, you need setup cross compile toolchain in the section.

Warning, important 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.

r10 - 06 Nov 2018 - 15:31:37 - NicolasFerre
 
Linux & Open Source related information for AT91 Smart ARM Microcontrollers

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Atmel® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. This site is powered by the TWiki collaboration platform

ARM® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM