IMX8MMEVK: Remoteproc to reboot M4 from Linux

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX8MMEVK: Remoteproc to reboot M4 from Linux

110 Views
andreasbuchner
Contributor II

Hello all,

I have the following unresolved issue with the remoteproc framework on the i.MX8MM-EVK to boot the M4 core from Linux with sysfs commands (https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-remoteproc) with the latest Linux image:

I can successfully load any binaries (in *.elf format), start and stop the M4 through the remoteproc commands. However, when loading a different binary and starting the M4 core again then the old firmware is still started. A new binary will only be accepted after the whole system is rebooted.

Can you please explain what can be done to load and run a new M4 binary, without restarting the whole system?

Thanks for your response,

Andreas

0 Kudos
6 Replies

20 Views
stephen1
Contributor I

Any progress on this?  I have the same issue.

0 Kudos

40 Views
ddeyo1
Contributor I

Hello,

I am seeing the same problem on the Nitrogen8M_Mini SOM.  It's also an i.MX8MM.

On another note, I can't get my elf to start correctly.  The .bin file works correctly from u-boot, but the elf says:

[  137.662803] remoteproc remoteproc0: powering up imx-rproc

[  137.684501] remoteproc remoteproc0: Booting fw image rpmsg_lite_str_echo_rtos_imxcm4.elf, size 525856

[  137.693768] remoteproc remoteproc0: no dtb rsrc-table

[  137.698961] remoteproc remoteproc0: bad phdr da 0x80000000 mem 0x240

[  137.705347] remoteproc remoteproc0: Failed to load program segments: -22

[  137.712203] remoteproc remoteproc0: Boot failed: -22

Could you possibly provide me your DTS node for the m4 and linker memory layout?

0 Kudos

102 Views
nxf65025
NXP Employee
NXP Employee

Hi

 

Can you provide the all your steps?

 

BR

Zhiming

0 Kudos

60 Views
andreasbuchner
Contributor II

Any news on this topic?

51 Views
nxf65025
NXP Employee
NXP Employee

Hi

 

I have reproduced the issue and trying to find solution

 

BR

Zhiming

0 Kudos

93 Views
andreasbuchner
Contributor II

Hello Zhiming,

sure, here are all steps and commands I used:

- Loaded latest image L5.4.70-2.3.0_images_MX8MMEVK on SD-Card of my IMX8M Mini EVK which has already some M4 binaries in path /lib/firmware (e.g. imx8mm_m4_TCM_hello_world.elf and imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.elf which I will use later)
- Setting the correct dtb file imx8mm-evk-rpmsg.dtb in u-boot:
* interrupt auto boot
* type setenv fdt_file 'imx8mm-evk-rpmsg.dtb'
* type save
* type boot to boot linux
* login with root
- type following commands to start hello world firmware:
* echo -n /lib/firmware > /sys/module/firmware_class/parameters/path
* echo -n imx8mm_m4_TCM_hello_world.elf > /sys/class/remoteproc/remoteproc0/firmware
* echo start >/sys/class/remoteproc/remoteproc0/state
- now "hello world." is printed in M4 console terminal
- type cat /sys/class/remoteproc/remoteproc0/firmware to check which firmware is loaded (prints: imx8mm_m4_TCM_hello_world.elf)
- stop firmware, load different firmware and start M4 again:
* echo stop >/sys/class/remoteproc/remoteproc0/state
* echo -n imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.elf > /sys/class/remoteproc/remoteproc0/firmware
* echo start >/sys/class/remoteproc/remoteproc0/state
- M4 console terminal prints "hello world." again and cat /sys/class/remoteproc/remoteproc0/firmware prints imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.elf

Last step is the unexpected behavior. I expect that the rpmsg binary would run (as indicated in firmware print by cat /sys/class/remoteproc/remoteproc0/firmware).

If you need additional information I am happy to provide it.

Regards,

Andreas

0 Kudos