Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
resources:tools-software:linux-build:generic:zynq [16 Apr 2019 15:30] – [Checkout the Release branch] Michael Hennerichresources:tools-software:linux-build:generic:zynq [30 Mar 2023 12:51] – Remove mentioning of SDK and add 2021_R1 release branch Iulia Moldovan
Line 21: Line 21:
 </code> </code>
  
 +
 +===== Building using Petalinux =====
 +
 +Please see here: [[resources:tools-software:linux-build:generic:petalinux|Building with Petalinux]]
  
 ===== On the development host ===== ===== On the development host =====
Line 37: Line 41:
  
 <note tip> <note tip>
-If not otherwise required always use the latest release!+Use the latest release, if not required otherwise!
 </note> </note>
  
Line 48: Line 52:
 | 2018_R1 | | 2018_R1 |
 | 2018_R2 | | 2018_R2 |
 +| 2019_R1 |
 +| 2019_R2 |
 +| 2021_R1 |
  
  
 <code> <code>
-dave@hal9000:~/github-linux-build/linux$ git checkout origin/2015_R2 -b 2015_R2 +dave@hal9000:~/github-linux-build/linux$ git checkout origin/2021_R1 -b 2021_R1 
-Branch 2015_R2 set up to track remote branch 2015_R2 from origin. +Branch 2021_R1 set up to track remote branch 2021_R1from origin. 
-Switched to a new branch '2015_R2'+Switched to a new branch '2021_R1'
 </code> </code>
  
 ==== Setup cross compile environment variables ==== ==== Setup cross compile environment variables ====
 +
  
 There are a few toolchains that can be used. The Xilinx toolchain is recommended, but the Linaro toolchain can also be used. There are a few toolchains that can be used. The Xilinx toolchain is recommended, but the Linaro toolchain can also be used.
Line 64: Line 72:
 === Using the Xilinx toolchain === === Using the Xilinx toolchain ===
  
-^ Release names and Branches ^ Required Vivado/SDK versions ^+^ Release names and Branches ^ Required Vivado/Vitis versions ^
 | 2014_R2 | Vivado 2014.2 |  | 2014_R2 | Vivado 2014.2 | 
 | 2015_R2 | Vivado 2015.2 |  | 2015_R2 | Vivado 2015.2 | 
Line 71: Line 79:
 | 2017_R1 | Vivado 2016.4 |  | 2017_R1 | Vivado 2016.4 | 
 | 2018_R1 | Vivado 2017.4 |  | 2018_R1 | Vivado 2017.4 | 
- +| 2018_R2 | Vivado 2018.2 |  
-Vivado 2015.2 SDK may be installed into a different directory+| 2019_R1 | Vivado 2018.3 |  
 +| 2019_R2 | Vivado 2019.1 |  
 +| 2021_R1 | Vivado 2021.1 | 
  
 <code> <code>
-dave@hal9000:~/github-linux-build/linux$ source /opt/Xilinx/SDK/2015.2/settings64.sh+dave@hal9000:~/github-linux-build/linux$ source $PATH_to_Xilinx/Xilinx/Vitis/$Vitis_version/settings64.sh
 </code> </code>
  
Line 81: Line 91:
 <code> <code>
 dave@hal9000:~/github-linux-build/linux$ export ARCH=arm dave@hal9000:~/github-linux-build/linux$ export ARCH=arm
-dave@hal9000:~/github-linux-build/linux$ export CROSS_COMPILE=arm-xilinx-linux-gnueabi-+dave@hal9000:~/github-linux-build/linux$ export CROSS_COMPILE="arm-linux-gnueabihf-"
 </code> </code>
 +
 +<note important>
 +Find the path to the Xilinx installation folder, and then use it to replace this string: **$PATH_to_Xilinx** that is written above. Same goes for the **$Vitis_version**, where you choose the Vitis version.  
 +</note>
  
 === Using the Linaro toolchain === === Using the Linaro toolchain ===
  
 Alternatively, the Linaro toolchain/compiler can be used to compile to kernel. Alternatively, the Linaro toolchain/compiler can be used to compile to kernel.
-Linaro compilers (that work with Zynq) can be downloaded from: https://releases.linaro.org/components/toolchain/binaries/latest-5/arm-linux-gnueabi/+Linaro compilers (that work with Zynq) can be downloaded from:  
 +https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/ . Always use the latest release just in case.
  
 Example: Example:
 <code> <code>
-wget https://releases.linaro.org/components/toolchain/binaries/latest-5/arm-linux-gnueabi/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabi.tar.xz +wget https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi.tar.xz 
-tar -xvf gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabi.tar.xz+tar -xvf gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi.tar.xz
 </code> </code>
  
 <code> <code>
 export ARCH=arm export ARCH=arm
-export CROSS_COMPILE=$(pwd)/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-+export CROSS_COMPILE=$(pwd)/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-
 </code> </code>
  
 ==== Configure the kernel ==== ==== Configure the kernel ====
 +Inside the repository, generate the configuration file before building the kernel tree. The command shown below is generic and is not project specific. As long as the board is a ZYNQ FPGA, use the configuration below.
 <code> <code>
 dave@hal9000:~/github-linux-build/linux$ make zynq_xcomm_adv7511_defconfig dave@hal9000:~/github-linux-build/linux$ make zynq_xcomm_adv7511_defconfig
Line 108: Line 124:
 dave@hal9000:~/github-linux-build/linux$ dave@hal9000:~/github-linux-build/linux$
 </code> </code>
-==== Build the kernel ==== 
  
 +==== Build the kernel ====
 +Build the kernel via 'make'. This is the same for all Xilinx ZYNQ FPGAs. 
 <code> <code>
 dave@hal9000:~/github-linux-build/linux$ make -j5 UIMAGE_LOADADDR=0x8000 uImage dave@hal9000:~/github-linux-build/linux$ make -j5 UIMAGE_LOADADDR=0x8000 uImage
Line 137: Line 154:
  
 === Build the one that fits your FPGA carrier and FMC card === === Build the one that fits your FPGA carrier and FMC card ===
 +^ device tree ^ board ^ chip ^
 | zynq-adrv9361-z7035-bob | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9361]] | | zynq-adrv9361-z7035-bob | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9361]] |
 | zynq-adrv9361-z7035-bob-cmos | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9361]] | | zynq-adrv9361-z7035-bob-cmos | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9361]] |
-| zynq-adrv9361-z7035-box | [[adi>ADRV1CRR-BOX]] | [[adi>ADRV9361]] |+| zynq-adrv9361-z7035-packrf | [[adi>ADRV-PACKRF]] | [[adi>ADRV9361]] |
 | zynq-adrv9361-z7035-fmc | [[adi>ADRV1CRR-FMC]] | the on-board [[adi>ADV7511]] and the [[adi>ADRV9361]] | | zynq-adrv9361-z7035-fmc | [[adi>ADRV1CRR-FMC]] | the on-board [[adi>ADV7511]] and the [[adi>ADRV9361]] |
 | zynq-adrv9361-z7035-fmc-rfcard-tdd | [[adi>ADRV1CRR-FMC]] | the on-board [[adi>ADV7511]], [[adi>ADRV9361]] and the [[adi>AD-PZSDR2400TDD-EB]] |  | zynq-adrv9361-z7035-fmc-rfcard-tdd | [[adi>ADRV1CRR-FMC]] | the on-board [[adi>ADV7511]], [[adi>ADRV9361]] and the [[adi>AD-PZSDR2400TDD-EB]] | 
 | zynq-adrv9364-z7020-bob | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9364]] | | zynq-adrv9364-z7020-bob | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9364]] |
 | zynq-adrv9364-z7020-bob-cmos | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9364]] | | zynq-adrv9364-z7020-bob-cmos | [[adi>ADRV1CRR-BOB]] | [[adi>ADRV9364]] |
-| zynq-adrv9364-z7020-box | [[adi>ADRV1CRR-BOX]] | [[adi>ADRV9364]] | +| zynq-adrv9364-z7020-packrf | [[adi>ADRV-PACKRF]] | [[adi>ADRV9364]] | 
-| zynq-mini-itx-adv7511 | [[http://zedboard.org/product/mini-itx|Mini-ITX]] | the on-board [[adi>ADV7511]] | +| zynq-coraz7s | [[https://digilent.com/reference/programmable-logic/cora-z7/start|cora-z7]] | 
-| zynq-mini-itx-adv7511-ad9361-fmcomms2-3 | [[http://zedboard.org/product/mini-itx|Mini-ITX]] | on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | +| zynq-mini-itx-adv7511 | [[http://zedboard.org/product/mini-itx-board|Mini-ITX]] | the on-board [[adi>ADV7511]] | 
-| zynq-mini-itx-adv7511-ad9364-fmcomms4 | [[http://zedboard.org/product/mini-itx|Mini-ITX]] | the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms4-ebz|AD-FMCOMMS4-EBZ]] board |+| zynq-mini-itx-adv7511-ad9361-fmcomms2-3 | [[http://zedboard.org/product/mini-itx-board|Mini-ITX]] | on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | 
 +| zynq-mini-itx-adv7511-ad9364-fmcomms4 | [[http://zedboard.org/product/mini-itx-board|Mini-ITX]] | the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms4-ebz|AD-FMCOMMS4-EBZ]] board |
 | zynq-zc702-adv7511 | [[xilinx>ZC702]] | the on-board [[adi>ADV7511]] | | zynq-zc702-adv7511 | [[xilinx>ZC702]] | the on-board [[adi>ADV7511]] |
 | zynq-zc702-adv7511-ad9361-fmcomms2-3 | [[xilinx>ZC702]] | the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | | zynq-zc702-adv7511-ad9361-fmcomms2-3 | [[xilinx>ZC702]] | the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board |
Line 176: Line 195:
 | zynq-zed-imageon | [[http://zedboard.org/product/zedboard|Zed Board]] | FMC-IMAGEON | | zynq-zed-imageon | [[http://zedboard.org/product/zedboard|Zed Board]] | FMC-IMAGEON |
  
 +Building the device tree uses 'make' by turning the .dts file to a .dtb. The command is simply 'make' plus the device tree name with a .dtb file extension.
  
 <code> <code>
Line 184: Line 204:
  
 ==== Copy the generated files to your SD Card ==== ==== Copy the generated files to your SD Card ====
 +The output files for building the kernel and device tree are **uImage** and **<device_tree_name>.dtb**. Refer to the code below to find their respective output directories. Take note that the device tree file needs to be renamed to **devicetree.dtb**. See [[:resources:tools-software:linux-software:kuiper-linux]] for more information in configuring the SD card.
 <code> <code>
 dave@hal9000:~/github-linux-build/linux$ cp arch/arm/boot/uImage /media/BOOT/uImage dave@hal9000:~/github-linux-build/linux$ cp arch/arm/boot/uImage /media/BOOT/uImage
resources/tools-software/linux-build/generic/zynq.txt · Last modified: 02 Feb 2024 16:08 by Marcelo Schmitt