RCHD-PF - Building HSS and U-Boot
Installing prerequisites
Required packages
apt-get install \
build-essentials git gcc-riscv64-linux-gnu flex bison \
kconfig-frontends libyaml-dev libelf-dev libssl-dev
Required Libero SoC version
At the time of writing this page, the following guide assumes that the following Microchip tools are installed:
Libero SoC v2023.2
SoftConsole v2022.2-RISC-V-747
Building HSS
Clone the sources:
% git clone https://gitlab.conclusive.pl/devices/rchd-pf/hart-software-services.git
Make sure that the SoftConsole toolchain is in the PATH (replace /opt/microchip with your Libero SoC installation prefix):
% export SC_INSTALL_DIR=/opt/microchip/SoftConsole-v2022.2-RISC-V-747
% export FPGENPROG=/opt/microchip/Libero_SoC_v2023.2/Libero/bin64/fpgenprog
% export PATH="$SC_INSTALL_DIR/riscv-unknown-elf-gcc/bin:$PATH"
Configure the build for RCHD-PF board (use def_config_2gb
for a 2GB board version):
Building U-Boot
Clone the sources:
Configure the build for RCHD-PF board and start the build:
Building HSS payload image
Build the HSS payload generator:
Add hss-payload-generator directory to the system PATH:
Use the following YAML configuration file for the hss-payload-generator:
Run the hss-payload-generator to generate the payload image (assumes the above YAML file is saved as hss.yml in the U-Boot directory):
Flashing image
Flashing HSS
Clone the utilities repository:
Flash the HSS using flash-hss.sh shell script - provide HSS ELF file path as an argument:
Flashing U-Boot
In order to flash U-Boot, GPT partition table needs to be created on the eMMC, as HSS loads its payload directly from a GPT partition.
Â
HSS payload must be placed on a partition with the following properties:
Property | Value |
---|---|
Size | 1 MB (minimum) |
Type | BIOS Boot |
Type GUID | 21686148-6449-6E6F-744E-656564454649 |
Flashing of the eMMC can be done via the emulated USB mass storage device available in the HSS. USB mass storage mode can be entered by typing the usbdmsc
command in HSS:
A new USB device should show up in the host system:
Now we can create a GPT partition table and the boot partition:
Finally, we can copy the HSS payload to the boot partition: