Forum Discussion

EricOpitz's avatar
EricOpitz
Icon for New Contributor rankNew Contributor
1 month ago
Solved

Agilex 5 RSU Reboot without any Image

Dear all, I'm currently in the process of configuring RSU on our system by following this tutorial: https://altera-fpga.github.io/rel-24.2/embedded-designs/agilex-5/e-series/premium/rsu/ug-rsu-agx5e...
  • RolandoS_Altera's avatar
    1 month ago

    Hello Eric

    I think that the behavior that you are seeing is expected.

    First, related to 'reboot' command in Linux, the selection of Cold of Warm reset depends on how you define the 'reboot' parameter in the Kenrel command line in U-Boot. We normally have something like this, in which we omitted the 'reboot' parameter, meaning that a 'cold' reset will be applied.

    Kernel command line: console=ttyS0,115200 initrd=0x90000000 root=/dev/ram0 rw init=/sbin/init ramdisk_size=10000000 earlycon panic=-1 nosmp kvm-arm.mode=nvhe root=/dev/mmcblk0p2 rw rootwait

    If we would like to apply a warm reset, then we will need to add reboot=warm to the command line, so I think you are actually applying a cold reset.

    In the case of the watchdog timer, you can configure the action after it expires from the GHRD. In our examples we configure it to triger a RSU configuration.

    Second thing to take in account. The 'cold' reset that we are talking about is only related to the HPS. This means that the HPS is being reset, including HPS memory and HPS OCRAM, but the SDM is not reset. The SDM is the one in charge of running the decision firmware, which is the one that checks the priority and integrity of the applications. So, when we applied a reboot + cold reset, the SDM firmware (not the decision firmware) will load the same FSBL for the current application selected (in this case the erased one) so nothing is going to be loaded and this is why we don't see any output in the serial console. In other hand, if we do a power cycle, everything is restarted, including the SDM, which will execute the decision firmware, and this will check the integrity of the application, and after it finds that this is corrupted, then it will switch to the factory image.

    We have a command that allows you to tell the decision firmware to take action after the reboot command. The 'rsu_client --request <slot num>'. With this, you are telling the decision firmware to load an application from a slot. If this is corrupted, then the decision firmware will now check for the next priority application. 

    So, in order to achieve what you want to do you can try (assuming that the application you want to erase is in slot 0):

    root@linux:~# ./rsu_client --erase 0

    Operation completed

    root@linux:~# ./rsu_client --enable 0

    Operation completed

    root@linux:~# ./rsu_client --request 0

    Operation completed

    root@linux:~# reboot

    With this, you can observe that the application loaded was the factory image.