Dedicated page on U-Boot wiki: http://www.denx.de/wiki/U-Boot/SourceCode

You can easily download U-Boot source code from Linux4Microchip GitHub U-Boot repository:

  • clone the Linux4microchip 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/
       

  • 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/dev/tony/sama7g5ek_optee
      origin/master
      origin/sam9x60_curiosity_early
      origin/sam9x60_early
      origin/sam9x60_iar
      origin/sam9x7_early
      origin/sama5d27wlsom1ek_ear
      origin/sama7g5_early
      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.01-at91
      origin/u-boot-2016.03-at91
      origin/u-boot-2017.03-at91
      origin/u-boot-2018.07-at91
      origin/u-boot-2019.04-at91
      origin/u-boot-2020.01-at91
      origin/u-boot-2021.04-at91
      origin/u-boot-2022.01-at91
      origin/u-boot-2023.07-mchp
      origin/u-boot-2024.07-mchp
      origin/uboot_5series_1.x
    
       $ git checkout origin/u-boot-2024.07-mchp -b u-boot-2024.07-mchp
      Branch 'u-boot-2024.07-mchp' set up to track remote branch 'u-boot-2024.07-mchp' from 'origin'.
      Switched to a new branch 'u-boot-2024.07-mchp'
       

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: 1011450, done.
remote: Counting objects: 100% (111523/111523), done.
remote: Compressing objects: 100% (33355/33355), done.
remote: Total 1011450 (delta 77280), reused 111498 (delta 77272), pack-reused 899927 (from 1)
Receiving objects: 100% (1011450/1011450), 238.61 MiB | 24.92 MiB/s, done.
Resolving deltas: 100% (826270/826270), done.
Updating files: 100% (19925/19925), done.
$ cd u-boot-at91/

The source code has been taken from the master branch. You must switch to the specified tag by doing:

$ git checkout -b sama7d65 linux4microchip+sama7d65-2024.10
Switched to a new branch 'sama7d65'

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.

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

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:
   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.

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:
   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.

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:
   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.

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, below config files can specify where to store the U-Boot environment.

   # To put environment variables in SD/MMC card:
   sama7d65_curiosity_mmc1_defconfig

Here are the building steps for the SAMA7D65-Curiosity board:

# You can change the config according to your needs.
make sama7d65_curiosity_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 - 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 - 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.

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_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.

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

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

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 Linux4Microchip GitHub U-Boot repository:

  • clone the Linux4microchip 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/
       

  • 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/dev/tony/sama7g5ek_optee
      origin/master
      origin/sam9x60_curiosity_early
      origin/sam9x60_early
      origin/sam9x60_iar
      origin/sam9x7_early
      origin/sama5d27wlsom1ek_ear
      origin/sama7g5_early
      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.01-at91
      origin/u-boot-2016.03-at91
      origin/u-boot-2017.03-at91
      origin/u-boot-2018.07-at91
      origin/u-boot-2019.04-at91
      origin/u-boot-2020.01-at91
      origin/u-boot-2021.04-at91
      origin/u-boot-2022.01-at91
      origin/u-boot-2023.07-mchp
      origin/u-boot-2024.07-mchp
      origin/uboot_5series_1.x
    
       $ git checkout origin/u-boot-2024.07-mchp -b u-boot-2024.07-mchp
      Branch 'u-boot-2024.07-mchp' set up to track remote branch 'u-boot-2024.07-mchp' from 'origin'.
      Switched to a new branch 'u-boot-2024.07-mchp'
       

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.

r24 - 02 Dec 2024 - 10:25:18 - VarshiniRajendran
 
Linux & Open Source for AT91 Microchip Microprocessors

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.

Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM