How to enable and use pru-rproc/remoteproc interface for 4.14 kernel on debian?

826 views
Skip to first unread message

mallets

unread,
Feb 23, 2018, 11:01:21 PM2/23/18
to BeagleBoard
There are a lot of useful guides and manuals all over the net for using the PRUs on the BBB. Ex: http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs#LAB_4:_Introduction_to_Linux_driver
But none of them seem to be applicable to the newer images/kernel. Either the sysfs setup is wrong or those interfaces just don't exist.

What is the best way to get started on PRU programming, using the latest kernel?
I don't want to go back to an older image as I need the improved network latency provided by the 4.14 kernel (getting almost 30-40us better latency over UDP, don't know how or why). Image info below.

dogtag:[BeagleBoard.org Debian Image 2017-10-10]
bootloader
:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.09-00002-g0f3f1c7907]
kernel
:[4.14.17-ti-r32]
nodejs
:[v6.12.3]
uboot_overlay_options
:[enable_uboot_overlays=1]
uboot_overlay_options
:[disable_uboot_overlay_video=1]
uboot_overlay_options
:[disable_uboot_overlay_audio=1]
uboot_overlay_options
:[disable_uboot_overlay_wireless=1]
uboot_overlay_options
:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]
uboot_overlay_options
:[enable_uboot_cape_universal=1]
pkg
:[bb-cape-overlays]:[4.4.20180126.0-0rcnee0~stretch+20180126]
pkg
:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
pkg
:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]


Robert Nelson

unread,
Feb 24, 2018, 1:15:01 AM2/24/18
to Beagle Board, hemanthm...@gmail.com
On Fri, Feb 23, 2018 at 9:52 PM, mallets <hemanthm...@gmail.com> wrote:
> There are a lot of useful guides and manuals all over the net for using the
> PRUs on the BBB. Ex:
> http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs#LAB_4:_Introduction_to_Linux_driver
> But none of them seem to be applicable to the newer images/kernel. Either
> the sysfs setup is wrong or those interfaces just don't exist.
>
> What is the best way to get started on PRU programming, using the latest
> kernel?
> I don't want to go back to an older image as I need the improved network
> latency provided by the 4.14 kernel (getting almost 30-40us better latency
> over UDP, don't know how or why). Image info below.

TI just recently merged in their pru changes into their v4.14.x
branch, just run:

sudo /opt/scripts/tools/update_kernel.sh

>
> dogtag:[BeagleBoard.org Debian Image 2017-10-10]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot
> 2017.09-00002-g0f3f1c7907]
> kernel:[4.14.17-ti-r32]
> nodejs:[v6.12.3]
> uboot_overlay_options:[enable_uboot_overlays=1]
> uboot_overlay_options:[disable_uboot_overlay_video=1]
> uboot_overlay_options:[disable_uboot_overlay_audio=1]
> uboot_overlay_options:[disable_uboot_overlay_wireless=1]
> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]

Remove this option ^...

> uboot_overlay_options:[enable_uboot_cape_universal=1]
> pkg:[bb-cape-overlays]:[4.4.20180126.0-0rcnee0~stretch+20180126]
> pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
> pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]

Regards,

--
Robert Nelson
https://rcn-ee.com/

Bill M

unread,
Apr 9, 2019, 7:20:46 PM4/9/19
to BeagleBoard
Greetings Robert,

I apologize for the necro/somewhat-off-topic post. What is the best way to access PRU remoteproc carveouts from userspace?

I have a (working) project for reading an 8-bit parallel interface camera that I originally wrote using UIOPRUSS. I decided to take the plunge and work through the remoteproc documentation to see if I could move to that. I didn't want to use rpmsg, because I doubted it could handle the data velocity (320 x 240 x 24bit color x 15 frames per second = 3,456,000 bytes, roughly 3MB a second). I discovered carveouts in the resource table headers, and thought this was excellent since it was much like how I was already doing it with UIOPRUSS. It works and simplifies the code greatly, but I have to use debugfs to get the carveout location to mmap to, which seems less than ideal.

Any suggestions appreciated.
Reply all
Reply to author
Forward
0 new messages