Trouble loading a custom DTO

Hi,

So I’ve been having issues loading a custom DTO on my Beaglebone Black (well, green, really…). Anyway…

I’ve been following the book Exploring Beaglebone because there’s a lot of good information here. I’ve made a custom .dtbo with pin settings that I’m interested in using because I want to interface with the PRU. I try to run the command

‘echo PRU_cape > /sys/devices/bone_capemgr.9/slots’

but every time I try to execute the command I get

‘echo: write error: Invalid argument’

So then I figured maybe I could just go into slots and edit the file to include the name (I’m thinking that the part number is the correct thing to add to this?) manually. When I try to edit /sys/…/slots and save it using nano, I get an error that the file doesn’t exist.

Anyone else have any trouble loading a DTO? Am I missing something?

Any help would be much appreciated, thanks!

Hi,

So I've been having issues loading a custom DTO on my Beaglebone Black
(well, green, really..). Anyway..

I've been following the book Exploring Beaglebone because there's a lot of
good information here. I've made a custom .dtbo with pin settings that I'm
interested in using because I want to interface with the PRU. I try to run
the command

'echo PRU_cape > /sys/devices/bone_capemgr.9/slots'

but every time I try to execute the command I get

'echo: write error: Invalid argument'

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Privileged_echo

So then I figured maybe I could just go into slots and edit the file to
include the name (I'm thinking that the part number is the correct thing to
add to this?) manually. When I try to edit /sys/.../slots and save it using
nano, I get an error that the file doesn't exist.

Anyone else have any trouble loading a DTO? Am I missing something?

Any help would be much appreciated, thanks!

Regards,

When I try that I get

sh: echo: I/O error

and what error does "dmesg | grep bone" show after that?

Regard,

sh: 1: cannot create /sys/devices/bone_capemgr.9/slotsdmesg: Directory nonexistent

This isn’t true, I can definitely cd into that directory and it does exist. I have also given 777 permisions to that entire directory in case there was some weird permission thing going on…

Also, just in case you’re interested…

root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:56 UTC 2015 armv7l GNU/Linux

Wanted to bump this in case anyone has seen anything like it. Instead of making my own DTO, I tried to load the DTO from the libpruio repo. I don’t get any error when I try to echo the cape to the cape manager slots path… Here are the artifacts from my latest session…

root@beaglebone:/home/libpruio/libpruio-0.2# sudo sh -c “echo libpruio >> /sys/devices/bone_capemgr.9/slots”

root@beaglebone:/home/libpruio/libpruio-0.2# cat /sys/devices/bone_capemgr.9/slots

0: 54:PF—

1: 55:PF—

2: 56:PF—

3: 57:PF—

4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G

If I’m not mistaken it should appear under 4? I’m not getting any I/O error like before, but it doesn’t look like the cape is loading properly…

Has anyone else seen this?

I’m seeing this now…

[ 820.596818] bone-capemgr bone_capemgr.9: slot #7: Incompatible with baseboard for ‘libpruio’

[ 820.605916] bone-capemgr bone_capemgr.9: slot #7: Failed verification

Does it matter than I’m using a Beaglebone Green instead of Black?

Looking at dmesg for startup of the board it turns out that it does matter what you set the compatability field to in the DTO. I got it to apply… Feels good! :smiley:

Hi Sam!

The libpruio.dtbo file is from the time before BBG. Just add it in file libpruio-00A0.dts to the compatible line:

compatible = "ti,beaglebone", "ti,beaglebone-black";

should get

compatible = "ti,beaglebone", “ti,beaglebone-black”``, “ti,beaglebone-green”;

Then recomplie it to /lib/firmware by

sudo dtc -@ -I dts -O dtb -o /lib/firmware/libpruio-00A0.dtbo libpruio-00A0.dts

If you want to use the tools dts_custom.bas or dts_universal.bas, you also have to adapt the macro ALL_START in file pruiotools.bas.

BR