This article will discuss the steps needed to download and compile a Bootable (SD) Linux Image for the ZCU102 using the OSL flow.
...
Code Block |
---|
|
SHELL := /bin/bash
TOOLS ?= /proj/gsd/vivado/Vitis
VERSION ?= 2020.2
BOARD ?= ZCU102 |
Note: Make sure that the tools patch point to your relevant install on your machine
...
Code Block |
---|
|
proc fsbl {args} {
set xsa [glob -nocomplain -directory [pwd] -type f *.xsa *.hdf]
hsi::open_hw_design $xsa
set fsbl_board 0
for {set i 0} {$i < [llength $args]} {incr i} {
if {[lindex $args $i] == "-board"} {
set board [string toupper [lindex $args [expr {$i + 1}]]]
}
}
set xsa [glob -nocomplain -directory [pwd] -type f *.xsa *.hdf]
hsi::open_hw_design $xsa
set fsbl_design [hsi::create_sw_design fsbl_1 -proc psu_cortexa53_0 -app zynqmp_fsbl]
#commonif {$board != 0} {
common::set_property -name APP_COMPILER_FLAGS -value "-DXPS_BOARD_ZCU104${board}" -objects $fsbl_design
}
hsi::generate_app -dir zynqmp_fsbl -compile
hsi::close_hw_design [hsi::current_hw_design]
} |
Note: if you have a customer development board such as the ZCU104ZCU102, then you can pass this as a symbol to the compiler
...
Code Block |
---|
language | c# |
---|
title | build_fsbl |
---|
|
fsbl:
$(RM) -r zynqmp_fsbl
$(TOOLS)/$(VERSION)/bin/xsct -eval "source xsct_script.tcl; fsbl -board $(BOARD)" |
Build PMU Firmware
Create, or append the proc below to your xsct_script.tcl
...
Code Block |
---|
|
kernel:
$(MAKE) -C linux-xlnx clean
source $(TOOLS)/$(VERSION)/settings64.sh; \
export CROSS_COMPILE=aarch64-linux-gnu-; \
export ARCH=arm64; \
export CC=aarch64-linux-gnu-gcc; \
cd linux-xlnx; \
$(MAKE) -f Makefile xilinx_zynqmp_defconfig; \
$(MAKE) -f Makefile all -j 32; \
$(MAKE) -f Makefile modules_install INSTALL_MOD_PATH=. |
Build device-tree
- Create a xsct_script.tcl file with the following contents:
Code Block |
---|
|
proc build_dts {} {
set xsa [glob -nocomplain -directory [pwd] -type f *.xsa]
hsi::open_hw_design $xsa
hsi::set_repo_path ./repo
hsi::create_sw_design device-tree -os device_tree -proc psu_cortexa53_0
hsi::generate_target -dir my_dts
hsi::close_hw_design [hsi::current_hw_design]
} |
...