-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Move zcu104 vitis platform creation tutorials to Design_Tutorial section - Use PetaLinux common images instead of building PetaLinux from scratch because it can satisfy most use cases and simplify the workflow. - Add createdts steps to generate device tree for common image workflow
- Loading branch information
Showing
92 changed files
with
1,572 additions
and
1,214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+440 KB
...reation/Design_Tutorials/02-Edge-AI-ZCU104/images/clk_rst_connection_update.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added
BIN
+19.6 KB
...orm_Creation/Design_Tutorials/02-Edge-AI-ZCU104/images/common_image_content.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+12.9 KB
...tform_Creation/Design_Tutorials/02-Edge-AI-ZCU104/images/step2_common_image.PNG
Oops, something went wrong.
Binary file added
BIN
+3.11 KB
...orm_Creation/Design_Tutorials/02-Edge-AI-ZCU104/images/step2_source_content.PNG
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
Vitis_Platform_Creation/Design_Tutorials/02-Edge-AI-ZCU104/images/structure.svg
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+98.7 KB
...latform_Creation/Design_Tutorials/02-Edge-AI-ZCU104/images/system_structure.PNG
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+417 KB
...tform_Creation/Design_Tutorials/02-Edge-AI-ZCU104/images/vitis_linux_config.PNG
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+80.9 KB
...form_Creation/Design_Tutorials/02-Edge-AI-ZCU104/images/vivado_project_type.PNG
Oops, something went wrong.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ZCU104/ref_files/step2_petalinux/Makefile → ...ef_files/petalinux_customization/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ef_files/step2_petalinux/system-user.dtsi → .../petalinux_customization/system-user.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...AI-ZCU104/ref_files/step1_vivado/Makefile → ...AI-ZCU104/ref_files/step1_vivado/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...104/ref_files/step1_vivado/export_xsa.tcl → ...104/ref_files/step1_vivado/export_xsa.tcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
65 changes: 65 additions & 0 deletions
65
Vitis_Platform_Creation/Design_Tutorials/02-Edge-AI-ZCU104/ref_files/step2_pfm/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#Copyright 2022 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
.PHONY: prep_common sw_comp pfm prep_sw_comp prep_sysroot all | ||
|
||
XSA_NAME=zcu104_custom_platform | ||
PLATFORM_NAME=zcu104_custom | ||
PLATFORM_NAME_FSBL=zcu104_custom_fsbl | ||
COMMON_IMAGE=xilinx-zynqmp-common-v2022.1/Image | ||
#COMMON_IMAGE_NAME=xilinx-zynqmp-common-v2022.1 | ||
all: prep_common sw_comp dtb pfm_fsbl pfm prep_sw_comp prep_sysroot | ||
main: prep_common sw_comp pfm_partial prep_sw_comp pfm dtb | ||
|
||
prep_common: | ||
@echo "Extract the common Image.(if no common image ,please download it)" | ||
tar xvf xilinx-zynqmp-common-v2022.1.tar.gz -C . | ||
|
||
|
||
sw_comp: $(COMMON_IMAGE) | ||
@echo "INFO: Copying software components from common image DIR to local directory ./boot and ./sd_dir" | ||
mkdir -p ./sd_dir && mkdir -p ./boot && \ | ||
cp xilinx-zynqmp-common-v2022.1/bl31.elf boot/ | ||
cp xilinx-zynqmp-common-v2022.1/u-boot.elf boot/ | ||
cp xilinx-zynqmp-common-v2022.1/boot.scr sd_dir/ | ||
|
||
dtb: | ||
@echo "execute createdts to generate dtb file" | ||
-xsct -eval " createdts -hw ../step1_vivado/build/vivado/$(XSA_NAME)_hw.xsa -zocl -platform-name mydevice -out . -git-branch xlnx_rel_v2021.2 -board zcu104-revc -compile " | ||
cp mydevice/psu_cortexa53_0/device_tree_domain/bsp/system.dtb boot/ | ||
cp mydevice/psu_cortexa53_0/device_tree_domain/bsp/system.dtb sd_dir/ | ||
|
||
pfm_fsbl: | ||
@echo "INFO: Creating simple Platform $(PLATFORM_NAME_FSBL) to get FSBL and PMU" | ||
#FSBL option is to convince XSCT to create a simple platform to get FSBL and PMU. | ||
xsct xsct_create_pfm.tcl $(PLATFORM_NAME_FSBL) $(XSA_NAME) ../step1_vivado/build/vivado fsbl | ||
@echo "INFO: Checking created platforms:" && find . -name "*.xpfm" | ||
|
||
pfm: | ||
cp $(PLATFORM_NAME_FSBL)/zynqmp_fsbl/fsbl_a53.elf boot/fsbl.elf | ||
cp $(PLATFORM_NAME_FSBL)/zynqmp_pmufw/pmufw.elf boot/ | ||
@echo "INFO: Creating Final Platform $(PLATFORM_NAME)" | ||
xsct xsct_create_pfm.tcl $(PLATFORM_NAME) $(XSA_NAME) ../step1_vivado/build/vivado | ||
@echo "INFO: Checking created platforms:" && find . -name "*.xpfm" | ||
prep_sw_comp: | ||
mkdir -p sw_comp && \ | ||
cp xilinx-zynqmp-common-v2022.1/rootfs.ext4 ./sw_comp && \ | ||
cp xilinx-zynqmp-common-v2022.1/Image ./sw_comp | ||
|
||
prep_sysroot: | ||
rm -rf ./sysroot && mkdir sysroot && sh xilinx-zynqmp-common-v2022.1/sdk.sh -d sysroot -y | ||
clean: | ||
$(RM) -r vitis_* xrc.log build sd_dir boot xilinx-zynqmp-common-v2022.1 sysroot | ||
ultraclean: clean | ||
$(RM) -r sw_comp $(PLATFORM_NAME) $(PLATFORM_NAME_FSBL) device-tree-xlnx xilinx-zynqmp-common-v2022.1.tar.gz mydevice |
64 changes: 64 additions & 0 deletions
64
...tform_Creation/Design_Tutorials/02-Edge-AI-ZCU104/ref_files/step2_pfm/xsct_create_pfm.tcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright 2022 Xilinx Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
set platform_name [lindex $argv 0] | ||
puts "The platform name is \"$platform_name\"" | ||
set xsa_name [lindex $argv 1] | ||
puts "The xsa name is \"$xsa_name\"" | ||
set xsa_path [lindex $argv 2] | ||
puts "The xsa path is \"$xsa_path\"" | ||
#set OUTPUT platform_repo | ||
#we use setws command to specify the current directory as output directory. If you do not use ,you can set -out option. | ||
setws . | ||
|
||
if { [string equal -nocase fsbl [lindex $argv 3]] } { | ||
|
||
puts "create a simple Platform to get FSBL and PMU" | ||
platform create -name $platform_name \ | ||
-desc "A custom platform ZCU104 platform" \ | ||
-hw ${xsa_path}/${xsa_name}_hw.xsa \ | ||
-hw_emu ${xsa_path}/${xsa_name}_hwemu.xsa \ | ||
-fsbl-target psu_cortexa53_0 | ||
#-out ./${OUTPUT} | ||
|
||
# Standalone Domain | ||
domain create -name standalone -proc psu_cortexa53_0 -os standalone -arch {64-bit} | ||
platform write | ||
platform generate | ||
} else { | ||
|
||
puts "create final Vitis platform" | ||
platform create -name $platform_name \ | ||
-desc "A custom platform ZCU104 platform" \ | ||
-hw ${xsa_path}/${xsa_name}_hw.xsa \ | ||
-hw_emu ${xsa_path}/${xsa_name}_hwemu.xsa \ | ||
-no-boot-bsp | ||
#-out ./${OUTPUT} | ||
|
||
# Linux domain | ||
domain create -name xrt -proc psu_cortexa53 -os linux -arch {64-bit} -runtime {ocl} -sd-dir {./sd_dir} -bootmode {sd} | ||
domain config -boot {./boot} | ||
domain config -generate-bif | ||
domain config -qemu-data ./boot | ||
platform write | ||
platform generate | ||
|
||
} | ||
|
||
exit | ||
|
||
|
||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.