4.4.x-ti kernel with rproc & uio (r34)

1,765 views
Skip to first unread message

Robert Nelson

unread,
Jul 6, 2016, 10:56:13 AM7/6/16
to Beagle Board, William Hermans, John Syne, Jason Kridner
Okay, starting with r34, (4.4.14-ti-r34/4.4.14-ti-rt-r34)

You can swap between rproc and uio for the pruss...

while, uio can be loaded as an overlay, rproc was failing, so we need
to use the dtb-rebuilder...

Step 1:

upgrade to r34 and reboot:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#4.4.x-ti

Step 2:

Install dtb-rebuilder:

git clone -b 4.4-ti https://github.com/RobertCNelson/dtb-rebuilder
dtb-4.4-ti --depth=1
cd ./dtb-4.4-ti/

Step 3: (rproc)

Edit your device tree:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-bonegreen.dts#L16-L22

nano src/arm/am335x-bonegreen.dts

Change:
/* #include "am33xx-pruss-rproc.dtsi" */ -> #include "am33xx-pruss-rproc.dtsi"
make ; sudo make install

set blacklist:

cat /etc/modprobe.d/pruss-blacklist.conf

blacklist uio_pruss

and reboot..

debian@beaglebone:~$ dmesg | grep pru
[ 3.006675] ti-pruss 4a300000.pruss: creating PRU cores and other
child platform devices
[ 3.007791] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !
[ 3.008351] irq: no irq domain found for /ocp/pruss@4a300000/intc@4a320000 !
[ 3.028561] remoteproc1: 4a334000.pru0 is available
[ 3.036995] remoteproc1: Direct firmware load for am335x-pru0-fw
failed with error -2
[ 3.037020] remoteproc1: failed to load am335x-pru0-fw
[ 3.042449] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 3.042463] remoteproc1: powering up 4a334000.pru0
[ 3.042529] remoteproc1: Direct firmware load for am335x-pru0-fw
failed with error -2
[ 3.047670] pru-rproc 4a334000.pru0: rproc_boot failed
[ 3.083760] remoteproc1: releasing 4a334000.pru0
[ 3.083905] pru-rproc: probe of 4a334000.pru0 failed with error -2
[ 3.084240] remoteproc1: 4a338000.pru1 is available
[ 3.084464] remoteproc1: Direct firmware load for am335x-pru1-fw
failed with error -2
[ 3.084482] remoteproc1: failed to load am335x-pru1-fw
[ 3.092879] pru-rproc 4a338000.pru1: booting the PRU core manually
[ 3.092899] remoteproc1: powering up 4a338000.pru1
[ 3.092979] remoteproc1: Direct firmware load for am335x-pru1-fw
failed with error -2
[ 3.098136] pru-rproc 4a338000.pru1: rproc_boot failed
[ 3.135593] remoteproc1: releasing 4a338000.pru1
[ 3.135739] pru-rproc: probe of 4a338000.pru1 failed with error -2


Step 3: (uio)

Edit your device tree:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-bonegreen.dts#L24-L32

nano src/arm/am335x-bonegreen.dts

Change:
/* #include "am33xx-pruss-uio.dtsi" */ -> #include "am33xx-pruss-uio.dtsi"
make ; sudo make install

set blacklist:

cat /etc/modprobe.d/pruss-blacklist.conf

blacklist pruss
blacklist pruss_intc
blacklist pru-rproc

and reboot..

debian@beaglebone:~$ dmesg | grep pru
[ 11.582433] pruss_uio 4a300000.pruss: pins are not configured from the driver

debian@beaglebone:~$ lsmod | grep uio
uio_pruss 4928 0
uio_pdrv_genirq 3539 0
uio 8822 2 uio_pruss,uio_pdrv_genirq


Regards,

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

John Syne

unread,
Jul 6, 2016, 2:23:22 PM7/6/16
to Robert Nelson, Beagle Board, William Hermans, Jason Kridner
I’m guessing you don’t have the PRU firmware loaded and that I why you are getting these errors?

Regards,
John

James Strawson

unread,
Jul 6, 2016, 3:43:34 PM7/6/16
to Robert Nelson, John Syne, William Hermans, Jason Kridner, Beagle Board

Excellent! UIO has been the only thing keeping me from migrating to Jessie. I'll report on my findings. I trust this kernel will make its way into a new stable release on beagleboard.org/latest-images at some point?

--
You received this message because you are subscribed to the Google Groups "Beagle Alpha" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagle-alpha...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rick Mann

unread,
Jul 6, 2016, 4:37:11 PM7/6/16
to beagl...@googlegroups.com, William Hermans, John Syne, Jason Kridner
Outstanding work, Robert. Thank you.
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYiqFZ%3Dimsyn7nfJDHGuYd45QOoBDBi_eJfDmsRMEBy_YA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


Jason Kridner

unread,
Jul 6, 2016, 4:48:59 PM7/6/16
to Rick Mann, beagl...@googlegroups.com, William Hermans, John Syne
This is awesome, but shouldn't one of them be enabled by default? Would be great to report an issue with rproc not loading as an overlay.

John Syne

unread,
Jul 6, 2016, 5:12:38 PM7/6/16
to Jason Kridner, Rick Mann, Beagle Board, William Hermans, TJF
I think the consensus was not not have either installed as default and that way we keep both side happy. Also, most BBB users don’t use PRU. BTW, I added TJF to the list since his persistence lead us to this solutions. 

Regards,
John



TJF

unread,
Jul 7, 2016, 1:14:59 PM7/7/16
to BeagleBoard, robert...@gmail.com
@John


BTW, I added TJF to the list since his persistence lead us to this solutions.

Thank you!


Am Mittwoch, 6. Juli 2016 16:56:13 UTC+2 schrieb RobertCNelson:
Okay, starting with r34, (4.4.14-ti-r34/4.4.14-ti-rt-r34)

You can swap between rproc and uio for the pruss...

I tested uio on a BBB Rev C. All seems to work fine. Also the campemgr bug is fixed :-)

@RCN:
I don't like the blacklist and dtb-rebuilder part, but anyway, it's a working solution, and that helps the community a lot. Thank you very much for the fast implementation.

Are there still differences in the "bone" channel? Do we need it any more?

BR

TJF

unread,
Jul 7, 2016, 1:22:12 PM7/7/16
to BeagleBoard
I forgot to mention: the line wrapping is confusing here

Am Mittwoch, 6. Juli 2016 16:56:13 UTC+2 schrieb RobertCNelson:
Step 2:

Install dtb-rebuilder:

git clone -b 4.4-ti https://github.com/RobertCNelson/dtb-rebuilder
dtb-4.4-ti
--depth=1
cd ./dtb-4.4-ti/

For me it worked this way


cd
./dtb-4.4-ti/0

BR

Joseph Heller

unread,
Apr 29, 2017, 8:34:37 AM4/29/17
to BeagleBoard, yyr...@gmail.com, john...@gmail.com, jkri...@beagleboard.org
On Wednesday, July 6, 2016 at 4:56:13 PM UTC+2, RobertCNelson wrote:
Step 3: (uio)

Edit your device tree:

nano src/arm/am335x-bonegreen.dts

Change:
/* #include "am33xx-pruss-uio.dtsi" */ -> #include "am33xx-pruss-uio.dtsi"
make ; sudo make install

set blacklist:

cat /etc/modprobe.d/pruss-blacklist.conf

blacklist pruss
blacklist pruss_intc
blacklist pru-rproc

and reboot..
 
I managed to get uio working previously, but not anymore with latest image (uname -r: 4.4.54-ti-r93). I ended up here from another post. Did something change with respect to the above?

I can see my edited and compiled dtb did get loaded via uEnv.txt  (and yes, I also blacklisted the remoteproc drivers), but still Remoteproc is loaded instead of uio. Per guide above, I also wonder if in the second step 3 the remoteproc dtsi should be disabled. I did, as in the latest image it seems to be enabled by default. My guess is some generic device tree is referring to Remoteproc?

Actually, I was making a web page explaining a generic way how to get uio working on newer kernels - for everybody to enjoy and quickly jump to programming the PRUs with uio instead of struggling to get the driver working in the first place, but my enthusiasm plummethed when I noticed the way to do it changes so often.

Robert Nelson

unread,
Apr 29, 2017, 12:36:17 PM4/29/17
to Beagle Board, William Hermans, John Syn, Jason Kridner, Joseph Heller
Yeah sorry about that, switch to:

4.4.62-ti-r99

both modules are enabled again.

on monday after sunday's snapshot get's pushed out, i'll have a new
easier way to switch between the two pru implementations, using u-boot
overlays and just one line in /boot/uEnv.txt..

Just got it working yesterday.

William Hermans

unread,
Apr 29, 2017, 4:33:27 PM4/29/17
to Robert Nelson, beagl...@googlegroups.com
Awesome.
Reply all
Reply to author
Forward
0 new messages