Please let me ask for help about PetaLinux on ZYBO.
I tried to register my device as UIO at /sys/class/uio/uio* but failed. The procedure I did is in the followings. My HW module works fine via /dev/mem. But I can't find /sys/class/uio/uio*.
It would be much appreciated if you would give me any advices, comments and/or pointers.
[Design]
ARM processor
+ Xilinx GPIO IP connected via AXIGP
+ my own module as user IP connected via AXIGP
* LEDs, SWs, BTNs, simple counter, UART display for debugging
* loopback connection via for test of my own module
[Tools]
Vivado & SDK 2015.4 on Windows 10 Pro
PetaLinux v2015.4 final on Ubuntu 14.04.4 LTS
---------------------------------------------------------------- 1. Procedure with Vivado and SDK on Win10
On Vivado, I have integrated IPs including ARM, GPIO, my module and others by IP integrator. They are compiled with the top module and debugging peripherals to be a bitstream. The HW platform is imported in SDK. It seems to work fine with a test program in the 'standalone' mode. I also build the FSBL with the template in the 'standalone' mode.
I export the HW platform to Ubuntu PC equipped with PetaLinux.
---------------------------------------------------------------- 2. Procedure with PetaLinux builder on Ubuntu14
---------------------------------------------------------------- 3. Procedure on ZYBO with the above microSD
(Bootup PetaLinux and login as root)
root@plhw2:~# ls /sys/class/gpio/
export gpiochip842 gpiochip874 gpiochip906 unexport
root@plhw2:~# gpio-demo -g 842 -o 0xaa
: (GPIOs seem to work fine with my debugging peripherals)
root@plhw2:~# ls /sys/class/uio
ls: /sys/class/uio: No such file or directory
root@plhw2:~# modprobe uio
root@plhw2:~# ls /sys/class/uio (empty)
root@plhw2:~# lsmod
Not tainted
uio 6934 0 - Live 0xbf058000
ipv6 256764 12 [permanent], Live 0xbf000000
root@plhw2:~# modprobe uio_pdrv_genirq
root@plhw2:~# lsmod
Not tainted
uio_pdrv_genirq 2650 0 - Live 0xbf05e000
uio 6934 1 uio_pdrv_genirq, Live 0xbf058000
ipv6 256764 12 [permanent], Live 0xbf000000
root@plhw2:~# ls /sys/class/uio/ (empty)
root@plhw2:~# mdev -s
root@plhw2:~# ls /dev/*uio*
ls: /dev/*uio*: No such file or directory
Question
izumitomonori
Dear Experts,
Please let me ask for help about PetaLinux on ZYBO.
I tried to register my device as UIO at /sys/class/uio/uio* but failed. The procedure I did is in the followings. My HW module works fine via /dev/mem. But I can't find /sys/class/uio/uio*.
It would be much appreciated if you would give me any advices, comments and/or pointers.
Thanks in advance.
Best regards,
Tom IZUMI
----------------------------------------------------------------
[Board]
Digilent ZYBO
[Design]
ARM processor
+ Xilinx GPIO IP connected via AXIGP
+ my own module as user IP connected via AXIGP
* LEDs, SWs, BTNs, simple counter, UART display for debugging
* loopback connection via for test of my own module
[Tools]
Vivado & SDK 2015.4 on Windows 10 Pro
PetaLinux v2015.4 final on Ubuntu 14.04.4 LTS
----------------------------------------------------------------
1. Procedure with Vivado and SDK on Win10
On Vivado, I have integrated IPs including ARM, GPIO, my module and others by IP integrator. They are compiled with the top module and debugging peripherals to be a bitstream. The HW platform is imported in SDK. It seems to work fine with a test program in the 'standalone' mode. I also build the FSBL with the template in the 'standalone' mode.
I export the HW platform to Ubuntu PC equipped with PetaLinux.
----------------------------------------------------------------
2. Procedure with PetaLinux builder on Ubuntu14
% petalinux-create --type project --template zynq --name plhw2
(cd Vivado's plhw2prj/plhw2prj.sdk/ZYBO_top_hw_platform_0/ including
ZYBO_top.bit ps7_init.c ps7_init.html ps7_init_gpl.c system.hdf
Zynq_PS_bd.tcl ps7_init.h ps7_init.tcl ps7_init_gpl.h)
% petalinux-config --get-hw-description -p /home/izumi/pltest/plhw2/
(proceed with default values)
(cd petalinux project top plhw2/)
(modify my module in ./subsystems/linux/configs/device-tree/pl.dtsi
from
rizm_axilite_fifo_0: rizm_axilite_fifo@43c00000 {
compatible = "rizm_axilite_fifo";
reg = <0x43c00000 0x10000>;
};
to
rizm_axilite_fifo_0: rizm_axilite_fifo@43c00000 {
compatible = "generic-uio";
reg = <0x43c00000 0x10000>;
};
)
% petalinux-config -c kernel
(set [Device Drivers] -> [Userspace I/O drivers] to <M>)
(select [Userspace I/O platform driver with generic IRQ handling])
% petalinux-config -c rootfs
(add some apps in [Filesystem Package] and [Apps] menu)
% petalinux-build
% petalinux-package --boot --fsbl ../plhw2prj/plhw2prj.sdk/fsbl/Debug/fsbl.elf --fpga ../plhw2prj/plhw2prj.sdk/ZYBO_top_hw_platform_0/ZYBO_top.bit --uboot
(copy images/linux/{BOOT.BIN,image.ub} to microSD card)
----------------------------------------------------------------
3. Procedure on ZYBO with the above microSD
(Bootup PetaLinux and login as root)
root@plhw2:~# ls /sys/class/gpio/
export gpiochip842 gpiochip874 gpiochip906 unexport
root@plhw2:~# gpio-demo -g 842 -o 0xaa
:
(GPIOs seem to work fine with my debugging peripherals)
root@plhw2:~# ls /sys/class/uio
ls: /sys/class/uio: No such file or directory
root@plhw2:~# modprobe uio
root@plhw2:~# ls /sys/class/uio
(empty)
root@plhw2:~# lsmod
Not tainted
uio 6934 0 - Live 0xbf058000
ipv6 256764 12 [permanent], Live 0xbf000000
root@plhw2:~# modprobe uio_pdrv_genirq
root@plhw2:~# lsmod
Not tainted
uio_pdrv_genirq 2650 0 - Live 0xbf05e000
uio 6934 1 uio_pdrv_genirq, Live 0xbf058000
ipv6 256764 12 [permanent], Live 0xbf000000
root@plhw2:~# ls /sys/class/uio/
(empty)
root@plhw2:~# mdev -s
root@plhw2:~# ls /dev/*uio*
ls: /dev/*uio*: No such file or directory
9 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.