[PATCH v2 4/7] ARM: socfpga: add Enclustra AA1 extra env settings

Marek Vasut marex at denx.de
Sun Sep 22 23:28:43 CEST 2024


On 9/17/24 8:21 AM, Lothar Rubusch wrote:
> Add command files for boot scripts and initial boot environment.
> 
> Signed-off-by: Andreas Buerkler <andreas.buerkler at enclustra.com>
> Signed-off-by: Lothar Rubusch <l.rubusch at gmail.com>
> ---
>   include/configs/socfpga_mercury_aa1.h | 35 +++++++++++++++++++++++++++
>   1 file changed, 35 insertions(+)
> 
> diff --git a/include/configs/socfpga_mercury_aa1.h b/include/configs/socfpga_mercury_aa1.h
> index a5b63336e8..4b047e11a7 100644
> --- a/include/configs/socfpga_mercury_aa1.h
> +++ b/include/configs/socfpga_mercury_aa1.h
> @@ -21,6 +21,41 @@
>    */
>   #define CFG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, 115200}
>   
> +/* U-Boot environment */
> +#define CFG_EXTRA_ENV_SETTINGS						\
> +	"bitstream_size=0xD00000\0"					\
> +	"bootargs=earlycon console=ttyS0,115200 rw rootwait root=/dev/mmcblk0p3\0" \
> +	"bootargs_qspi=earlycon console=ttyS0,115200 rw root=/dev/ram0\0" \
> +	"bootm_size=0x0a000000\0"					\
> +	"env_size=0x80000\0"						\
> +	"fdt_addr_r=0x10000000\0"					\
> +	"fdtfile=system.dtb\0"						\
> +	"fdtload=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${bootdir}/${fdtfile}; load ${devtype} ${devnum}:${distro_bootpart} ${fdto_addr_r} ${bootdir}/${fdtofile}; fdt addr $fdt_addr_r; fdt resize 8192; fdt apply $fdto_addr_r\0" \
> +	"fdtload_qspi=sf probe; sf read ${fdt_addr_r} ${qspi_offset_addr_devicetree} ${fdt_size}; sf read ${fdto_addr_r} ${qspi_offset_addr_dtoverlay} ${fdto_size}; fdt addr ${fdt_addr_r}; fdt resize 8192; fdt apply ${fdto_addr_r}\0" \

Use && instead of ; to bail from the script right after failing command 
instead of running through the whole script after failing command.

> +	"fdto_addr_r=0x100c0000\0"					\
> +	"fdtofile=socfpga_enclustra_mercury_XXX_overlay.dtbo\0"		\
> +	"fdto_size=0x40000\0"						\
> +	"fdt_size=0x40000\0"						\
> +	"kernel_addr_r=0x11000000\0"					\
> +	"kernel_size=0x1000000\0"					\
> +	"qspiboot=source ${scriptaddr}\0"				\
> +	"qspiload=setenv bootargs ${bootargs_qspi}; sf probe; sf read ${scriptaddr} ${qspi_offset_addr_boot_script} ${scriptsize}\0" \
> +	"qspi_offset_addr_bitstream=0x300000\0"				\
> +	"qspi_offset_addr_boot_script=0x200000\0"			\
> +	"qspi_offset_addr_devicetree=0x280000\0"			\
> +	"qspi_offset_addr_dtoverlay=0x2c0000\0"				\
> +	"qspi_offset_addr_kernel=0x1000000\0"				\
> +	"qspi_offset_addr_rootfs=0x2000000\0"				\
> +	"qspi_offset_addr_spl=0x0\0"					\
> +	"qspi_offset_addr_uboot=0x100000\0"				\
> +	"qspi_offset_addr_uboot_env=0x180000\0"				\
> +	"rootfs_addr_r=0x12000000\0"					\
> +	"rootfs_size=0x2000000\0"					\
> +	"scriptaddr=0x10800000\0"					\
> +	"scriptsize=0x80000\0"						\
> +	"spl_size=0x100000\0"						\
> +	"uboot_size=0x80000\0"
Squash this into 3/7 already .


More information about the U-Boot mailing list