Skip to contentSkip to conversation

arm: mvebu: turris_omnia: Add CONFIG_BOARD_SIZE_LIMIT

PATCH In review Pali Rohár 3 participants 4 messages Sep 14, 2022 – Sep 20, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mvebu: turris_omnia: Add CONFIG_BOARD_SIZE_LIMIT

Maximal size of u-boot kwb image binary is $CONFIG_ENV_OFFSET which is 0xF0000 = 983040 bytes. So add missing CONFIG_BOARD_SIZE_LIMIT definition to ensure that u-boot binary does not overflow to the u-boot env storage.

---
 configs/turris_omnia_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/turris_omnia_defconfig +2 -0
index ba635feb44b2..6698f2313550 100644
@@ -28,6 +28,8 @@ CONFIG_SYS_MEMTEST_END=0x00ffffff
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=983040
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · On Wed, 14 Sep 2022 15:06:46 +0200 Pali Rohár <[email protected]> wrote:

Maximal size of u-boot kwb image binary is $CONFIG_ENV_OFFSET which is 0xF0000 = 983040 bytes. So add missing CONFIG_BOARD_SIZE_LIMIT definition to ensure that u-boot binary does not overflow to the u-boot env storage.

---
 configs/turris_omnia_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/turris_omnia_defconfig +0 -0
index ba635feb44b2..6698f2313550 100644

configs/turris_omnia_defconfig CONFIG_SYS_MEMTEST_END=0x00ffffff · line 35

Quoted 8 lines
configs/turris_omnia_defconfig +2 -0
@@ -28,6 +28,8 @@ CONFIG_SYS_MEMTEST_END=0x00ffffff
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=983040
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
Reviewed-by on v1 1/1
#2 lore raw
In reply to Pali Rohár
Quoted 5 lines · Pali Rohár

Maximal size of u-boot kwb image binary is $CONFIG_ENV_OFFSET which is 0xF0000 = 983040 bytes. So add missing CONFIG_BOARD_SIZE_LIMIT definition to ensure that u-boot binary does not overflow to the u-boot env storage.

Thanks,
Stefan

Quoted 9 lines
---
  configs/turris_omnia_defconfig | 2 ++
  1 file changed, 2 insertions(+)
configs/turris_omnia_defconfig +0 -0
index ba635feb44b2..6698f2313550 100644

configs/turris_omnia_defconfig CONFIG_SYS_MEMTEST_END=0x00ffffff · line 35

Quoted 8 lines
configs/turris_omnia_defconfig +2 -0
@@ -28,6 +28,8 @@ CONFIG_SYS_MEMTEST_END=0x00ffffff
  CONFIG_DISTRO_DEFAULTS=y
  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
  CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=983040
  CONFIG_FIT=y
  CONFIG_FIT_VERBOSE=y
  CONFIG_OF_BOARD_SETUP=y

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#3 lore raw
In reply to Pali Rohár
Quoted 5 lines · Pali Rohár

Maximal size of u-boot kwb image binary is $CONFIG_ENV_OFFSET which is 0xF0000 = 983040 bytes. So add missing CONFIG_BOARD_SIZE_LIMIT definition to ensure that u-boot binary does not overflow to the u-boot env storage.

Applied to u-boot-marvell/next

Thanks,
Stefan

Quoted 9 lines
---
  configs/turris_omnia_defconfig | 2 ++
  1 file changed, 2 insertions(+)
configs/turris_omnia_defconfig +0 -0
index ba635feb44b2..6698f2313550 100644

configs/turris_omnia_defconfig CONFIG_SYS_MEMTEST_END=0x00ffffff · line 35

Quoted 8 lines
configs/turris_omnia_defconfig +2 -0
@@ -28,6 +28,8 @@ CONFIG_SYS_MEMTEST_END=0x00ffffff
  CONFIG_DISTRO_DEFAULTS=y
  CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
  CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=983040
  CONFIG_FIT=y
  CONFIG_FIT_VERBOSE=y
  CONFIG_OF_BOARD_SETUP=y

Viele Grüße,
Stefan Roese

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