Intel® Agilex™ Hard Processor System Remote System Update User Guide

ID 683184
Date 7/13/2022
Public

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

Document Table of Contents

7.4.3. Updating the Factory Image Using U-Boot

This section demonstrates how to use U-Boot to update the factory image.
Note: The commands listed in this section rely on the commands from the Basic Operation section running first, specifically adding an application image to the P2 flash partition.
  1. Power-cycle the board, stop U-Boot and check the RSU status log:
    SOCFPGA # rsu status_log
    Current Image   : 0x02000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x00000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000

    The application image from slot 1 (partition P2) was loaded, because it is marked as the highest priority in the CPB.

  2. Confirm that slot 2 is not used, erase slot 2, write the factory update image to it, and verify it was written correctly:
    SOCFPGA #  rsu slot_get_info 2
    NAME: P3
    OFFSET: 0x0000000003000000
    SIZE: 0x01000000
    PRIORITY: [disabled]
    SOCFPGA # rsu slot_erase 2
    CPBs are GOOD!!!
    Slot 2 erased.
    SOCFPGA # load mmc 0:1 $loadaddr factory_update.rpd
    3485696 bytes read in 158 ms (21 MiB/s)
    SOCFPGA # rsu slot_program_factory_update_buf 2 $loadaddr $filesize
    CPBs are GOOD!!!
    Slot 2 was programmed with buffer=0x0000000002000000 size=3485696.
    SOCFPGA # rsu slot_verify_buf 2 $loadaddr $filesize
    Slot 2 was verified with buffer=0x0000000002000000 size=3485696.
    
  3. Confirm that slot 2 is now the highest priority in the CPB:
    SOCFPGA # rsu slot_get_info 2
    NAME: P3
    OFFSET: 0x0000000003000000
    SIZE: 0x01000000
    PRIORITY: 1
  4. Instruct the SDM to load the factory update image from slot 2:
    SOCFPGA # rsu slot_load 2
    Slot 2 loading.
  5. The factory update image runs for a few seconds, and updates the decision firmware, decision firmware data and factory image in flash. Then it removes itself from the CPB and loads the now highest priority image in the CPB. At the U-Boot prompt, confirm that P2 is now loaded and P3 is disabled:
    SOCFPGA # rsu status_log
    Current Image   : 0x02000000
    Last Fail Image : 0x00000000
    State           : 0x00000000
    Version         : 0x00000202
    Error location  : 0x00000000
    Error details   : 0x00000000
    Retry counter   : 0x00000000
    SOCFPGA # rsu slot_get_info 2
    NAME: P3
    OFFSET: 0x0000000003000000
    SIZE: 0x01000000
    PRIORITY: [disabled]