summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-10-28 20:27:07 -0400
committerTom Rini <trini@konsulko.com>2022-11-10 10:08:55 -0500
commit08574ed339fb474e7d984a2e48160615286e4515 (patch)
tree72c247ed18c63233fee032e1f21b7976deaa7bfd /common
parent9ba938e744d81e0164f5abbd087c461596ad63d4 (diff)
downloadu-boot-08574ed339fb474e7d984a2e48160615286e4515.tar.gz
Convert CONFIG_SYS_MONITOR_LEN to Kconfig
This converts the following to Kconfig: CONFIG_SYS_MONITOR_LEN To do this, we set a default of 0 for everyone because there are a number of cases where we define CONFIG_SYS_MONITOR_LEN but the only impact is that we set TOTAL_MALLOC_LEN to be CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE, so we must continue to allow all boards to set this value. Update the SPL code to use 200 KB as the default raw U-Boot size directly, if we don't have a real CONFIG_SYS_MONITOR_LEN value. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 6f2014b0e2..22d2a0621e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -46,10 +46,6 @@ DECLARE_BINMAN_MAGIC_SYM;
#ifndef CONFIG_SYS_UBOOT_START
#define CONFIG_SYS_UBOOT_START CONFIG_TEXT_BASE
#endif
-#ifndef CONFIG_SYS_MONITOR_LEN
-/* Unknown U-Boot size, let's assume it will not be more than 200 KB */
-#define CONFIG_SYS_MONITOR_LEN (200 * 1024)
-#endif
u32 *boot_params_ptr = NULL;
@@ -232,11 +228,17 @@ __weak struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size)
return map_sysmem(CONFIG_TEXT_BASE + offset, 0);
}
+#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT
void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
{
ulong u_boot_pos = spl_get_image_pos();
+#if CONFIG_SYS_MONITOR_LEN != 0
spl_image->size = CONFIG_SYS_MONITOR_LEN;
+#else
+ /* Unknown U-Boot size, let's assume it will not be more than 200 KB */
+ spl_image->size = 200 * 1024;
+#endif
/*
* Binman error cases: address of the end of the previous region or the
@@ -254,6 +256,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
spl_image->os = IH_OS_U_BOOT;
spl_image->name = "U-Boot";
}
+#endif
#if CONFIG_IS_ENABLED(LOAD_FIT_FULL)
/* Parse and load full fitImage in SPL */