Introduction
This article describes how to write to the eMMC installed in the Mpression Sulfur Type-A Development Kit (hereafter referred to as "Sulfur").
The Sulfur board has a DIPSW on the SoM to select whether to use the SD card or eMMC as the external flash device for booting the HPS (Hard Processor System).
Figure 1. Flash device selection switch for HPS (SW1 [4])
For detailed specifications, please refer to the documents ( Sulfur Type-A Kit User Manual Ver.1.1, etc.) that can be downloaded from the following page.
1. Equipment and development environment
This section describes the tools, versions, and development machine requirements (OS) necessary to run the design demo.
1-1. Equipment
The equipment required to run the sample design is as follows
-
- Sulfur Type-A Development Kit "Sulfur Type-A Development Kit " x1
- FPGA download cable " FPGA Download Cable II " x1
- USB memory stick or USB-SD adapter (8GB or more capacity, USB2.0 recommended) x1
Note: Sulfur has four USB 3.x Type-A connectors, but currently cannot be connected via USB 3.x due to Agilex™ 5 ES device restrictions. USB 3.x compatible USB devices must be inserted shallowly so that only the four USB 2.0 specification pins are in contact with each other.
1-2. Development environment
The following tools must be set up. Please prepare your development machine (OS, etc.) according to the requirements supported by the following tools.
-
- FPGA development tools (tested on the Windows version of Version 24.3.1)
- Terminal software (TeraTerm, PuTTY, etc.)
Note: December 2025: Quartus® Prime Pro Edition 25.3 also verified.
Note: A full installation of the FPGA development tools is not required if you only want to write pre-built images.
Point: The FPGA development tools are available as a free license for Agilex™ 5 E-Series.
How to obtain a Quartus® Prime Pro Edition free license file for Agilex™ 5 E development
2. Files provided
The following table lists the files required for the procedures described in this article.
Table 1. List of Files Provided
| No. | File Name / Download Link | Summary | Update date / Version |
| [1] | QSPI image (.jic) for Linux USB boot |
2025/3/5 | |
| [1] | QSPI image (.jic) for Linux USB boot |
2025/12/25 | |
| [2] | NTFS-enabled Linux Kernel image (used only if you want to write images larger than 4GB on Windows) |
2025/3/5 | |
| [3] | U-Boot configuration for Linux USB boot |
2025/3/5 | |
| [4] | Programming File Generator configuration file (for QSPI image creation) |
2025/3/5 |
The eMMC writing procedure described in this document is to be performed in a Linux environment booted from USB. The file provided is a QSPI boot image with the necessary configuration changes to boot Linux from USB.
Point: For the image file to write to eMMC, please obtain the Linux SD card image ( sdimage_agilex5_sulfur_QPDS24.3.1_v1.8.zip or sdimage_agilex5_sulfur_QPDS25.3_v2.1.zip ) from the following page. Also note that you should select and use the file [1] depending on the version of the SD card image.
Note: FPGA related files [1] should be appropriate according to the serial number of the SoM installed in Sulfur Type-A. Different SDM OSC frequency will not work properly.
Point: The frequency setting of the SDM OSC clock depends on the serial number of the SoM. SoMs with serial numbers A5SOM1E024D0001 ~ A5SOM1E024D0025 have a frequency of 125 MHz, while other SoMs have a frequency of 25 MHz.
3. Procedure for writing an image to eMMC
This section describes how to write an image for HPS boot to eMMC.
3-1. Preparation of USB storage (USB memory stick or USB-SD adapter)
Store the Linux boot environment and the image file to be written to eMMC on the USB storage.
3-1-1. Writing SD card image for HPS boot
Download the Linux SD card image ( sdimage_agilex5_sulfur_QPDS24.3.1_v1.8.zip or sdimage_agilex5_sulfur_QPDS25.3_v2.1.zip ) and write it to the USB storage. Writing to USB storage can be done in the same way as writing an image to an SD card.
USB storage can be used in the form of an SD card attached to a USB-SD adapter product like the one in the foreground of the figure below, in addition to a regular USB memory device.
Figure 2. USB storage example (external view)
Tip: For details on how to write an SD card image, please refer to "4.3 Creating an SD Boot Disk for Sulfur Type-A" in Getting Started.
3-1-2. Confirm USB storage partition
Check the USB storage device to which the Linux SD card image for Sulfur is written with the disk management tool of your PC. As shown below, two partitions should occupy almost 4GB from the top, and the rest should be free space (Unallocated or Free Space).
Figure 3. USB Storage after Image Writing
3-1-3. Editing USB Storage Partition (Adding a New Partition)
Create a new partition in the free space. The size of the partition to be created should be large enough to store the image file to be written to eMMC.
In Windows, right-click the Windows menu icon and select "Disk Management"; in Linux (Ubuntu), select "Disks" in the application search to launch the management tool that can edit partitions. Please search for general information on how to use the management tool.
Note: Please pay attention to the file system requirements when storing image files larger than 4GB. If the file size is greater than 4GB, select NTFS instead of FAT32.
Point: If you select NTFS, replace the Linux kernel image (Image) stored on the FAT partition of the USB storage device with the one described in "2. Files provided" [2]. Replacing the Image will make it possible to recognize NTFS as read-only FS.
Figure 4. Adding a new partition (Windows)
Figure 5. Adding a new partition (Linux)
3-1-4. Storing the image to be written to eMMC
Store the image file to be written in the partition newly created in the previous step.
You can also store the same Linux SD card image ( sdimage_agilex5_sulfur_QPDS24.3.1_v1.8.zip or sdimage_agilex5_sulfur_QPDS25.3_v2.1.zip ) as the image written to the USB storage device in the previous step. card image, since USB storage space is limited.
Point: If you create a new partition with NTFS, be sure to store the image file extracted on the PC side. NTFS is read-only on the target Linux side, so decompression cannot be performed.
Now the preparation of USB storage is completed, disconnect the USB storage from the PC and proceed to the setup of the Sulfur board.
3-2. Preliminary preparation / board setup
3-2-1. Cable Connection and DIPSW/Slide Switch Settings
Please follow the basic settings described in "4.2 Setting Up the Board" in Getting Started.
The following changes should be made for this procedure.
-
- Set the Flash device selection switch for HPS ( SW1 [4] ) to OFF (eMMC)
- Insert the USB storage device created in the previous step into the USB 4-port (Hub) connector
- Do not install a card in the SD card slot
Note: The USB storage device can be inserted anywhere on the 4 ports. (Multiple USB storage devices may change the device number and path.)
Figure 6. After Board Setup (Reference)
3-2-2. Setup of Terminal Software (TeraTerm)
Start the terminal software and make a connection to the FPGA serial terminal with the settings of "Baud rate: 115200, No parity, Stop bit: 1, No flow control".
For the COM port, select the terminal of the FPGA referring to the following information.
-
- Connection name of FPGA: USB Serial Port (COMx)
3-2-3. Writing FPGA Configuration File & Changing MSEL
Select an appropriate .jic file from [1] in "2. Files provided". After writing is complete, change the MSEL (SW 1.1, 1.2, 1.3 ) to AS (Fast) mode (OFF , ON, ON).
Tip: For details on how to write the configuration file, refer to "5.3.2 Writing .sof Files" in Getting Started.
3-3. Power-on ~ Linux USB Boot
3-3-1. Powering on the board
Turn the power switch ( SW18 ) to ON.
3-3-2. Check boot log and boot source of U-Boot
Confirm the boot source of U-Boot from the terminal log. As shown in the figure below, the message "Trying to boot from ..." displayed at the end before U-Boot starts will confirm the boot source. The message "Trying to boot from ..." is displayed at the end of the U-Boot startup screen as shown below.
Figure 7. Confirmation of U-Boot boot source
Note: Confirm that the log of the U-Boot boot source is "Trying to boot from SPI". If "from MMC1" is displayed as shown in the red frame in Figure 7, it means that the U-Boot was booted from eMMC, It is necessary to erase the data in the eMMC.
Erase the data on eMMC by executing the following command at the U-Boot prompt.
$ mmc list
$ mmc dev 0
$ mmc erase 0 0x22000 Point: mmc erase 0 0x22000 specifies to erase the size: 0x22000 × 512Byte from the first block (0). mmc erase is limited to the size of the U-Boot image storage area to be erased because it takes time to erase the entire eMMC.
3-3-3. Power-on and Linux Boot Confirmation
Turn the power switch ( SW18 ) ON→OFF→ON. Linux will automatically boot via USB after U-Boot boots from QSPI.
Note: If Linux does not boot, check the USB storage device. (If the USB device is not recognized even after adjusting the insertion depth, use a USB 2.0 storage device or connect it via a USB 2.0 HUB.)
The Linux boot is complete when the login prompt appears as shown below.
Figure 8. Linux Boot Completed
3-4. Linux Login ~ eMMC Writing
Enter the user name "root" at the login prompt (agilex5 login:). From here on, the operation will be performed while logged in to Linux.
3-4-1. Confirm the image file to be written to eMMC
Confirm that the image file to be written can be referenced; if the image file is stored in a partition other than rootfs, mount the corresponding partition.
# mkdir part3
# mount /dev/sda3 part3
# ls -al part3Figure 9. Confirmation of image file to be written
Point: If another image has been written to eMMC in the past, it is recommended to check (p) and delete (d) the partition information using the fdisk command just in case (optional).
Figure 10. Confirmation of eMMC device file and deletion of existing partition
3-4-2. Executing Image Writing to eMMC
After executing the dd command, it will take some time until the writing is completed and the prompt returns. After the prompt returns, execute the sync command.
# dd if=./part3/sdimage_agilex5_sulfur_QPDS24.3.1_20250129_01.img of=/dev/mmcblk0 bs=1M
# sync Point: Specify the image to be written in if= (Input File) of the dd command.
Point: Always execute the sync command after executing the dd command. This operation will cause the data written only to the cache to be reflected in the physical memory.
3-4-3. Writing Completed (Linux Shutdown)
Execute the halt command to shut down Linux. When the message "reboot: System halted" is displayed, turn off the power switch ( SW18 ) and unplug the USB device.
# haltThe writing operation to eMMC is now complete.
3-5. Confirmation of the writing result (eMMC boot)
Finally, with the USB storage device disconnected, turn the power back on and confirm that booting using the written image works properly.
The writing procedure will be completed when you have confirmed that it boots normally.
4. supplementary information: contents of the provided file
The following section describes the information necessary to create the same environment as described in " 2. Files provided".
4-1. U-Boot environment settings (edited contents for USB booting)
This section describes additional information about the FSBL (U-Boot SPL) and SSBL (U-Boot) environment settings included in [1] of " 2. Files provided". For detailed settings, please refer to [3] of " 2. Files provided".
The following three changes are made.
-
- Change bootcmd variable (add usb start, change Linux boot device from mmc to usb)
- Specify the location of the U-Boot environment variable (changed from ENV_IS_IN_FAT to ENV_IS_IN_UBI)
- Offset of U-Boot load source (changed from 0x400000000 -> 0xD00000: to reduce image size)
The contents of the bootcmd variable after the change are as follows
CONFIG_BOOTCOMMAND="usb start && bridge enable && fatload usb 0:1 0x82000000 Image && fatload usb 0:1 0x86000000 socfpga_agilex5_sulfur.dtb && setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw rootwait && booti 0x82000000 - 0x86000000" Point: If U-Boot can be booted from eMMC, USB boot can be performed by simply rewriting bootcmd to the modified contents. eMMC rewriting from USB boot is possible without writing the QSPI image.
Note: After changing bootcmd using the setenv or editenv command on the U-Boot prompt, "run bootcmd" will start booting Linux.
4-2. Contents of .jic file for USB boot and how to create it
The procedure for creating the .jic file in [1] of " 2. Files provided" is also described below.
The commands included in the procedure should be executed in a terminal environment with a path to Quartus® Prime on the development machine (PC).
Note: This work must be done in a Linux OS environment; if packages required for the procedure, such as ubinize, are not installed, please install them separately to accommodate your needs.
4-2-1. Creating a working directory and preparing materials
Create a working directory to store the following files.
-
- sulfur_flash_image_uboot.pfg (" 2. Provided Files " [4])
- fpga.sof ( Rename and store the .sof under output_files in GHRD, or create a symbolic link)
- spl.hex ( Rename and store .hex in FSBL (U-Boot SPL) or create a symbolic link)
- u-boot.itb ( Store u-boot.itb including SSBL (U-Boot) and ATF as it is)
Point: For spl.hex and u-boot.itb, use the files built in the environment to which the configuration changes described in " 4-1. U-Boot environment settings (edited contents for USB booting)".
4-2-2. Resizing (Padding) the U-Boot Image
Rename u-boot.itb to u-boot.bin after adjusting the size to 2MByte.
# uboot_part_size=2*1024*1024
# uboot_size=`wc -c < u-boot.itb`
# uboot_pad="$((uboot_part_size-uboot_size))"
# truncate -s +$uboot_pad u-boot.itb
# mv u-boot.itb u-boot.bin4-2-3. Creating UBIFS
Create binaries to be written to the area for USBFS. If you are building a QSPI boot environment to boot Linux, Linux Kernel, rootfs, etc. are also included in UBIFS, but for this purpose, only the environment variable storage area (env) of U-Boot is used.
# cat <<EOT > ubinize.cfg
[env]
mode=ubi
vol_id=0
vol_name=env
vol_size=256KiB
vol_type=dynamic
EOT
# ubinize -o root.ubi -p 65536 -m 1 -s 1 ubinize.cfg
# ln -s root.ubi hps.bin4-2-4. Execution of quartus_pfg command (Generation of .jic file)
Execute the following command to generate flash_image.jic.
# quartus_pfg -c sulfur_flash_image_uboot.pfg
4-3. Linux Kernel Image for NTFS
Supplementary information for the Linux Kernel image settings of " 2. Files provided" [2].
Based on the Linux Kernel image used in the reference design for Sulfur, some of the Linux Kernel configuration settings have been changed in the build.
To change the configuration settings, make menuconfig is executed after make defconfig, and "File systems > DOS/FAT/EXFAT/NT Filesysmems" is edited as shown in the figure below.
Note: The file [2] was created for Linux kernel version 6.6.51. For other versions, you can make your own in the same way. The configuration setting items may change depending on the version.
The modified configuration is shown in the light blue box below. For reference, the configuration items for version 6.12.33 are also listed.
Figure 11. Configuration of Linux Kernel image supporting NTFS
Note: Not only NTFS but also exFAT is enabled. If NTFS Read-Write file system support is additionally enabled, the file system will be read-only as well. NTFS Read-Write file system support is additionally enabled, but this setting alone does not make the file system available as a rewritable file system.
Conclusion
This is the end of the introduction of the procedure for writing to eMMC, and you may have had the impression that writing to eMMC is more time-consuming than writing to SD cards.
In the case of the Sulfur board, it is possible to switch between eMMC and SD card with a single DIPSW, so it is convenient to use both eMMC and SD card depending on your purpose. For example, the SD card can be used for debugging purposes where images are frequently rewritten, and the eMMC card can be used for writing images close to the finished product, such as in a demo environment or release environment.