Skip to contentSkip to conversation

configs: socfpga_de10_standard: Fix raw partition booting from SDMMC

PATCH Superseded Nimesh Acharya 4 participants 5 messages Oct 20 – Oct 21

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configs: socfpga_de10_standard: Fix raw partition booting from SDMMC

When using the default meta-intel-fpga configuration in Yocto 6.0 (Wrynose) for the Terasic DE10-Standard, SPL fails to load U-Boot from the raw a2 partition on the SDMMC device.

This change configures SPL to locate the raw U-Boot image using the partition type and data offset, rather than relying on the default offset relative to the beginning of the SD card.

---
Changes in v2:
- Remove CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2 since its already the default.

 configs/socfpga_de10_standard_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/socfpga_de10_standard_defconfig +4 -0
index 04f9d6c8494..f01667420a0 100644
@@ -70,3 +70,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 # CONFIG_SPL_WDT is not set
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
+
+# SPL Fails to load UBOOT without these!
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x200
Signature · 1 line
2.56.0
#1 lore raw
Quoted 21 lines · Nimesh Acharya

When using the default meta-intel-fpga configuration in Yocto 6.0 (Wrynose) for the Terasic DE10-Standard, SPL fails to load U-Boot from the raw a2 partition on the SDMMC device.

This change configures SPL to locate the raw U-Boot image using the partition type and data offset, rather than relying on the default offset relative to the beginning of the SD card.

---
Changes in v2:
- Remove CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2 since its already the default.

 configs/socfpga_de10_standard_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/socfpga_de10_standard_defconfig +0 -0
index 04f9d6c8494..f01667420a0 100644

configs/socfpga_de10_standard_defconfig CONFIG_USB_GADGET_DWC2_OTG=y · line 76

Quoted 7 lines
configs/socfpga_de10_standard_defconfig +4 -0
@@ -70,3 +70,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 # CONFIG_SPL_WDT is not set
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
+
+# SPL Fails to load UBOOT without these!
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x200

This needs to be run through "make savedefconfig" which also means no adding back comments to it.

Signature · 1 line
Tom
#2 lore raw
Quoted 18 lines · Tom Rini
Quoted 16 lines · Nimesh Acharya

When using the default meta-intel-fpga configuration in Yocto 6.0 (Wrynose) for the Terasic DE10-Standard, SPL fails to load U-Boot from the raw a2 partition on the SDMMC device.

This change configures SPL to locate the raw U-Boot image using the partition type and data offset, rather than relying on the default offset relative to the beginning of the SD card.

---
Changes in v2:
- Remove CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2 since its already the default.

  configs/socfpga_de10_standard_defconfig | 4 ++++
  1 file changed, 4 insertions(+)
Quoted 15 lines

configs/socfpga_de10_standard_defconfig CONFIG_USB_GADGET_DWC2_OTG=y · line 76

Quoted 12 lines
configs/socfpga_de10_standard_defconfig +4 -0
index 04f9d6c8494..f01667420a0 100644
@@ -70,3 +70,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
  CONFIG_USB_GADGET_DOWNLOAD=y
  # CONFIG_SPL_WDT is not set
  CONFIG_SYS_TIMER_COUNTS_DOWN=y
+
+# SPL Fails to load UBOOT without these!
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x200

This needs to be run through "make savedefconfig" which also means no adding back comments to it.

The comment is unnecessary, but yes, savedefconfig would help here.

#3 lore raw
In reply to Nimesh Acharya

Hi Nimesh,

Il giorno mar 20 ott 2026 alle ore 15:21 Nimesh Acharya <[email protected]> ha scritto:

Quoted 30 lines

When using the default meta-intel-fpga configuration in Yocto 6.0 (Wrynose) for the Terasic DE10-Standard, SPL fails to load U-Boot from the raw a2 partition on the SDMMC device.

This change configures SPL to locate the raw U-Boot image using the partition type and data offset, rather than relying on the default offset relative to the beginning of the SD card.

---
Changes in v2:
- Remove CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2 since its already the default.

 configs/socfpga_de10_standard_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/socfpga_de10_standard_defconfig +4 -1
index 04f9d6c8494..f01667420a0 100644
@@ -70,3 +70,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 # CONFIG_SPL_WDT is not set
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
+
+# SPL Fails to load UBOOT without these!
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x200
--
Quoted 2 lines

2.56.0

You do not have to edit bye hand the configs/socfpga_de10_standard_defconfig.

Instead, run a "make socfpga_de10_standard_defconfig menuconfig", select the MMC raw mode that you need (by partition type instead of by sector), run a "make savedefconfig", and move the defconfig file generated in the output directory to configs/socfpga_de10_standard_defconfig. Then, you will have the patch proposal to submit. Something like:

configs/socfpga_de10_standard_defconfig +1 -0
@@ -27,6 +27,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_CLOCKS=y
 CONFIG_SPL_PAD_TO=0x10000
 CONFIG_SPL_NO_BSS_LIMIT=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
 CONFIG_SYS_MAXARGS=32

Note that there is no CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET option value specified in the defconfig. This value is not used at all when "by partition type" mode is selected. Indeed, as you can see in the Kconfig, this config option depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR which is alternative to CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE one.

Regards,
Massimo

#4 lore raw
Quoted 70 lines · Massimo Pegorer,

Hi Nimesh,

Il giorno mar 20 ott 2026 alle ore 15:21 Nimesh Acharya <[email protected]> ha scritto:

Quoted 5 lines

When using the default meta-intel-fpga configuration in Yocto 6.0 (Wrynose) for the Terasic DE10-Standard, SPL fails to load U-Boot from the raw a2 partition on the SDMMC device.

Quoted 8 lines

This change configures SPL to locate the raw U-Boot image using the partition type and data offset, rather than relying on the default offset relative to the beginning of the SD card.

---
Changes in v2:
- Remove CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE=0xa2 since its

already the default.

Review

Quoted 5 lines
 configs/socfpga_de10_standard_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/configs/socfpga_de10_standard_defconfig

Quoted 12 lines

index 04f9d6c8494..f01667420a0 100644

configs/socfpga_de10_standard_defconfig +4 -1
@@ -70,3 +70,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 # CONFIG_SPL_WDT is not set
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
+
+# SPL Fails to load UBOOT without these!
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x200
--
Quoted 2 lines

2.56.0

You do not have to edit bye hand the
configs/socfpga_de10_standard_defconfig.

Instead, run a "make socfpga_de10_standard_defconfig menuconfig", select the MMC
raw mode that you need (by partition type instead of by sector), run a "make
savedefconfig", and move the defconfig file generated in the output directory
to configs/socfpga_de10_standard_defconfig. Then, you will have the patch proposal to submit. Something like:

configs/socfpga_de10_standard_defconfig +1 -0
@@ -27,6 +27,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_CLOCKS=y
 CONFIG_SPL_PAD_TO=0x10000
 CONFIG_SPL_NO_BSS_LIMIT=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
 CONFIG_SYS_MAXARGS=32

Note that there is no CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET option
value specified in the defconfig. This value is not used at all when "by partition type" mode is selected. Indeed, as you can see in the Kconfig, this
config option depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR which is alternative to CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE one.

Quoted 3 lines

Regards,
Massimo

Thank you for the suggestions. I have used menuconfig and savedefconfig to generate the required configuration. I have issued V3 to fix this.

Quoted 1 line