This article will discuss the steps needed to download and compile a Bootable (SD) Linux Image for the ZCU102 using the OSL flow.
...
If users want to make modifications to the FSBL then they can do this in the embeddedsw/lib/sw_apps/zynqmp_fsbl/src. Or, if a valid patch then apply this to embeddedsw
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 {args} { set board 0 set version 2020.2 for {set i 0} {$i < [llength $args]} {incr i} { if {[lindex $args $i] == "-board"} { set board [string tolower [lindex $args [expr {$i + 1}]]] } if {[lindex $args $i] == "-version"} { set version [string toupper [lindex $args [expr {$i + 1}]]] } } 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] if {$board != 0} { foreach lib [glob -nocomplain -directory repo/my_dtg/device-tree-xlnx/device_tree/data/kernel_dtsi/${version}/include/dt-bindings -type d *] { if {![file exists my_dts/include/dt-bindings/[file tail $lib]]} { file copy -force $lib my_dts/include/dt-bindings } } set dtsi_files [glob -nocomplain -directory repo/my_dtg/device-tree-xlnx/device_tree/data/kernel_dtsi/${version}/BOARD -type f *${board}*] if {[llength $dtsi_files] != 0} { file copy -force [lindex $dtsi_files end] my_dts set fileId [open my_dts/system-user.dtsi "w"] puts $fileId "/include/ \"[file tail [lindex $dtsi_files end]]\"" puts $fileId "/ {" puts $fileId "};" close $fileId } else { puts "Info: Board file: $board is not found and will not be added to the system-top.dts" } } } |
...