UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor jmgnbshg
Visitor
7,004 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
11,475 Views
Registered: ‎02-22-2012

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

Jump to solution

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.

3 Replies
Xilinx Employee
Xilinx Employee
6,994 Views
Registered: ‎08-01-2008

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

Jump to solution
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
11,476 Views
Registered: ‎02-22-2012

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

Jump to solution

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.

Visitor jmgnbshg
Visitor
6,091 Views
Registered: ‎08-11-2016

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

Jump to solution

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