Skip to contentSkip to conversation

imx8mm_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MB

PATCH In review Oleksandr Suvorov 6 participants 17 messages Aug 29, 2021 – Oct 7, 2021 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

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

---

 include/configs/imx8mm_evk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/imx8mm_evk.h +1 -1
index 8f3dd8fb61..33c7ec544b 100644
@@ -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
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/3 imx8mq_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MB

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

---

 include/configs/imx8mq_evk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/imx8mq_evk.h +1 -1
index af81a43cbc..26ad56c999 100644
@@ -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)
Signature · 1 line
2.31.1
#2 lore raw

PATCH 3/3 imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

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

---

 include/configs/imx8qm_mek.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/imx8qm_mek.h +2 -0
index 99e73a9446..03fa51168a 100644
@@ -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)
Signature · 1 line
2.31.1
#3 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 8 lines · Oleksandr Suvorov

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.

#4 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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.

Signature · 1 line
Tom
#5 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

In reply to Marek Vasut
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 1 line

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?

Signature · 5 lines
Best regards,

Oleksandr Suvorov
Software Engineer
W: www.foundries.io
#6 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 12 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 4 lines
Quoted 1 line

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.

#7 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 13 lines · Marek Vasut
Quoted 12 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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:

https://marc.info/?l=u-boot&m=162999598824381

#8 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 19 lines · Marcel Ziswiler
Quoted 18 lines · Marek Vasut
Quoted 16 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 1 line

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?

Quoted 6 lines
Quoted 2 lines

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:

https://marc.info/?l=u-boot&m=162999598824381

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.

#9 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 23 lines · Marek Vasut
Quoted 22 lines · Marcel Ziswiler
Quoted 20 lines · Marek Vasut
Quoted 12 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 4 lines
Quoted 1 line

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.

Quoted 6 lines
Quoted 3 lines

In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:

https://marc.info/?l=u-boot&m=162999598824381

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?

#10 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 24 lines · Marcel Ziswiler
Quoted 23 lines · Marek Vasut
Quoted 22 lines · Marcel Ziswiler
Quoted 20 lines · Marek Vasut
Quoted 12 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 4 lines
Quoted 1 line

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.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:

https://marc.info/?l=u-boot&m=162999598824381

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.

#11 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

In reply to Marcel Ziswiler
Quoted 19 lines · Marcel Ziswiler
Quoted 18 lines · Marek Vasut
Quoted 16 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 1 line

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?

Quoted 6 lines
Quoted 2 lines

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:

https://marc.info/?l=u-boot&m=162999598824381

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?

Signature · 1 line
Tom
#12 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

Quoted 23 lines · Tom Rini
Quoted 22 lines · Marcel Ziswiler
Quoted 20 lines · Marek Vasut
Quoted 12 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 4 lines
Quoted 1 line

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.

Quoted 7 lines
Quoted 3 lines

In general, I agree. However, in practice this can have devastating effects on stuff as discussed here:

https://marc.info/?l=u-boot&m=162999598824381

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.

Quoted 3 lines

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.

#13 lore raw

Re: [PATCH 3/3] imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

In reply to Oleksandr Suvorov
Quoted 12 lines · Oleksandr Suvorov
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Oleksandr Suvorov

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

Quoted 5 lines
Quoted 1 line

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.

#14 lore raw

PATCH 3/3 imx8qm_mek: Increase CONFIG_SYS_BOOTM_LEN to 64MB

In reply to Oleksandr Suvorov
Quoted 8 lines

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

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#15 lore raw

PATCH 2/3 imx8mq_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MB

In reply to Oleksandr Suvorov
Quoted 8 lines

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

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#16 lore raw

PATCH 1/3 imx8mm_evk: Increase CONFIG_SYS_BOOTM_LEN to 64MB

In reply to Oleksandr Suvorov
Quoted 8 lines

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

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================