cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
2,441 Views
Registered: ‎11-08-2017

Unable to build OpenAMP with R5 BM on petalinux

Jump to solution

Hi,

 

I am trying out "ZynqMP Linux Master running on APU Linux loads OpenAMP RPU Firmware" as explained in http://www.wiki.xilinx.com/OpenAMP+2017.3

 but petalinux-build fails with "QA Issue: Architecture did not match (ARM, expected AArch64)" for the included R5 binary.

 

Can anyone please suggest how to get this working?

 

Regards,

Kiran

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
3,453 Views
Registered: ‎05-10-2017

You need to check your elf_ddr address in the linker script of your rpu firmware application and make sure you have the same in the device-tree

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
Moderator
Moderator
2,409 Views
Registered: ‎05-10-2017

Hi Kiran,

 

How did you create and include your R5 binary? Is this a demo app created from SDK?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
2,378 Views
Registered: ‎11-08-2017

@jovitac,

 

I  found some issues with the kernel tree which I was using. Now I am able to build. But after transferring the application, when I initiate a start I see below errors on console. I tried both my own application built in SDK and also the OpenAMP sample. 

 

root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# echo file-transfer.elf >/sys/class/remoteproc/remoteproc0/firmware
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# echo start > /sys/class/remoteproc/remoteproc0/state
[  536.190663] remoteproc remoteproc0: powering up ff9a0100.zynqmp_r5_rproc
[  536.197560] remoteproc remoteproc0: Direct firmware load for file-transfer.elf failed with error -2
[  536.203285] remoteproc remoteproc0: request_firmware failed: -2
[  536.213790] remoteproc remoteproc0: Boot failed: -2
-sh: echo: write error: No such file or directory
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# cp file-transfer.elf /lib/firmware
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# cp file-transfer.elf /lib/firmware/
cp: can't stat '/lib/firmware/': Not a directory
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# cd /lib/
root@xilinx-zcu102-zu9-es2-rev1_0-2017:/lib# rm -rf firmware
root@xilinx-zcu102-zu9-es2-rev1_0-2017:/lib# mkdir firmware
root@xilinx-zcu102-zu9-es2-rev1_0-2017:/lib# cd -
/home/root
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# rm -rf firmware [  696.543364] random: crng init done
cp file-transfer.elf /lib/firmware/
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# echo start > /sys/class/remoteproc/remoteproc0/state
[  706.920441] remoteproc remoteproc0: powering up ff9a0100.zynqmp_r5_rproc
[  706.929025] remoteproc remoteproc0: Booting fw image file-transfer.elf, size 402100
[  706.940793] remoteproc remoteproc0: bad phdr da 0x0 mem 0x508
[  706.946201] remoteproc remoteproc0: Failed to load program segments: -22
[  706.953225] remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument
root@xilinx-zcu102-zu9-es2-rev1_0-2017:~# 

 

 

My application (file_transfer.elf) does not use any openamp messaging. I am intending to just start the R5 after A53 boot up via remoteproc. Is it possible to do?

 

Regards,

Kiran

0 Kudos
Highlighted
Moderator
Moderator
2,368 Views
Registered: ‎05-10-2017

Could you please attach your device-tree?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Moderator
Moderator
3,454 Views
Registered: ‎05-10-2017

You need to check your elf_ddr address in the linker script of your rpu firmware application and make sure you have the same in the device-tree

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

0 Kudos
Highlighted
Observer
Observer
2,331 Views
Registered: ‎11-08-2017
Thank you, that worked. Problem was with the linker script.
0 Kudos