On 6/27/22 09:58, Joel Stanley wrote:
For the u-boot-with-spl.bin target to be useful for the AST2600, set the
maximum SPL size which also sets the padding length.

The normal way of loading u-boot is as a FIT, so configure u-boot.img as
the SPL playload.

With this the following simple steps can be used to build and boot a
system:

   make u-boot-with-spl.bin
   truncate -s 64M u-boot-with-spl.bin
   qemu-system-arm -nographic -M ast2600-evb \
     -drive file=u-boot-with-spl.bin,if=mtd,format=raw

Signed-off-by: Joel Stanley <j...@jms.id.au>

Reviewed-by: Cédric Le Goater <c...@kaod.org>

Thanks,

C.


---
  include/configs/evb_ast2600.h | 3 +++
  configs/evb-ast2600_defconfig | 2 ++
  2 files changed, 5 insertions(+)

diff --git a/include/configs/evb_ast2600.h b/include/configs/evb_ast2600.h
index 3c2155da46df..f5ac88447b52 100644
--- a/include/configs/evb_ast2600.h
+++ b/include/configs/evb_ast2600.h
@@ -10,6 +10,9 @@
#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE +/* The maximum size the AST2600 bootrom can load is 64KB */
+#define CONFIG_SPL_MAX_SIZE            65536
+
  /* Misc */
  #define STR_HELPER(s) #s
  #define STR(s)                STR_HELPER(s)
diff --git a/configs/evb-ast2600_defconfig b/configs/evb-ast2600_defconfig
index 160bccff48e2..5230515f7ab6 100644
--- a/configs/evb-ast2600_defconfig
+++ b/configs/evb-ast2600_defconfig
@@ -20,6 +20,8 @@ CONFIG_SPL_SIZE_LIMIT=0x10000
  CONFIG_SPL=y
  # CONFIG_ARMV7_NONSEC is not set
  CONFIG_SYS_LOAD_ADDR=0x83000000
+CONFIG_SPL_PAYLOAD="u-boot.img"
+CONFIG_BUILD_TARGET="u-boot-with-spl.bin"
  # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
  CONFIG_FIT=y
  CONFIG_SPL_FIT_SIGNATURE=y

Reply via email to