[PATCH 1/3] imx8mm_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MB

The BSP platform LmP supports the board NXP iMX8M Mini EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Signed-off-by: Oleksandr Suvorov oleksandr.suvorov@foundries.io ---
include/configs/imx8mm_evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index 8f3dd8fb61..33c7ec544b 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -10,7 +10,7 @@ #include <linux/stringify.h> #include <asm/arch/imx-regs.h>
-#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M) +#define CONFIG_SYS_BOOTM_LEN (64 * SZ_1M) #define CONFIG_SPL_MAX_SIZE (148 * 1024) #define CONFIG_SYS_MONITOR_LEN SZ_512K #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR

The BSP platform LmP supports the board NXP iMX8M Plus EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Signed-off-by: Oleksandr Suvorov oleksandr.suvorov@foundries.io ---
include/configs/imx8mq_evk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index af81a43cbc..26ad56c999 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -10,7 +10,7 @@ #include <linux/stringify.h> #include <asm/arch/imx-regs.h>
-#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M) +#define CONFIG_SYS_BOOTM_LEN (64 * SZ_1M)
#define CONFIG_SPL_MAX_SIZE (124 * 1024) #define CONFIG_SYS_MONITOR_LEN (512 * 1024)

The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Signed-off-by: Oleksandr Suvorov oleksandr.suvorov@foundries.io ---
include/configs/imx8qm_mek.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h index 99e73a9446..03fa51168a 100644 --- a/include/configs/imx8qm_mek.h +++ b/include/configs/imx8qm_mek.h @@ -10,6 +10,8 @@ #include <linux/stringify.h> #include <asm/arch/imx-regs.h>
+#define CONFIG_SYS_BOOTM_LEN (64 * SZ_1M) + #ifdef CONFIG_SPL_BUILD #define CONFIG_SPL_MAX_SIZE (124 * 1024) #define CONFIG_SYS_MONITOR_LEN (1024 * 1024)

On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.

On Sun, Aug 29, 2021 at 09:55:16PM +0200, Marek Vasut wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
Once moved to Kconfig, yes, that would be a good idea and fairly easy.

On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?

On 8/30/21 1:11 PM, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
Increase it for all of arm64 , or all of U-Boot even. This has nothing to do with NXP.

On Mon, 2021-08-30 at 14:18 +0200, Marek Vasut wrote:
On 8/30/21 1:11 PM, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
Increase it for all of arm64 , or all of U-Boot even. This has nothing to do with NXP.
In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:

On 8/30/21 5:05 PM, Marcel Ziswiler wrote:
On Mon, 2021-08-30 at 14:18 +0200, Marek Vasut wrote:
On 8/30/21 1:11 PM, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
Increase it for all of arm64 , or all of U-Boot even. This has nothing to do with NXP.
In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:
I suspect the correct solution for that is to use bootm_size and let U-Boot figure out where to place the kernel / DT / etc.

On Mon, 2021-08-30 at 17:10 +0200, Marek Vasut wrote:
On 8/30/21 5:05 PM, Marcel Ziswiler wrote:
On Mon, 2021-08-30 at 14:18 +0200, Marek Vasut wrote:
On 8/30/21 1:11 PM, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
Increase it for all of arm64 , or all of U-Boot even. This has nothing to do with NXP.
In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:
I suspect the correct solution for that is to use bootm_size and let U-Boot figure out where to place the kernel / DT / etc.
Sure, but how would that work with FIT images e.g. containing kernel binary, device tree(s) and an initrd?

On 8/30/21 6:34 PM, Marcel Ziswiler wrote:
On Mon, 2021-08-30 at 17:10 +0200, Marek Vasut wrote:
On 8/30/21 5:05 PM, Marcel Ziswiler wrote:
On Mon, 2021-08-30 at 14:18 +0200, Marek Vasut wrote:
On 8/30/21 1:11 PM, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote: > The BSP platform LmP supports the board NXP iMX8QM MEK. The > kernel size in LmP exceeds 32Mb. Increase the maximum size > of an uncompressed kernel to fix the following error: > Uncompressing Kernel Image > Error: inflate() returned -5 > Image too large: increase CONFIG_SYS_BOOTM_LEN > Must RESET board to recover >
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
Increase it for all of arm64 , or all of U-Boot even. This has nothing to do with NXP.
In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:
I suspect the correct solution for that is to use bootm_size and let U-Boot figure out where to place the kernel / DT / etc.
Sure, but how would that work with FIT images e.g. containing kernel binary, device tree(s) and an initrd?
I think I must really be missing something from the discussion you linked, sorry. Can you briefly summarize it, so we are on the same page?
I would say, increase BOOTM_LEN for everyone, or at least arm64, because right now it is too small. You say it can cause issues. I clearly do not see the issues it can cause, so, please help clarify it.

On Mon, Aug 30, 2021 at 03:05:32PM +0000, Marcel Ziswiler wrote:
On Mon, 2021-08-30 at 14:18 +0200, Marek Vasut wrote:
On 8/30/21 1:11 PM, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
Increase it for all of arm64 , or all of U-Boot even. This has nothing to do with NXP.
In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:
In that yes, if we allow for larger kernels to be loaded, we also need to ensure platforms use sane relocation values, it also needs to be considered. But even if we have CONFIG_SYS_BOOTM_LEN set large, unless we then also disable device tree / initrd relocation, we don't have a silent problem?

On Mon, 2021-08-30 at 13:46 -0400, Tom Rini wrote:
On Mon, Aug 30, 2021 at 03:05:32PM +0000, Marcel Ziswiler wrote:
On Mon, 2021-08-30 at 14:18 +0200, Marek Vasut wrote:
On 8/30/21 1:11 PM, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
Increase it for all of arm64 , or all of U-Boot even. This has nothing to do with NXP.
In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:
In that yes, if we allow for larger kernels to be loaded, we also need to ensure platforms use sane relocation values, it also needs to be considered.
Exactly.
But even if we have CONFIG_SYS_BOOTM_LEN set large, unless we then also disable device tree / initrd relocation, we don't have a silent problem?
Well, I am not saying we should NOT increase CONFIG_SYS_BOOTM_LEN. I am just cautioning that this may cause further issue resp. might require further adjustments down the road.

On 2021/8/30 19:11, Oleksandr Suvorov wrote:
On Sun, Aug 29, 2021 at 10:55 PM Marek Vasut marex@denx.de wrote:
On 8/29/21 9:39 PM, Oleksandr Suvorov wrote:
The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover
Maybe we should increase the default for arm64 instead ? 8 MiB is too small.
I completely agree if NXP doesn't have objections. @Peng Fan Do you mind?
I am ok with increase ARM64 default bootm len.
Regards, Peng.

The BSP platform LmP supports the board NXP iMX8QM MEK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov oleksandr.suvorov@foundries.io
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

The BSP platform LmP supports the board NXP iMX8M Plus EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov oleksandr.suvorov@foundries.io
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

The BSP platform LmP supports the board NXP iMX8M Mini EVK. The kernel size in LmP exceeds 32Mb. Increase the maximum size of an uncompressed kernel to fix the following error: Uncompressing Kernel Image Error: inflate() returned -5 Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover Signed-off-by: Oleksandr Suvorov oleksandr.suvorov@foundries.io
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
participants (6)
-
Marcel Ziswiler
-
Marek Vasut
-
Oleksandr Suvorov
-
Peng Fan (OSS)
-
sbabic@denx.de
-
Tom Rini