cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hoanggiamta
Visitor
Visitor
700 Views
Registered: ‎09-03-2017

UIO files not created in petalinux 2017.2

Dear all,

 

I use the following setup in order to build my custom PL running under control from the host via UIO:

- Ubuntu 16.04

- Petalinux 2017.2

- Vivado 2017.2

- ZynqMP ZC102

 

However, when Petalinux running on Zynq, there are no UIO files created.

- ls /dev/uio  --> empty

- ls /sys/class/uio/  --> empty

But:

- ls /proc/devie-tree/uio  --> uio0  uio1  uio2

 

So do you think that I successfully built a device-tree with my 3 uio nodes, but I failed to register these 3 uio nodes in /dev  & in /sys/class/uio? Can you have any recommendation for my case?

 

Here is the steps I followed:

- step 1: create a Petalinux project:

     petalinux-create --type project --template zynqMP --name my_petalinux_project -s dir_to_BSP/Xilinx-ZCU102-v2017.2-final.bsp

 

- step 2: cd to the project, then config:

    petalinux-config --get-hw-description=my_vivado_project.sdk

 

   In this step: go into Kernel Bootargs:

       generate boot args automatically --> "y"

       enable kernel earlyprintk  --> "y"

       Auto generated bootargs: --> "earlycon clk_ignore_unused uio_pdrv_genirq.of_id=generic-uio"

 

- step 3:

    petalinux-config  -c kernel

 

    In this step: go into Device Drivers  --> Userspace I/O drivers: Userspace I/O platform driver with generic IRQ handling --> "y"

 

- step 4: Modify system-user.dtsi in project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi, and the content of system-user.dtsi after modification is:

 

/include/ "system-conf.dtsi"
/ {
    uio0 {
            compatible = "generic-uio";
            status = "okay";
            reg = <0x0 0xa0000000 0x0 0x10000>;
        };
    uio1 {
            compatible = "generic-uio";
            status = "okay";
            reg = <0x0 0xa0010000 0x0 0x10000>;
        };
    uio2 {
            compatible = "generic-uio";
            status = "okay";
            reg = <0x0 0xa0020000 0x0 0x10000>;
        };
};

 

I also modified system-top.dts in components/plnx_workspace/device-tree-generation/system-top.dts by appending the following content in the top level:

 

uio0 {
            compatible = "generic-uio";
            status = "okay";
            reg = <0x0 0xa0000000 0x0 0x10000>;
    };
  uio1 {
            compatible = "generic-uio";
            status = "okay";
            reg = <0x0 0xa0010000 0x0 0x10000>;
    };
  uio2 {
            compatible = "generic-uio";
            status = "okay";
            reg = <0x0 0xa0020000 0x0 0x10000>;
    };

 

- step 5:

    petalinux-build 

 

- step 6: Package:

    petalinux-package --boot --format BIN --fsbl images/linux/zynqmp_fsbl.elf --fpga images/linux/config_mpsoc_wrapper.bit --u-boot images/linux/u-boot.elf -o images/linux/BOOT.BIN --force

 

- step 7: Copy BOOT.BIN and image.ub to SD card and boot the ZynqMP board.

 

After booting, I could not find UIO files in /dev/ and in /sys/class/uio/ as mentioned above?

Can anyone help me to point out the problems and how to fix? Thank you very much.

 

   

0 Kudos
0 Replies