prussdrv_open() on new debian kernel

I’ve been trying for hours to get PRU working on the latest supported kernel on my BBGW and BBG. I’ve edited the .dtb and when I cat the slots, it says its loaded, but every time I try to use the PRU, it fails on prussdrv_open(). Is there something different with the latest supported debian kernel I’m missing that changes how the PRUs work? When I try to roll back the kernel, the beagle fails to boot.

Hi Joseph,

sudo: /opt/scripts/tools/version.sh: command not found

I’m running 4.4.30-ti-r64

"confused" ... you said:

"I've been trying for hours to get PRU working on the latest supported kernel"

4.4.30-ti-r64 release …
RobertCNelson committed on Nov 4, 2016 (11/4/2016 2:19:40 PM)

That's from last year.. "definitely not latest"... :wink:

So let's decide on what you really want..

OS: Debian 8.x (Jessie)
OS: Debian 9.x (Stretch)

PRU:

TI's remoteproc (v4.4.x-ti kernel, and used by librobotics')
Community: UIO (what we used in 3.8.x and ported to everything else)

So pick and option from OS and PRU and we'll point you to a new image
and kernel..

Regards,

I’m not sure really what librobotics is, and Debian 9.x (Stretch) would be preferred.

Then pick your base: (bone-XYZ.img.xz files)

https://rcn-ee.net/rootfs/bb.org/testing/2017-11-26/

Use etcher.io to create the microSD

Stretch ships with v4.9.x-ti which uses a new version of pru_remoteproc.

So either downgrade to v4.4.x-ti with pru_remoteproc that was used
with the BeagleBone Blue (and robotics stuff)

Or upgrade to v4.14.x-bone and utiilze uio_pruss (compabile with all
the old 3.8.x pru directions)..

Then finally configure all the pins how you want:

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays

Regards,

How do I upgrade to v4.14.x-bone, the update_kernel.sh only lists TI kernels

--bone-kernel --lts-4_14

Regards,

Where would the slots file now be located. Its not in the /sys/devices/platform/bone_capemgr/ directory for me

Slots file is disabled when using U-Boot Overlays:

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays

Regards,

Ok so I am now load and execute on the PRUs, but how do I set the pinmux for the PRUs. I think it would use the U-Boot Cape Universal but the load example uses slots.

you can use config-pin to mux in the pins for the pru...

Regards,

When setting config-pin P8.11 pruout, I get bash: /sys/devices/platform/ocp/ocp*P8_11_pinmux/state: No such file or directory
. Is there a specific overlay I need to use, my custom ones don’t seem to work and the cape-universal-00A0.dtbo overlay locks my beagle into a boot loop.

P8_11 should be auto loaded, lets' check out your:

sudo /opt/scripts/tools/version.sh

Regards,

[sudo] password for debian:
git:/opt/scripts/:[e5c23dc2a45f5c9ace291dd32e7c3d79edc1932d]
eeprom:[A335BNLTGW1ABBGW17052298]
model:[TI_AM335x_BeagleBone_Green_Wireless]
dogtag:[BeagleBoard.org Debian Image 2017-11-26]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.11-00002-g7b415acfc1]
kernel:[4.14.3-bone5]
nodejs:[v6.12.0]
device-tree-override:[uboot_overlay_addr0=/lib/firmware/am335x-boneblack-nhdmi-overlay.dtb]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/am335x-boneblack-nhdmi-overlay.dtb]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20171120.0-0rcnee1~stretch+20171120]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1~stretch+20170829]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]

There's your issue ^^ remove that option.. it's block the
cape-universal overlay.

With U-Boot overlays, you need to disable the onboard hardware like so:

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

Regards,