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

ID 683021
Date 4/05/2023
Public

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

Document Table of Contents

D.1. Configuration File

The LIBRSU library relies on the resource file /etc/librsu.rc to set the logging level and the MTD QSPI partition to be used for RSU purposes.

Table 17.  LIBRSU Configuration File Elements
Element Description

Element: # COMMENT

Usage: // COMMENT

Options: None

Single line comments

Required?: No

Element: root

Usage: root {type} {path}

Options: type: Storage type = [qspi, datafile]

Specifies the storage containing the RSU data region that LIBRSU manages. The datafile type is provided for testing purposes and treats an ordinary file as the RSU data region.

Required?: Yes

Element: rsu-dev

Usage: rsu-dev {path}

Options:
  • path : Path to the RSU entries in Linux sysfs

Specifies the path for the RSU sysfs entries in Linux.

Required?: No. When not specified, it defaults to
/sys/devices/platform/stratix10-rsu.0
.

Element: log

Usage: log {level} [stderr|path]

Options:
  • level : Verbose level

    = [off, low, medium, high]

  • path : Path to a logfile for debug information
  • stderr (defaults to stderr)

Instruct LIBRSU to open a logfile and append debug information as commands are performed. Three levels of verbosity are allowed. The log is directed to stderr by default.

Required?: No

Element: write-protect

Usage: write-protect {slot}

Options: slot : Slot number

Instruct LIBRSU to block any attempts to modify the specified slot. The priority of the selected slot might change based on changes to other slots. This option can be used multiple times.

Required?: No

Element: rsu-spt-checksum

Usage: rsu-spt-checksum {enable}

Options: enable : 0-disabled, 1-enabled

Instruct LIBRSU to enable checking and maintaining SPT checksums. Only has effect when the initial flash image was created with Quartus Programming File Generator v20.4 or newer. When not defined, it means the option is disabled.

Required?: No

The default values are:
# cat /etc/librsu.rc
log med stderr
root qspi /dev/mtd0
rsu-dev /sys/devices/platform/stratix10-rsu.0
Note:
Previous versions of LIBRSU did not allow complete configuration of the rsu-dev option. When moving from 4.9.78-ltsi kernel to the 5.4.23-lts kernel, or newer, you need to also move to the new LIBRSU version. However, the new LIBRSU version can be configured to work with the older 4.9.78-ltsi by specifying the following in the configuration file:
rsu-dev /sys/devices/platform/soc:firmware:svc/soc:firmware:svc:rsu/

The ATF SMC handler, Linux* SVC driver and Linux* RSU driver do not export the SDM API for determining the SPT addresses. Therefore, the MTD QSPI partition to be used by LIBRSU must start at the location of the SPT0, in order for LIBRSU to be able to determine the flash partitioning information. This can either be hardcoded in the device tree, or U-Boot can edit the device tree with the appropriate information before passing it to Linux* using the rsu dtb command.