Load device tree overlay for Beaglebone Black Kernel 4.4.17 and load PRU .bin
<p>I am having trouble loading a device tree overlay on my BBB. I'm running Debian Linux 8 (jessie), Kernel 4.4.17-bone13 </p>

<p>The OS did not come with cape manager installed so I got it from here...
<a href="https://github.com/beagleboard/bb.org-overlays" rel="nofollow">https://github.com/beagleboard/bb.org-overlays</a></p>

<p>I followed the instruction to get it setup, everything seemed to go fine. Now I have try to load my device tree overlay...</p>

<pre><code>root@beaglebone:~# cd /lib/firmware
root@beaglebone:/lib/firmware# dtc -O dtb -I dts -o /lib/firmware/PRU-GPIO-EXAMP                                                                                                                                                             LE-00A0.dtbo -b 0 -@ PRU-GPIO-EXAMPLE-00A0.dts
root@beaglebone:/lib/firmware# cat /sys/devices/platform/bone_capemgr/slots
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
root@beaglebone:/lib/firmware# sudo sh -c "echo 'PRU-GPIO-EXAMPLE-00A0' &gt; /sys/devices/platform/bone_capemgr/slots"
root@beaglebone:/lib/firmware# cat /sys/devices/platform/bone_capemgr/slots
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
 4: P-O-L-   0 Override Board Name,00A0,Override Manuf,PRU-GPIO-EXAMPLE
</code></pre>

<p>So far it looks good now I try to load my PRU program...</p>

<pre><code>root@beaglebone:/usr# cd /usr/local/test
root@beaglebone:/usr/local/test# ls
Makefile  libprussdrv.a  pasm  pruss_intc_mapping.h  prussdrv.h  testPRU  testPRU.c  testPRU_Off.bin  testPRU_Off.p  testPRU_On.bin  testPRU_On.p
root@beaglebone:/usr/local/test# ./testPRU testPRU_On.bin
prussdrv_open() failed
</code></pre>

<p>I almost got everything working but I'm getting a prussdrv_open() failed error and no clue why. The code for everything came off here...
<a href="http://credentiality2.blogspot.com/2015/09/beaglebone-pru-gpio-example.html" rel="nofollow">http://credentiality2.blogspot.com/2015/09/beaglebone-pru-gpio-example.html</a></p>

<pre><code> // If this segfaults, make sure you're executing as root.  
  prussdrv_init();  
  if (prussdrv_open(PRU_EVTOUT_0) == -1) {  
   printf("prussdrv_open() failed\n");  
   return 1;  
  }  
</code></pre>

<p>If I had to guess the example I have been following is out of date and something has changed. I already know the way you load tree overlays has changed. Maybe the .dts file format has changed or I have to make another call to the prussdrv libarary before I make the prussdrv_open() call now. Let me know what you think could be causing this.</p>