diff mbox series

[U-Boot,2/2] ARM: kirkwood: Enforce size limit for guruplug

Message ID 20180604075150.7973-2-judge.packham@gmail.com
State Accepted
Commit d4899b0f5ddf39de47bd952ca8484a14f03d00fe
Delegated to: Stefan Roese
Headers show
Series [U-Boot,1/2] ARM: kirkwood: Enforce size limit for sheevaplug | expand

Commit Message

Chris Packham June 4, 2018, 7:51 a.m. UTC
The u-boot binary sits in flash immediately before the environment.
Don't allow the binary size to grow into the environment space.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

 include/configs/guruplug.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Stefan Roese June 4, 2018, 8:06 a.m. UTC | #1
On 04.06.2018 09:51, Chris Packham wrote:
> The u-boot binary sits in flash immediately before the environment.
> Don't allow the binary size to grow into the environment space.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
> 
>   include/configs/guruplug.h | 5 +++++
>   1 file changed, 5 insertions(+)

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Stefan Roese June 5, 2018, 9:27 a.m. UTC | #2
On 04.06.2018 09:51, Chris Packham wrote:
> The u-boot binary sits in flash immediately before the environment.
> Don't allow the binary size to grow into the environment space.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>

Applied to u-boot-marvell/master.

Thanks,
Stefan
diff mbox series

Patch

diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h
index 9e7ca60f112f..04b7e944a461 100644
--- a/include/configs/guruplug.h
+++ b/include/configs/guruplug.h
@@ -39,6 +39,11 @@ 
  */
 #define CONFIG_ENV_SIZE			0x20000	/* 128k */
 #define CONFIG_ENV_OFFSET		0xE0000	/* env starts here */
+/*
+ * Environment is right behind U-Boot in flash. Make sure U-Boot
+ * doesn't grow into the environment area.
+ */
+#define CONFIG_BOARD_SIZE_LIMIT		CONFIG_ENV_OFFSET
 
 /*
  * Default environment variables