From c1fcf76863700270ce10dceefeb72017e991d627 Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Thu, 21 May 2026 09:53:15 -0400 Subject: mach-sc5xx: Update boot commands Update the default boot commands to match the expected bootargs in Linux and new SPI partitioning scheme. Because the environment is no longer stored in the SPI flash, imagesize has been removed and replaced with a fixed length read to load from the SPI. Additionally the partitions of the mmc have been updated. The first partition holds the fitImage at /fitImage, and the second partition contains the rootfs. With this change, the imagefile environment variable has also been eliminated, the image in the first partition is expected to always be named fitImage. Signed-off-by: Caleb Ethridge --- include/env/adi/adi_boot.env | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env index 42f33ed83af..b4b725247f7 100644 --- a/include/env/adi/adi_boot.env +++ b/include/env/adi/adi_boot.env @@ -39,23 +39,27 @@ nfsboot=run init_ethernet; #endif #if defined(USE_MMC) -mmcargs=setenv bootargs root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait ${adi_bootargs} +mmcargs=setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ${adi_bootargs} mmcboot=mmc rescan; - ext4load mmc 0:1 ${loadaddr} /boot/${imagefile}; + ext4load mmc 0:1 ${loadaddr} /fitImage; run mmcargs; bootm ${loadaddr} #endif -#if defined(USE_SPI) || defined(USE_OSPI) -spiargs=setenv bootargs root=/dev/mtdblock4 rw rootfstype=jffs2 ${adi_bootargs} +#if defined(USE_SPI) +spiargs=setenv bootargs root=/dev/mtdblock4 rw rootfstype=jffs2 ${adi_bootargs}; setenv sfdev CONFIG_SC_BOOT_SPI_BUS:CONFIG_SC_BOOT_SPI_SSEL spiboot=run spiargs; sf probe ${sfdev}; - sf read ${loadaddr} ${adi_image_offset} ${imagesize}; + sf read ${loadaddr} ${adi_image_offset} 0xf00000; bootm ${loadaddr} #endif #if defined(USE_OSPI) -ospiboot=run spiboot +ospiargs=setenv bootargs root=/dev/mtdblock4 rw rootfstype=jffs2 ${adi_bootargs}; setenv sfdev CONFIG_SC_BOOT_OSPI_BUS:CONFIG_SC_BOOT_OSPI_SSEL +ospiboot=run ospiargs; + sf probe ${sfdev}; + sf read ${loadaddr} ${adi_image_offset} 0xf00000; + bootm ${loadaddr} #endif #if defined(USE_RAM) -- cgit v1.3.1