cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
simozz
Scholar
Scholar
431 Views
Registered: ‎05-14-2017

UIO devices auto symlink in /dev/ with Vivado block diagram's name

Hello,

I have a few AXI Lite slaves connected to PS in my block design, and I want to link each of them to the /dev/ dir.

So for example if I have an AXI Quad SPI named axi_quad_spi_0, I would like that this core would be accessible from /dev/axi_quad_spi_0.

A solution to this problem is to create an udev rules file, so for example:

 

KERNELS=="a0010000.axi_quad_spi", SUBSYSTEM=="uio", ATTR{name}=="axi_quad_spi", ATTR{version}=="devicetree", SYMLINK+="axi_qspi_0"

 

this works fine if you do not change the block diagram, which is quiet unusual in non-production development phase.

Is there any more flexible way to achieve what I want ?

Thanks.

s.

 

0 Kudos
4 Replies
ksloatdesignlinx
Explorer
Explorer
369 Views
Registered: ‎02-24-2020

By default, the UIO names are based on the device tree labels, which if you use the device tree generator are usually based on the block diagram names. What version of PetaLinux are you using? If you are using 2020.1 or newer, then a newer feature exists in the kernel for UIO which allows you to use a specific device tree property to override the default label it uses. The property is "linux,uio-name"

https://github.com/Xilinx/linux-xlnx/commit/b0297622a9726b929ed9f73eaa7605fd6a55df20

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com
simozz
Scholar
Scholar
362 Views
Registered: ‎05-14-2017

Hello @ksloatdesignlinx ,

It sounds good ! I am using 2019.2 so I will test it as soon as possible.

Thanks!

s.

 

0 Kudos
ksloatdesignlinx
Explorer
Explorer
361 Views
Registered: ‎02-24-2020

@simozz the feature was not introduced in Xilinx's kernel until 2020.1, so 2019.2 does not have it. However, you could manually patch it in from the commit I linked

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com
0 Kudos
simozz
Scholar
Scholar
351 Views
Registered: ‎05-14-2017

Yes I meant to test the 2020.1.

I experienced many problems using petalinux patches in the past, so probably I will download the new version.

s.

0 Kudos