I'm trying to do something similar.  It would be better, at least in my 
case, if the PRU could be started at boot.  One thing I noticed in my case 
is the pruss doesn't show up until about 30 seconds into the boot cycle.  
Yours seems to be detected much faster.  Did you change something, or have 
any idea when the kernel decides to discover it?  I have tried to create a 
systemd unit to start them, but I find myself trying to start them before 
sysfs is populated.

On Monday, February 1, 2021 at 7:08:32 PM UTC-5 Tom Stepleton wrote:

> Oops, nevermind --- I see that it can't be done for now. On boot, or in 
> other words during startup or power-on, the Debian Linux kernel on your 
> PocketBeagle or BeagleBone Black can load rproc (aka remoteproc) PRU 
> firmware such as am335x-pru0-fw and am335x-pru1-fw from /lib/firmware, but 
> it will not start the firmware. (Yes, I am keyword-stuffing for maximum 
> searchability.)
>
>
> https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/remoteproc/pru_rproc.c?h=ti-android-linux-4.19.y#n1173
>
> I'll try to identify other means of getting the PRUs started quickly; 
> maybe something that systemd can run at boot time.
>
> Apologies for the distraction,
> --Tom
> On Monday, February 1, 2021 at 4:09:40 AM UTC Tom Stepleton wrote:
>
>> Hi again,
>>
>> I have some mature PRU firmware that I've been loading and starting by 
>> having a program 
>> <https://github.com/stepleton/cameo/blob/master/aphid/profile.py#L262> 
>> manipulate the files
>>   /sys/class/remoteproc/remoteproc[12]/(state|firmware)
>> well after the system has booted.
>>
>> I'd like to speed that process up, so today I've finally copied my 
>> firmware files to /lib/firmware/am335x-pru0-fw and 
>> /lib/firmware/am335x-pru1-fw . Now, I did do
>>   sudo update-initramfs -uk `uname -r` ; sudo reboot
>> like you're supposed to. I can even do
>>   zcat /boot/initrd.img-4.19.50-ti-r20 | cpio -itv
>> and see my firmware files inside the file (albeit as 
>> /usr/lib/firmware/am335x-pru[01]-fw).
>>
>> When the PocketBeagle boots, the firmware is listed correctly within 
>> /sys/class/remoteproc/remoteproc?/firmware files, it's just that the 
>> neighbouring "state" files show that both PRUs are "offline". I can echo 
>> "start" into those files and things work fine, but as I'm trying to 
>> accelerate the time from boot to a running system, it would be really nice 
>> if the firmware could start automatically on boot, as quickly as possible.
>>
>> I'm using this firmware in concert with a new device tree overlay I've 
>> also been developing, which is the subject of another thread 
>> <https://groups.google.com/g/beagleboard/c/Ro2PioeoN-c/m/Cd2d0YRGBAAJ>. 
>> If you like, you can view it at
>>
>> http://mg-1.uk:31132/pb-cameo-aphid.dts.txt
>>
>> Perhaps something is missing in there? I based some of its design off of 
>> information in https://groups.google.com/g/beagleboard/c/lS8QlNV8JCc , 
>> which to be fair is now a healthy 3.5 years old...
>>
>> Thanks for any help,
>> --Tom
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6fe30871-0f63-4951-b201-66ac09a684acn%40googlegroups.com.

Reply via email to