

if your host has 4 cores or threads: make -j4 NOTE: if you want to speed-up your build, replace the standard make command with the one that makes use of multi-core hosts for parallel compilation.
#U boot source code
Once the source code is properly configured for the Ultra96-V2 board, we can build the U-Boot program: make If we want to review or modify the default settings after these have been applied, we can use the graphical ncurses based menu: make menuconfigĪfter doing this, we will get this dialog integrated in the Linux terminal:įor this example, we can leave the default configuration unchanged and just exit the menu. In this way, we can clean the sources (just in case) and load the avnet_ultra96_rev1_defconfig default configuration: make distclean make avnet_ultra96_rev1_defconfig Note that this is just a wrapper than include the device tree for zcu100: ls arch/arm/dts/zynqmp-zcu100-revC.dtsĪs the only difference between avnet_ultra96_rev1_defconfig and xilinx_zynqmp_zcu100_revC_defconfig is the device tree pointed by CONFIG_DEFAULT_DEVICE_TREE, we can choose any of them and we will get the same output.

In this case we can find the Ultra96 device tree here: ls arch/arm/dts/avnet-ultra96-rev1.dts In addition, further customization can be made in the low level device tree included in the u-boot-xlnx. If we need to customize it, we can just edit the selected defconfig for our board. Note that the Ultra96v1 has been rebranded as ZCU100, so we can use this defconfig too: ls configs/xilinx_zynqmp_zcu100_revC_defconfig In addition, the defconfig for Ultra96-v1 is provided too, and we can use it for our Ultra96-v2: ls configs/avnet_ultra96_rev1_defconfig You can use this command to check the available ones: ls configs/xilinx_zynqmp_* The Xilinx U-Boot release includes sample files for generic MPSoC bootloaders and the main Xilinx Development Kits. Then export the CROSS_COMPILE and ARCH environment variables for the aarch64 APU in MPSoC: export CROSS_COMPILE=aarch64-linux-gnu- export ARCH=aarch64įinally, for an easier path handling, we move into the linux directory we created in previous steps: cd ~/soc-course/linux/ Getting the SourcesĪs a first step, we need to get the sources from the Xilinx repository at GitHub and checkout the version that matches our Xilinx toolchain version: git clone cd u-boot-xlnx git checkout xilinx-v2019.2 Configuring the U-Bootīefore building, we need to choose a defconfig file for the MPSoC. Load the Vitis environment so that the cross-toolchain tools included in the Xilinx toolchain are available: source /tools/Xilinx/Vitis/2019.2/settings64.sh
#U boot source install
For Debian/Ubuntu Debian distributions, these packages can be installed via the package manager with these commands: sudo apt-get install build-essential sudo apt-get install flex sudo apt-get install bison sudo apt-get install libncurses-dev Setting the Environment

Required Host Packagesīefore performing the exercises, some packages need to be installed in the development host Linux Operating System.
#U boot source how to
In this section, we will learn how to build a fully functional U-Boot program from the source code. In the Zynq UltraScale+ MPSoC based systems, U-Boot is a key element to boot Linux based runtimes and it covers the B元3 level inside the ARM Trusted Firmware (ATF) boot flow.

The Universal Boot Loader, also known as Das U-Boot or simply U-Boot, is a general purpose boot loader used in embedded systems to provide the basic commands to allow the Operating System Kernel to be able of booting.
