dinuxbg / pru-gcc-examples

Simple example projects for PRU-GCC
49 stars 12 forks source link

PRU_RPMsg_Echo_Interrupt1.elf: Boot failed: -22 #14

Closed matwey closed 1 year ago

matwey commented 2 years ago

Hello,

I am running upstream Linux kernel 5.19.2. gcc (and pru-gcc) versions are 12.1.1. gnuprumcu version is 0.8.0 My platform is Beagle Bone Black (AM335x) rev C

I would like to try Hands_on_Labs/lab_5. While it builds successfully, I cannot run it. I do the following:

# cd /sys/devices/platform/ocp/4a000000.interconnect/4a000000.interconnect:segment@0/4a326000.target-module/4a300000.pruss/4a338000.pru/remoteproc/remoteproc2
# echo PRU_RPMsg_Echo_Interrupt1.elf > firmware
# echo start > state

Then I see the following error in dmesg:

[  627.433517] remoteproc remoteproc2: powering up 4a338000.pru
[  627.549301] remoteproc remoteproc2: Booting fw image PRU_RPMsg_Echo_Interrupt1.elf, size 32364
[  627.550624]  remoteproc2#vdev0buffer: .kick method not defined for 4a338000.pru
[  627.550669] remoteproc remoteproc2: failed to probe subdevices for 4a338000.pru: -22
[  627.551016] remoteproc remoteproc2: Boot failed: -22

This issue if for https://github.com/dinuxbg/pru-software-support-package Issues are disabled there.

dinuxbg commented 2 years ago

Hi,

While remoteproc has been mainlined for a while, RPMSG is still not in Linus' tree. The error you observe appears to be due to a missing patch.

Could you please test with Beagleboard kernel 5.10? Beagleboard kernels include latest Remoteproc and RPMSG from TI, so they should work. I think that RCN's test images already default to kernel 5.10. An alternative would be to flash an official Beagleboard image and update its kernel.

Regards, Dimitar

matwey commented 2 years ago

Sure, you are right.

matwey commented 2 years ago

Just for the record. The upstream kernel works fine with the following four patches: https://github.com/matwey/linux/commits/am335x_pru I've also slightly updated example to work with the upstream kernel: https://github.com/matwey/pru-software-support-package/commit/8eac9f3f87958a45908b672e5e319fb82d246262