Update Device Tree

版本 1.0.0 (4.4 KB) 作者: Dr. Kaputa
This code base instructs the user how to recompile their Zynq SoC device tree in order to enable the linux user space VDMA driver.
51.0 次下载
更新时间 2024/1/25

The below lines should be run on the Zynq SoC within the directory containing the image.ub file.

apt-get install u-boot-tools apt-get install device-tree-compiler dumpimage -T flat_dt -p 0 -i image.ub zImage dumpimage -T flat_dt -p 1 -i image.ub system.dtb

dumpimage -l image.ub use this information and a sample image.its file to create your custom image.its file note that an image.its file for the Zynq 7020 is included in this repository.

sudo dtc -I dtb -O dts -o system.dts system.dtb modify device tree via the instructions below sudo dtc -I dts -O dtb -o system.dtb system.dts mkimage -f image.its image.ub

image.its is not supplied via image.ub originally. It needs to be created by the user.
https://www.gibbard.me/linux_fit_images/

The device tree snippets that must be added are listed below. Advanced users can change the buffer memory addresses such as 0x31000000 as they were chosen arbitrarily. The 0x43000000 reg memory address must match the AXI lite memory address of the Xilinx VDMA block. This device tree modification will allow for one to run the user space VDMA driver in tripple buffering mode.

	vdma1-read-reg {
		compatible = "generic-uio";
		reg = <0x43000000 0x1000>;
	};
	
	vdma1-read-buf1 {
		compatible = "generic-uio";
		reg = <0x31000000 0x1000000>;
	};
	
	vdma1-read-buf2 {
		compatible = "generic-uio";
		reg = <0x32000000 0x1000000>;
	};
	
	vdma1-read-buf3 {
		compatible = "generic-uio";
		reg = <0x33000000 0x1000000>;
	};

	reserved-memory {
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges;
		no-map;
		reserved@31000000 {
			reg = <0x31000000 0x3000000>;
		};
	};

also the boot args must be updated to allow for UIO as shown below.

bootargs = "root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1 uio_pdrv_genirq.of_id="generic-uio" clk_ignore_unused";

A complete .dts file is also included in the repository for reference.

引用格式

Dr. Kaputa (2025). Update Device Tree (https://github.com/ravvenlabs/update-device-tree), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2023b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库