Is it possible to use 'exported hardware' and udev to dynamically load kernel drivers to control FPGA cores?

55 views
Skip to first unread message

David M

unread,
Dec 22, 2017, 11:44:08 AM12/22/17
to snickerdoodle forum

When building an image for the FPGA with Vivado you can use 'export hardware' to transfer all the information about the image to the SDK. Could this same file be used to load an image into a running Snickerdoodle and then use udev to load kernel modules to control the FPGA cores?

Is this already available?

It seems like there would need to be a daemon that udev calls to parse the hardware information and create something like a dtb file to initialize all the drivers.

Bush

unread,
Jan 2, 2018, 7:09:44 PM1/2/18
to snickerdoodle forum
I'm not sure exactly what you're describing but there is not a way to directly parse and load a hardware specification using a running snickerdoodle. Because critical information provided by the hardware specification is used to properly initialize the device, booting the snickerdoodle without this information wouldn't make much sense. If the hardware specification contains custom peripheral configurations (e.g. ENET or USB on J3, peripherals on EMIO), the configuration of those peripherals will need to be included in the FSBL and thus can't be added after the device has already bee booted. Doing run-time configuration updates/changes is possible but only in a very limited number of cases where the device does not require FSBL initialization and the device is fully supported by the kernel either through built-in support/drivers or kernel modules. However, there are a few off-line tools that can be used to help automate the process of building a bootable system from the information provided by the hardware specification:

Devicetree overlays (.dtbo) can be used to modify/augment a currently running system. If the initialization of the devices can be done without the need for changes to the FSBL, adding the device using a dtbo can provide an interface to access the device in the Linux system.

A devicetree generation BSP exists for creating a devicetree using the exported hardware specification: https://github.com/Xilinx/device-tree-xlnx

Petalinux tools can be used to configured the devicetree, kernel modules, etc.: http://www.wiki.xilinx.com/PetaLinux+Getting+Started

I hope this answers your question but I'm not sure I fully understand the use-case or exactly what sort of development system you are trying to set up for yourself so please let me know if you need any more information/clarification. Also, please let me know if you'd like any more info on the few suggestions I've made.
Reply all
Reply to author
Forward
0 new messages