Intel® Stratix® 10 Hard Processor System Remote System Update User Guide

ID 683021
Date 11/10/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

7.5.1. Using the RSU Client to Perform Basic Operations

This section demonstrates how to use the RSU client to perform the following basic operations:
  • Querying the RSU status.
  • Querying the number of slots and the information about them.
  • Adding a new application image.
  • Verifying that the application image was written correctly.
  • Requesting a specific application image to be loaded.
Note: This section assumes that the flash contains the initial RSU image. If that is not true, you need to re-flash the initial image, as shown in the Flashing the Initial RSU Image to QSPI section.
  1. Power cycle the board and let Linux* boot.
  2. Log in using ‘root’ as user name, no password is required.
  3. Run the rsu_client without parameters, to display its help message:
    root@linux:~# ./rsu_client 
    --- RSU app usage ---
    -c|--count                        get the number of slots
    -l|--list slot_num                list the attribute info from the selected slot
    -z|--size slot_num                get the slot size in bytes
    -p|--priority slot_num            get the priority of the selected slot
    -E|--enable slot_num              set the selected slot as the highest priority
    -D|--disable slot_num             disable selected slot but to not erase it
    -r|--request slot_num             request the selected slot to be loaded after the next reboot
    -R|--request-factory              request the factory image to be loaded after the next reboot
    -e|--erase slot_num               erase app image from the selected slot
    -a|--add file_name -s|--slot slot_num  add a new app image to the selected slot
    -u|--add-factory-update file_name -s|--slot slot_num  add a new factory update image to the selected slot
    -A|--add-raw file_name -s|--slot slot_num  add a new raw image to the selected slot
    -v|--verify file_name -s|--slot slot_num  verify app image on the selected slot
    -V|--verify-raw file_name -s|--slot slot_num  verify raw image on the selected slot
    -f|--copy file_name -s|--slot slot_num  read the data in a selected slot then write to a file
    -g|--log                          print the status log
    -n|--notify value                 report software state
    -C|--clear-error-status           clear errors from the log
    -Z|--reset-retry-counter          reset current retry counter
    -m|--display-dcmf-version         print DCMF version
    -y|--display-dcmf-status          print DCMF status
    -x|--display-max-retry            print max_retry parameter
    -t|--create-slot slot_name -S|--address slot_address -L|--length slot_size  create a new slot using unallocated space
    -d|--delete-slot slot_num         delete selected slot, freeing up allocated space
    -W|--restore-spt file_name        restore spt from a file
    -X|--save-spt file_name           save spt to a file
    -b|--create-empty-cpb             create a empty cpb
    -B|--restore-cpb file_name        restore cpb from a file
    -P|--save-cpb file_name           save cpb to a file
    -k|--check-running-factory        check if currently running the factory image
    -h|--help                         show usage message
  4. Exercise the rsu_client command that displays the current status, it shows the application image from slot 0 (partition P1) is loaded with no errors:
    root@linux:~# ./rsu_client --log
          VERSION: 0x00000202
            STATE: 0x00000000
    CURRENT IMAGE: 0x0000000001000000
       FAIL IMAGE: 0x0000000000000000
        ERROR LOC: 0x00000000
    ERROR DETAILS: 0x00000000
    RETRY COUNTER: 0x00000000
    Operation completed
  5. Run the RSU client commands that display information about the slots:
    root@linux:~# ./rsu_client --count
    number of slots is 3
    Operation completed
    root@linux:~# ./rsu_client --list 0
          NAME: P1
        OFFSET: 0x0000000001000000
          SIZE: 0x01000000
      PRIORITY: 1
    Operation completed
    root@linux:~# ./rsu_client --list 1
          NAME: P2
        OFFSET: 0x0000000002000000
          SIZE: 0x01000000
      PRIORITY: [disabled]
    Operation completed
    root@linux:~# ./rsu_client --list 2
          NAME: P3
        OFFSET: 0x0000000003000000
          SIZE: 0x01000000
      PRIORITY: [disabled]
    Operation completed
  6. Display the decision firmware version information:
    root@linux:~# ./rsu_client --display-dcmf-version
    DCMF0 version = 21.2.0
    DCMF1 version = 21.2.0
    DCMF2 version = 21.2.0
    DCMF3 version = 21.2.0
    Operation completed
  7. Erase slot 1 and add the application2.rpd application image to slot 1 (partition P2):
    root@linux:~# ./rsu_client --erase 1
    Operation completed
    root@linux:~# ./rsu_client --add application2.rpd --slot 1
    Operation completed
  8. Verify that the application image was written correctly to flash:
    root@linux:~# ./rsu_client --verify application2.rpd --slot 1
    Operation completed
  9. List again the slots, it shows the most recently written partition P2 image having the highest priority (lowest priority number that is):
    root@linux:~# ./rsu_client --list 0
          NAME: P1
        OFFSET: 0x0000000001000000
          SIZE: 0x01000000
      PRIORITY: 2
    Operation completed
    root@linux:~# ./rsu_client --list 1
          NAME: P2
        OFFSET: 0x0000000002000000
          SIZE: 0x01000000
      PRIORITY: 1
    Operation completed
    root@linux:~# ./rsu_client --list 2
          NAME: P3
        OFFSET: 0x0000000003000000
          SIZE: 0x01000000
      PRIORITY: [disabled]
    Operation completed
  10. Power cycle the board, boot Linux*, and display the status – it shows the image from partition P2 running:
    root@linux:~# ./rsu_client --log
          VERSION: 0x00000202
            STATE: 0x00000000
    CURRENT IMAGE: 0x0000000002000000
       FAIL IMAGE: 0x0000000000000000
        ERROR LOC: 0x00000000
    ERROR DETAILS: 0x00000000
    RETRY COUNTER: 0x00000000
    Operation completed
  11. Instruct the RSU client to request slot 0 (partition P1) from SDM on next reboot command:
    root@linux:~# ./rsu_client --request 0
    Operation completed
  12. Restart Linux* by running the reboot command:
    root@linux:~# reboot
  13. Log into Linux* and display the RSU status:
    root@linux:~# ./rsu_client --log
          VERSION: 0x00000202
            STATE: 0x00000000
    CURRENT IMAGE: 0x0000000001000000
       FAIL IMAGE: 0x0000000000000000
        ERROR LOC: 0x00000000
    ERROR DETAILS: 0x00000000
    RETRY COUNTER: 0x00000000
    Operation completed

    The status shows that the image from partition P1 was loaded, as requested.