Difference between revisions of "Building U-Boot (BELK/BXELK)"

From DAVE Developer's Wiki
Jump to: navigation, search
(25 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
{{Applies To Bora}}
 
{{Applies To Bora}}
 
{{Applies To BoraX}}
 
{{Applies To BoraX}}
{{Applies To BoraLite}}
 
 
{{InfoBoxBottom}}
 
{{InfoBoxBottom}}
{{ImportantMessage|text=As the structure of the BELK/BXELK is based on several tools, it is strongly recommended the reading of [[BORA_SOM/BELK-L/General/Logical_structure_of_BELK|this document]] first.
+
 
}}
 
 
== History ==
 
== History ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
!Version
 
!Version
 
!Date
 
!Date
!BELK/BXELK version
+
!BELK version
 
!Notes
 
!Notes
 
|-
 
|-
|{{oldid|6723 |1.0.0}}
+
|1.0.0
 
|November 2015
 
|November 2015
|[[BELK/BXELK_software_components#BELK_3.0.0|3.0.0 / N/A]]
+
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|3.0.0]]
 
|First release
 
|First release
 
|-
 
|-
|{{oldid|8999 |2.0.0}}
+
|2.0.0
 
|July 2017
 
|July 2017
|[[BELK/BXELK_software_components#BELK_4.0.0_.2F_BXELK_2.0.0|4.0.0 / 2.0.0]]
+
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|3.0.0, 4.0.0]]
|Updated for BELK 4.0.0 / BXELK 2.0.0
+
|Udates for BELK-4.0.0 / BXELK-2.0.0
|-
 
|3.0.0
 
|Jan 2020
 
|[[BELK/BXELK_software_components#BELK_4.1.0|4.1.0]]
 
|Updated for BELK/BXELK 4.1.0
 
 
|-
 
|-
 
|}
 
|}
  
<section begin=BELK/>
+
==Instructions==
==Building U-Boot==
+
It is assumed that the development environment has been set up properly as described [[Build_system_(BELK)|here]].
It is assumed that the development environment has been set up properly as described [[BORA_SOM/BELK-L/Development/Build_system|here]].
 
  
 
*start the Linux development server and login into the system
 
*start the Linux development server and login into the system
 
*assuming that a local repository has not been created, clone the remote U-Boot git repository (the “-b” option is used to automatically checkout the current branch):
 
*assuming that a local repository has not been created, clone the remote U-Boot git repository (the “-b” option is used to automatically checkout the current branch):
<code>git clone git@git.dave.eu:dave/bora/u-boot-xlnx.git -b bora-4.x.x</code>
+
<code>git clone git@git.dave.eu:dave/bora/u-boot-xlnx.git -b bora</code>
*Setup the server environment (please refer to [[BORA_SOM/BELK-L/Development/Build_system#Pre-built_toolchain|this section]])
+
*Setup the server environment (please refer to [[Build_system_(BELK)#Pre-built_toolchain|this section]])
 
*enter the source tree directory and select the desired target by issuing one of the following commands:
 
*enter the source tree directory and select the desired target by issuing one of the following commands:
 
** For '''BELK <= 3.0.2''' and '''BXELK <= 1.0.1''': <pre>make bora_qspi_config &#10;make bora_mmc_config &#10;make bora_noflash_config</pre>
 
** For '''BELK <= 3.0.2''' and '''BXELK <= 1.0.1''': <pre>make bora_qspi_config &#10;make bora_mmc_config &#10;make bora_noflash_config</pre>
** For '''BELK 4.0.0''' and '''BXELK 2.0.0''': <pre>make bora_qspi_defconfig &#10;make bora_mmc_defconfig &#10;make bora_noflash_defconfig &#10;make borax_qspi_defconfig &#10;make borax_mmc_defconfig &#10;make borax_noflash_defconfig</pre>
+
** For '''BELK-4.0.0''' and '''BXELK-2.0.0''': <pre>make bora_qspi_defconfig &#10;make bora_mmc_defconfig &#10;make bora_noflash_defconfig &#10;make borax_qspi_defconfig &#10;make borax_mmc_defconfig &#10;make borax_noflash_defconfig</pre>
** '''BELK 4.1.1''' or newer more targets have been added for BoraLite booting from NAND and for the application note [[BELK-AN-006:_Enabling_dual_Gigabit_Ethernet_support_on_BoraEVB/BoraXEVB|AN006]] <pre>make bora_nand_defconfig &#10;make bora_mmc_an006_defconfig</pre>
 
  
:<code>bora_qspi</code> and <code>borax_qspi</code>: U-Boot is built to use NOR flashed based environment. The resulting binary files are used to boot from serial NOR flash.
+
:<code>bora_qspi</code> and <code>borax_qspi</code>: U-Boot is built to use NOR flashed based environment.
:<code>bora_mmc</code> and <code>borax_mmc</code>: U-Boot environment is placed in SD/MMC card. The resulting binary files are used to boot from SD/MMC card. However, NOR flash and NAND flash are accessible.
+
:<code>bora_mmc</code> and <code>bora_mmc</code>: U-Boot environment is placed in SD/MMC card.
:<code>bora_noflash</code> and <code>borax_noflash</code>: U-Boot environment is placed in SD/MMC card. The resulting binary files are used to boot from SD/MMC card. NOR flash and NAND flash are disabled.
+
:<code>bora_noflash</code> and <code>bora_noflash</code>: U-Boot environment is placed in SD/MMC card. NOR flash and NAND flash are disabled.
:<code>bora_nand_defconfig</code>: U-Boot environment is placed on NAND flash.
 
 
* build U-Boot by issuing <code>make</code> command. This will generate U-Boot binary images.
 
* build U-Boot by issuing <code>make</code> command. This will generate U-Boot binary images.
** file extension <code>.elf</code> must be manually added on <code>u-boot</code> if ELF file is required (for example to build <code>boot.bin</code> for uSD)
 
 
Subsequent builds just require <code>make</code> command, without targets, to update the binary images.
 
  
{{ImportantMessage|text=By default, BoraEVB and BoraXEVB are configured to boot from NOR flash. Consequently, the U-Boot image stored in the NOR flash is built with <code>bora_qspi_defconfig</code> and <code>borax_qspi_defconfig</code> configuration respectively.
+
Subsequent builds just require <code>make</code> command, without targets, to update the binary images. Once the build process is complete, the binary images can be copied to the tftp root directory (eg. <code>/srv/tftp/belk/</code>) with the following commands:
}}
 
 
 
 
 
 
 
In order to download them to the target via TFPT protocol, once the build process is complete the binary images can be copied to the [[BORA_SOM/BORA_Evaluation_Kit/Getting_started/Connections_and_first_boot#Target_configuration_for_the_development_stage_.28net_nfs.29|tftp root directory]] (e.g. <code>/tftpboot/bora/</code>) with the following commands:
 
* For '''BELK 4.0.0''' or newer and '''BXELK 2.0.0''' or newer:
 
:<pre>cp spl/boot.bin /tftpboot/bora/ &#10;cp u-boot.img /tftpboot/bora/</pre>
 
 
* For '''BELK <= 3.0.2''' and '''BXELK <= 1.0.1''' :
 
* For '''BELK <= 3.0.2''' and '''BXELK <= 1.0.1''' :
:<pre>cp u-boot.bin /tftpboot/bora/</pre>
+
:<pre>cp u-boot.bin /srv/tftp/belk/</pre>
 
+
* For '''BELK-4.0.0''' and '''BXELK-2.0.0''' :
<section end=BELK/>
+
:<pre>cp spl/boot.bin /srv/tftp/belk/ &#10;cp u-boot.img /srv/tftp/belk/</pre>

Revision as of 13:40, 29 June 2017

Info Box
Bora5-small.jpg Applies to Bora
BORA Xpress.png Applies to BORA Xpress

History[edit | edit source]

Version Date BELK version Notes
1.0.0 November 2015 3.0.0 First release
2.0.0 July 2017 3.0.0, 4.0.0 Udates for BELK-4.0.0 / BXELK-2.0.0

Instructions[edit | edit source]

It is assumed that the development environment has been set up properly as described here.

  • start the Linux development server and login into the system
  • assuming that a local repository has not been created, clone the remote U-Boot git repository (the “-b” option is used to automatically checkout the current branch):

git clone git@git.dave.eu:dave/bora/u-boot-xlnx.git -b bora

  • Setup the server environment (please refer to this section)
  • enter the source tree directory and select the desired target by issuing one of the following commands:
    • For BELK <= 3.0.2 and BXELK <= 1.0.1:
      make bora_qspi_config 
      make bora_mmc_config 
      make bora_noflash_config
    • For BELK-4.0.0 and BXELK-2.0.0:
      make bora_qspi_defconfig 
      make bora_mmc_defconfig 
      make bora_noflash_defconfig 
      make borax_qspi_defconfig 
      make borax_mmc_defconfig 
      make borax_noflash_defconfig
bora_qspi and borax_qspi: U-Boot is built to use NOR flashed based environment.
bora_mmc and bora_mmc: U-Boot environment is placed in SD/MMC card.
bora_noflash and bora_noflash: U-Boot environment is placed in SD/MMC card. NOR flash and NAND flash are disabled.
  • build U-Boot by issuing make command. This will generate U-Boot binary images.

Subsequent builds just require make command, without targets, to update the binary images. Once the build process is complete, the binary images can be copied to the tftp root directory (eg. /srv/tftp/belk/) with the following commands:

  • For BELK <= 3.0.2 and BXELK <= 1.0.1 :
cp u-boot.bin /srv/tftp/belk/
  • For BELK-4.0.0 and BXELK-2.0.0 :
cp spl/boot.bin /srv/tftp/belk/ 
cp u-boot.img /srv/tftp/belk/