Enable RemoteProc on Verdin IMX8MP

Hello

I am following these instructions to enable the RemoteProc on my Verdin IMX8MP: How to Use RemoteProc | Toradex Developer Center

When I do this command
fw_setenv tdxargs "clk-imx8mp.mcore_booted=1"
I get
Configuration file wrong or corrupted

What could be the cause of this?

I am using TorizonOS 6.8

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The error message ‘Configuration file wrong or corrupted’ when executing the fw_setenv command suggests there might be an issue with the U-Boot environment on your Verdin iMX8MP module. Here are some steps to help you troubleshoot and resolve this issue:

  1. Check U-Boot Environment:

    • Boot into U-Boot and use the printenv command to list all environment variables. This can help identify if the environment is corrupted or if there are any unexpected entries.
  2. Verify Command Syntax:

    • Ensure that the command syntax is correct. The command should be:
      fw_setenv tdxargs "clk-imx8mp.mcore_booted=1"
      
    • Double-check for any typographical errors or incorrect quotation marks.
  3. Environment Corruption:

    • If the environment is corrupted, you may need to reset it to default values. This can be done by using the env default -a command in U-Boot, followed by saveenv to save the changes.
  4. Backup and Restore:

    • If you have a backup of the U-Boot environment, consider restoring it to see if the issue persists.

By following these steps, you should be able to identify and resolve the issue with the U-Boot environment configuration. If the problem persists, further investigation into the specific environment setup on your module may be necessary.

Best regards,
Toradex AI Assistant.

Please, also check if these links can help you solve your problem:

Best way of setting up remoteproc on Verdin iMX8M Plus.

Using env default -a seemed to help (even though I had to re-install the OS using TEZI).

However, if I try to continue the instructions I always get permission errors:

torizon@verdin-imx8mp-15139674:~$ sudo echo -n new_path > /sys/module/firmware_class/parameters/path
-sh: /sys/module/firmware_class/parameters/path: Permission denied

Hi @i.staehli !

Welcome to Toradex Community! :tada:
Please feel free to browse around :smiley:

Have you tried using sudo to execute the fw_setenv? On the other hand, you can also stop at U-Boot and do like this:

setenv tdxargs "${tdxargs} clk-imx8mp.mcore_booted=1" && saveenv

Using the ${tdxargs} is just a way of making sure that you are not losing what you previously had in the tdxargs (if any). Just in case :slight_smile:

The problem here is that this command doesn’t open the /sys/module/firmware_class/parameters/path as a super user. Here only the echo is the executed as super user.

To overcome this, you need to do something like this:

echo -n new_path | sudo tee /sys/module/firmware_class/parameters/path

As the command tee is the one that will open and write to the file, and it is executed as super user, this should solve your issue.

Let us know if it works for you :slight_smile:

Best regads,

Thanks @henrique.tx

That worked. I found another option, which is to call sudo su first.
This command still doesn’t work:

torizon@verdin-imx8mp-15139674:~$ echo start | sudo tee /sys/class/remoteproc/remoteproc0/state
start
tee: /sys/class/remoteproc/remoteproc0/state: No such file or directory

I set up the subsystem update now using action-handlers/cortex-firmware/action-handler.sh at main · torizon/action-handlers · GitHub and it works that way.

Hi @i.staehli!

Quickly looking at it, this feels a bit strange. I would need to try it on my side to check. But I will need more time to do so.

From what I understand, this is not currently blocking you, correct? If yes, I will try it next week.

Best regards,

@henrique.tx

Now it works for me. So maybe I had some weird settings in the uboot or I had a missing overlay.

Thanks for your efforts!