08-11-2016 01:22 AM
I was trying to manually generate the files for openAMP echo-test as described in the UG1186, using Vivado-SDK-Petalinux version 2016.2.
After completing all the steps as described in the document (naming my manually generated application to test.elf), I am not able to load this firmware to the other processor. When I boot, I ensure that my firmware is installed in the specified folder suggested in the UG1186 (/lib/firmware), together with the previously generated demo applications. If I run:
modprobe zynq_remoteproc firmware=/lib/firmware/test.elf
It fails with the following error message
remoteproc0: Direct firmware load for /lib/firmware/test.elf failed with error -2
Also if I run
modprobe zynq_remoteproc firmware=/lib/firmware/image_echo_test
It also fails with the same error message.
The only way to successfully run the pre-built test application is with the command:
modprobe zynq_remoteproc firmware=image_echo_test
But I cannot explain why if I specify the complete path to the pre-built firmware the program fails. The result is that I am not able to run any firmware file (apart from those 3 test applications pre-built, and only if I do not specify the complete path to the firmware)
I tried to search the error code -2 of remoteproc to find any clue of what could be happening, but I was not successful.
What am I doing wrong?
09-10-2016 11:58 AM
I would bet that the problem you see is because "/lib/firmware/" path is hardcoded somewhere in linux kernel (e.g. drivers/base/firmware_class.c) and value of zynq_remoteproc opt parameter "firmware=xxx" is just appended during driver probe-ing, resulting in absolute file path "/lib/firmware/xxx". I did not investigate into LX kernel if this guess is true or false, I was happy with "/lib/firmware/" location for my OpenAMP experiments.
You can experiment with:
modprobe zynq_remoteproc firmware=../../myrootdir/test.elf
if it works.
08-11-2016 01:53 AM
09-10-2016 11:58 AM
I would bet that the problem you see is because "/lib/firmware/" path is hardcoded somewhere in linux kernel (e.g. drivers/base/firmware_class.c) and value of zynq_remoteproc opt parameter "firmware=xxx" is just appended during driver probe-ing, resulting in absolute file path "/lib/firmware/xxx". I did not investigate into LX kernel if this guess is true or false, I was happy with "/lib/firmware/" location for my OpenAMP experiments.
You can experiment with:
modprobe zynq_remoteproc firmware=../../myrootdir/test.elf
if it works.
09-29-2016 12:22 AM
Yes, that seemed to be the problem. I tried your suggestion and it worked.
Another thing I did until today to specify a path for different ELF files was to create a petalinux application called "load_elf". Then, I made symbolic links in /lib/firmware/load_elf to the file I wanted to load in that moment, and load remoteproc with "firmware=load_elf".
But I prefer this solution.