From: Tien Fong Chee <[email protected]> Drop the N5X board-local CFG_EXTRA_ENV_SETTINGS override and use the common SoC64 environment from socfpga_soc64_common.h, matching other SoC64 boards.
Do not enable CONFIG_DISTRO_DEFAULTS. N5X continues to use the legacy common env helpers referenced by BOOTCOMMAND (fatscript and mmc* / mmcfit*) with a board u-boot.scr that only enables the FPGA bridges, which matches the current N5X SD image layout. Also set CONFIG_SYS_LOAD_ADDR=0x02000000, matching Agilex/S10, so kernel and FIT loads sit above the 32 MiB /reserved-memory svcbuffer at 0x0 in socfpga_agilex.dtsi (included by the N5X board DT). Drop CONFIG_SYS_BOOTM_LEN=0x2000000 so the ARM64 default (128 MiB) applies; the previous 32 MiB override is too small for current images. Tested-on: Intel SoCFPGA N5X SoCDK hardware (ddr retention, linux boot). Signed-off-by: Tien Fong Chee <[email protected]> Signed-off-by: Chen Huei Lok <[email protected]> --- Note: This patch depends on the concurrent N5X platform support series: https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/ That series makes ATF/FIT the default (BOOTCOMMAND uses mmcfitload/ mmcfitboot), so fdt_addr is no longer used by the supported boot path. Aligning fdt_addr with common SoC64 (0x08000000) therefore does not change the FIT flow. configs/socfpga_n5x_defconfig | 2 +- include/configs/socfpga_n5x_socdk.h | 33 ----------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig index 3b3916e676d..b50665aca10 100644 --- a/configs/socfpga_n5x_defconfig +++ b/configs/socfpga_n5x_defconfig @@ -17,7 +17,7 @@ CONFIG_SPL_TEXT_BASE=0xFFE00000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x3ff00000 CONFIG_SPL_BSS_MAX_SIZE=0x100000 -CONFIG_SYS_BOOTM_LEN=0x2000000 +CONFIG_SYS_LOAD_ADDR=0x02000000 CONFIG_TARGET_SOCFPGA_N5X_SOCDK=y CONFIG_IDENT_STRING="socfpga_n5x" CONFIG_SPL_FS_FAT=y diff --git a/include/configs/socfpga_n5x_socdk.h b/include/configs/socfpga_n5x_socdk.h index fe5286e12cd..4929705259a 100644 --- a/include/configs/socfpga_n5x_socdk.h +++ b/include/configs/socfpga_n5x_socdk.h @@ -9,37 +9,4 @@ #include <configs/socfpga_soc64_common.h> -#undef CFG_EXTRA_ENV_SETTINGS -#define CFG_EXTRA_ENV_SETTINGS \ - "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "bootfile=" CONFIG_BOOTFILE "\0" \ - "fdt_addr=1100000\0" \ - "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ - "mmcroot=/dev/mmcblk0p2\0" \ - "mmcboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "booti ${loadaddr} - ${fdt_addr}\0" \ - "mmcload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootfile};" \ - "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ - "mmcfitboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${mmcroot} rw rootwait;" \ - "bootm ${loadaddr}\0" \ - "mmcfitload=mmc rescan;" \ - "load mmc 0:1 ${loadaddr} ${bootfile}\0" \ - "ramboot=setenv bootargs " CONFIG_BOOTARGS";" \ - "booti ${loadaddr} - ${fdt_addr}\0" \ - "linux_qspi_enable=if sf probe; then " \ - "echo Enabling QSPI at Linux DTB...;" \ - "fdt addr ${fdt_addr}; fdt resize;" \ - "fdt set /soc/spi@ff8d2000 status okay;" \ - "if fdt set /soc/clocks/qspi-clk clock-frequency" \ - " ${qspi_clock}; then" \ - " else fdt set /soc/clkmgr/clocks/qspi_clk clock-frequency" \ - " ${qspi_clock}; fi; fi\0" \ - "scriptaddr=0x02100000\0" \ - "scriptfile=u-boot.scr\0" \ - "fatscript=if fatload mmc 0:1 ${scriptaddr} ${scriptfile};" \ - "then source ${scriptaddr}; fi\0" - #endif /* __CONFIG_SOCFGPA_N5X_H__ */ -- 2.43.7
