On 27.11.25 05:32, Chee, Tien Fong wrote: > Hi Jan, > > On 25/11/2025 5:41 pm, Jan Kiszka wrote: >> [CAUTION: This email is from outside your organization. Unless you >> trust the sender, do not click on links or open attachments as it may >> be a fraudulent email attempting to steal your information and/or >> compromise your computer.] >> >> On 25.11.25 09:13, [email protected] wrote: >>> From: Alif Zakuan Yuslaimi <[email protected]> >>> >>> Enable support for FAT filesystem with SPL for CycloneV instead of raw >>> mode. >>> >>> Recent changes breaks CycloneV MMC boot from raw mode, and so we are >>> taking >>> this opportunity to migrate MMC boot mode to FAT as smaller OCRAM >>> size is >>> required, as well as aligning MMC boot flow with our other devices. >>> >>> Fixes: 2a00d73d081a1 ("spl: mmc: Try to clean up raw-mode options") >>> >>> Signed-off-by: Alif Zakuan Yuslaimi <[email protected]> >>> --- >>> configs/socfpga_cyclone5_defconfig | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/configs/socfpga_cyclone5_defconfig b/configs/ >>> socfpga_cyclone5_defconfig >>> index 2bec82b0625..2b2435a27bb 100644 >>> --- a/configs/socfpga_cyclone5_defconfig >>> +++ b/configs/socfpga_cyclone5_defconfig >>> @@ -12,6 +12,7 @@ CONFIG_DM_RESET=y >>> CONFIG_SPL_STACK=0x0 >>> CONFIG_SPL_TEXT_BASE=0xFFFF0000 >>> CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y >>> +CONFIG_SPL_FS_FAT=y >>> CONFIG_TIMESTAMP=y >>> CONFIG_FIT=y >>> CONFIG_DISTRO_DEFAULTS=y >>> @@ -27,6 +28,7 @@ CONFIG_SPL_PAD_TO=0x10000 >>> CONFIG_SPL_NO_BSS_LIMIT=y >>> # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set >>> CONFIG_SPL_HAVE_INIT_STACK=y >>> +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set >>> CONFIG_SPL_SPI_LOAD=y >>> CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000 >>> CONFIG_SYS_MAXARGS=32 >> But what about other boards for the cycline5? If you want to switch, >> switch them all. This looks half-backed. > > > The changes only affect the Altera official Cyclone V devkit. Other > partner and vendor boards may have different MMC layouts, so we are not > touching those in this patch.
But - as you introduced yourself - raw mode loading is broken for most boards, specifically the DE0 Nano SoC. It uses sector-based raw mode by default with an offset which only works by chance (if at all). If you switch to partition ID mode (like the romloader), everything falls apart. That's why I sent the other series. It may not yet be correct in all details, though. > > The motivation is to enable FAT filesystem support for SPL on the > official devkit, which reduces OCRAM usage, aligns the MMC boot flow > with our other devkits, and avoids the raw-mode issues introduced by > recent changes (mentioned in your series patches). > All fine, but please do it for all boards. I would not rely on partners to do their homework here, otherwise things wouldn't have been broken for more than a year now. Jan -- Siemens AG, Foundational Technologies Linux Expert Center

