Loading bitstream inside linux #45

Closed
opened 2024-03-06 17:16:07 +08:00 by fsagbuya · 1 comment
Collaborator

To load the bitstream inside linux we can use

Also the we can utilize the command fpgautil from https://github.com/elhep/Fast-Servo-Firmware/blob/master/README.md?plain=1#L132 (.

However, the user-space interface to run those commands is only available when enabling CONFIG_OF_CONFIGFS or the DT overlay ConfigFS interface, which is not available in the mainline Linux for now. There are some proposals about it here.

Proposed approaches are:

  • (1) Use the linux-xilinx fork
  • (2) Patch the mainline linux (against the xilinx fork) to have the drivers available
  • (3) Try to program using the generic FPGA Manager from the mainline linux

Current sysfs interface of the fpga manager from mainline linux:

-bash-5.2# cd ../sys/class/fpga_manager/fpga0 && ls
device	name  of_node  power  state  status  subsystem	uevent

@sb10q Would like to know your thoughts.

To load the bitstream inside linux we can use - [Device Tree Overlays](https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841645/Solution+Zynq+PL+Programming+With+FPGA+Manager#SolutionZynqPLProgrammingWithFPGAManager-UsingDeviceTreeOverlay:) or - The [sysfs interface](https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841645/Solution+Zynq+PL+Programming+With+FPGA+Manager#SolutionZynqPLProgrammingWithFPGAManager-Usingsysfsinterface) Also the we can utilize the command `fpgautil` from https://github.com/elhep/Fast-Servo-Firmware/blob/master/README.md?plain=1#L132 (. However, the user-space interface to run those commands is only available when enabling `CONFIG_OF_CONFIGFS` or the [DT overlay ConfigFS interface](https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841645/Solution+Zynq+PL+Programming+With+FPGA+Manager#SolutionZynqPLProgrammingWithFPGAManager-KernelConfiguration), which is not available in the mainline Linux for now. There are some proposals about it [here](https://lore.kernel.org/lkml/DM6PR12MB3993D5ECA50B27682AEBE19FCD67A@DM6PR12MB3993.namprd12.prod.outlook.com/). Proposed approaches are: - (1) Use the [linux-xilinx](https://github.com/Xilinx/linux-xlnx) fork - (2) Patch the mainline linux (against the xilinx fork) to have the drivers available - (3) Try to program using the [generic FPGA Manager](https://www.kernel.org/doc/html/v5.1/driver-api/fpga/fpga-mgr.html) from the mainline linux Current sysfs interface of the fpga manager from mainline linux: ``` -bash-5.2# cd ../sys/class/fpga_manager/fpga0 && ls device name of_node power state status subsystem uevent ``` @sb10q Would like to know your thoughts.
Owner

Try the mainline solution with the generic FPGA manager. The Linux kernel is developed to a higher standard of quality than most Xilinx software.

Try the mainline solution with the generic FPGA manager. The Linux kernel is developed to a higher standard of quality than most Xilinx software.
sb10q closed this issue 2024-03-14 14:50:05 +08:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nix-servo#45
No description provided.