cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
7,610 Views
Registered: ‎08-11-2016

remoteproc don't load pre-built test apps when specifing full path to the file: error -2

Jump to solution

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?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
12,081 Views
Registered: ‎02-22-2012

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.

View solution in original post

3 Replies
Highlighted
Xilinx Employee
Xilinx Employee
7,600 Views
Registered: ‎08-01-2008
not sure if helps you . Check this link
https://forums.xilinx.com/t5/OpenAMP/SDK-2015-4-Changing-FreeRTOS-BSP-stack-heap-settings-breaks-AMP/td-p/685457
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Explorer
Explorer
12,082 Views
Registered: ‎02-22-2012

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.

View solution in original post

Highlighted
Visitor
Visitor
6,697 Views
Registered: ‎08-11-2016

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.

0 Kudos