]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/configs/ls1043a_common.h
arm: ls1043ardb: Add NAND secure boot target
[people/ms/u-boot.git] / include / configs / ls1043a_common.h
index c63c5e3403ad1787e80a1e3ce312f65d4e02c91a..7b1d9bbbed548080f40ed9c992c1f04b90378371 100644 (file)
 #define CONFIG_SPL_BSS_START_ADDR      0x80100000
 #define CONFIG_SYS_SPL_MALLOC_SIZE     0x100000
 #define CONFIG_SPL_BSS_MAX_SIZE                0x80000
-#define CONFIG_SYS_MONITOR_LEN         0xa0000
+
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_U_BOOT_HDR_SIZE                         (16 << 10)
+#endif /* ifdef CONFIG_SECURE_BOOT */
+
+#ifdef CONFIG_U_BOOT_HDR_SIZE
+/*
+ * HDR would be appended at end of image and copied to DDR along
+ * with U-Boot image. Here u-boot max. size is 512K. So if binary
+ * size increases then increase this size in case of secure boot as
+ * it uses raw u-boot image instead of fit image.
+ */
+#define CONFIG_SYS_MONITOR_LEN         (0x100000 + CONFIG_U_BOOT_HDR_SIZE)
+#else
+#define CONFIG_SYS_MONITOR_LEN         0x100000
+#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
+
 #endif
 
 /* IFC */