Forum Discussion
Stratix 10 HPS LED example
- 2 months ago
We are using Quartus 26.1 for all these activites.
Stratix® 10 devices use a Secure Device Manager (SDM) to control both FPGA configuration and HPS boot. As part of this architecture, .pof files are not used. Instead, the device is programmed using .rbf (Raw Binary File) images, which can includes the HPS bootloader.
You may get the precompiled first stage bootloader (FSBL) .hex from here:
https://releases.rocketboards.org/2026.04/emmc/s10_htile_emmc/u-boot-spl-dtb.hex
This bootloader is generated as part of the Yocto-based GSRD build flow. For more details on how it is built, refer to: https://altera-fpga.github.io/rel-26.1/embedded-designs/stratix-10/sx/soc/gsrd/ug-gsrd-s10sx-soc/
If you prefer to build the bootloader manually, you can follow this guide: https://altera-fpga.github.io/rel-26.1/embedded-designs/stratix-10/sx/soc/boot-examples/ug-linux-boot-s10-soc/
The steps to include the bootloader into the .sof are documented here: https://docs.altera.com/r/docs/683847/26.1/stratix-10-soc-fpga-boot-user-guide/creating-the-configuration-files
Example, if you have a HPS boot first design and configures via JTAG:
quartus_pfg -c design.sof design.rbf -o hps_path=fsbl.hex -o hps=onFor QSPI boot, you can follow this guide: https://altera-fpga.github.io/rel-26.1/embedded-designs/stratix-10/sx/soc/gsrd/ug-gsrd-s10sx-soc/#boot-from-qspi
A detailed description of the boot flow is available here: https://docs.altera.com/r/docs/683847/26.1/stratix-10-soc-fpga-boot-user-guide/boot-flow-overview
At a high level:
1. SDM reads the configuration image (e.g., from QSPI, SD, EMMC, or JTAG)
2. SDM loads the FSBL into HPS on-chip RAM
3. HPS starts executing the FSBL
4. FSBL initializes DDR and loads the next-stage bootloader (SSBL / U-Boot)
For SDM-based devices:
No additional RAM for the HPS needs to be added in the FPGA fabric
Once the RBF is loaded, the FSBL runs from HPS OCRAM, and the rest of the boot sequence proceeds from there.
Our baord is a custom board with an 8GB eMMC. Option is provided to boot from JTAG and QSPI with MSEL switches.
We could generate the .sof file by following the steps discussed earlier.
We downloaded the precompiled first stage bootloader (FSBL) .hex as suggested earlier.
Generated the .JIC file with the .sof and FSBL included in it and programmed the QSPI through JTAG.
A FAT32 USB drive is plugged in to the USB port with second stage bootloader.bin and kernal.bin.
Then we put MEL pins to boot from QSPI. Our expectation was that the HSP should boot with the linux in the USB drive. But we are getting this error message in the UART0 port.
U-Boot SPL 2022.10 (Mar 20 2023 - 03:03:15 +0000)
Reset state: Cold
MPU 1200000 kHz
L3 main 400000 kHz
Main VCO 2400000 kHz
Per VCO 2000000 kHz
EOSC1 25000 kHz
HPS MMC 20000 kHz
UART 100000 kHz
DDR: Warning: DRAM size from device tree mismatch with hardware.
DDR: 4096 MiB
QSPI: Reference clock at 400000 kHz
WDT: Started watchdog@ffd00200 with servicing (10s timeout)
denali-nand-dt nand@ffb90000: timeout while waiting for irq 0x2000
denali-nand-dt nand@ffb90000: reset not completed.
Trying to boot from MMC1
** Partition 1 not valid on device 0 **
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image u-boot.itb, err - -1
Trying to boot from SPI
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
Can you suggest what could be the issue.
Also can you let us know the steps to install the linux in eMMC from the USB drive so that it can boot into linux from eMMC.
- ShunJingG_Altera2 months ago
New Contributor
Hi,
From the screenshot, it confirms that the FSBL is running successfully. However, the Secondary Stage Boot Loader (SSBL, i.e., bootloader.bin) still needs to be loaded, as USB functionality is only available in the SSBL stage.
Trying to boot from MMC1 ** Partition 1 not valid on device 0 **The log above indicates that the SSBL failed to load due to an invalid eMMC image.
To proceed with SSBL bring-up, you can use either of the following methods:
- Debugger boot
Follow this guide:
https://altera-fpga.github.io/rel-25.3/embedded-designs/stratix-10/sx/soc/boot-examples/ug-linux-boot-s10-soc/#running-u-boot-with-the-debugger-from-command-line - QSPI boot
Refer to:
https://altera-fpga.github.io/rel-26.1/embedded-designs/stratix-10/sx/soc/gsrd/ug-gsrd-s10sx-soc/#boot-from-qspi
Once the SSBL is up and running, you can:
1. Use fatload to load the USB image into RAM
2. Use mmc write to program the image from RAM into eMMCAfter programming the eMMC, you can reset the board to boot Linux from the eMMC.
For generating a valid eMMC image, it is recommended to follow this guide:
https://altera-fpga.github.io/rel-24.3/embedded-designs/stratix-10/sx/soc/emmc/ug-emmc-s10sx-soc/#build-flowNote:
- .itb is used for the bootloader (instead of .bin)
- Image is used for the kernel (instead of .bin)
- Additional required components include the .dtb and a root filesystem
The steps to build all required binaries are detailed in the guide here:
https://altera-fpga.github.io/rel-24.3/embedded-designs/stratix-10/sx/soc/emmc/ug-emmc-s10sx-soc/#build-flowIf generating the eMMC image is not feasible, an alternative is to download it from:
https://releases.rocketboards.org/2026.04/emmc/s10_htile_emmc/sdimage.tar.gzYou will need to decompress the archive before copying it to the USB drive. This image will create a valid partition layout on the eMMC. Afterward, you can replace the .itb and Image files using fatwrite. U-Boot does not support loading or executing raw .bin files directly.
Example steps to create eMMC image:
cd $TOP_FOLDER sudo rm -rf sd_card mkdir sd_card cd sd_card wget https://releases.rocketboards.org/2021.04/gsrd/tools/make_sdimage_p3.py chmod +x make_sdimage_p3.py # remove mkfs.fat parameter which has some issues on Ubuntu 22.04 sed -i 's/\"\-F 32\",//g' make_sdimage_p3.py mkdir fat && cd fat cp $TOP_FOLDER/u-boot-socfpga/u-boot.itb . cp $TOP_FOLDER/linux-socfpga/arch/arm64/boot/Image . cp $TOP_FOLDER/linux-socfpga/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dtb . cd .. mkdir rootfs && cd rootfs sudo tar xf $TOP_FOLDER/yocto/build/tmp/deploy/images/stratix10/core-image-minimal-stratix10.rootfs.tar.gz sudo rm -rf lib/modules/* cd .. sudo python3 ./make_sdimage_p3.py -f \ -P rootfs/*,num=2,format=ext3,size=64M \ -P fat/*,num=1,format=fat32,size=48M \ -s 128M \ -n emmc.img cd .. - Debugger boot