Skip to contentSkip to conversation

ARM: at91: sama5: change the environment address to 0x6000

PATCH New Josh Wu 3 participants 6 messages Oct 23, 2015 – Oct 27, 2015 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore

Josh Wu

author
#0 lore raw

PATCH 1/1 ARM: at91: sama5: change the environment address to 0x6000

As sama5 board has 32k sram size, so the at91bootstrap and spl for sama5 boards is bigger than 16k (0x4000). That will overlap the U-Boot environment. So I move environment to 0x6000. And reduce its size as well.

---

 include/configs/at91-sama5_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/at91-sama5_common.h +2 -2
index a5990ce..0b60f0b 100644
@@ -98,8 +98,8 @@
 #elif CONFIG_SYS_USE_SERIALFLASH
 /* u-boot env in serial flash, by default is bus 0 and cs 0 */
 #define CONFIG_ENV_IS_IN_SPI_FLASH
-#define CONFIG_ENV_OFFSET		0x4000
-#define CONFIG_ENV_SIZE			0x4000
+#define CONFIG_ENV_OFFSET		0x6000
+#define CONFIG_ENV_SIZE			0x2000
 #define CONFIG_ENV_SECT_SIZE		0x1000
 #define CONFIG_BOOTCOMMAND		"sf probe 0; "				\
 					"sf read 0x21000000 0x60000 0xc000; "	\
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: at91: sama5: change the environment address to 0x6000

Quoted 6 lines · Josh Wu

As sama5 board has 32k sram size, so the at91bootstrap and spl for sama5 boards is bigger than 16k (0x4000). That will overlap the U-Boot environment. So I move environment to 0x6000. And reduce its size as well.

Quoted 21 lines

---

 include/configs/at91-sama5_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/at91-sama5_common.h +2 -2
index a5990ce..0b60f0b 100644
@@ -98,8 +98,8 @@
 #elif CONFIG_SYS_USE_SERIALFLASH
 /* u-boot env in serial flash, by default is bus 0 and cs 0 */
 #define CONFIG_ENV_IS_IN_SPI_FLASH
-#define CONFIG_ENV_OFFSET		0x4000
-#define CONFIG_ENV_SIZE			0x4000
+#define CONFIG_ENV_OFFSET		0x6000
+#define CONFIG_ENV_SIZE			0x2000
 #define CONFIG_ENV_SECT_SIZE		0x1000
 #define CONFIG_BOOTCOMMAND		"sf probe 0; "				\
 					"sf read 0x21000000 0x60000 0xc000; "	\
#2 lore raw

PATCH 1/1 ARM: at91: sama5: change the environment address to 0x6000

In reply to Josh Wu

Hi Josh,

Quoted 2 lines · Josh Wu

As sama5 board has 32k sram size, so the at91bootstrap and spl for sama5 boards is bigger than 16k (0x4000). That will overlap the U-Boot

Just curious about from which commit the spl binary size bigger than 16k?

Best Regards,
Bo Shen

author
#3 lore raw

PATCH 1/1 ARM: at91: sama5: change the environment address to 0x6000

Hi, Bo

Quoted 7 lines · Bo Shen

Hi Josh,

Quoted 2 lines · Josh Wu

As sama5 board has 32k sram size, so the at91bootstrap and spl for sama5 boards is bigger than 16k (0x4000). That will overlap the U-Boot

Just curious about from which commit the spl binary size bigger than 16k?

From a rough test, I found v2015.07 have spls which is bigger than 16k.
but in v2015.04 all are smaller than 16k (very close).

? temp cd v2015.04
? v2015.04 ls *spi*spl.bin -l
-rwxrwxr-x 1 josh josh 15540 Oct 26 15:38 at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 15704 Oct 26 15:38 at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16064 Oct 26 15:34 sama5d3xek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16304 Oct 26 15:35 sama5d4ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16304 Oct 26 15:37 sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

?  v2015.04  cd ../v2015.07
?  v2015.07  ls *spi*spl.bin -l

-rwxrwxr-x 1 josh josh 16136 Oct 26 15:30 at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16300 Oct 26 15:30 at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16664 Oct 26 15:25 sama5d3xek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16904 Oct 26 15:26 sama5d4ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16904 Oct 26 15:28 sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

But I am not sure which exact commit cause the size changes. Or maybe many commits increase size little be little.

Best Regards,
Josh Wu

Quoted 3 lines

Best Regards,
Bo Shen

#4 lore raw

PATCH 1/1 ARM: at91: sama5: change the environment address to 0x6000

Hi Josh,

Quoted 28 lines · Josh Wu

Hi, Bo

Quoted 7 lines · Bo Shen

Hi Josh,

Quoted 2 lines · Josh Wu

As sama5 board has 32k sram size, so the at91bootstrap and spl for sama5 boards is bigger than 16k (0x4000). That will overlap the U-Boot

Just curious about from which commit the spl binary size bigger than 16k?

From a rough test, I found v2015.07 have spls which is bigger than 16k.
but in v2015.04 all are smaller than 16k (very close).

? temp cd v2015.04
? v2015.04 ls *spi*spl.bin -l
-rwxrwxr-x 1 josh josh 15540 Oct 26 15:38 at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 15704 Oct 26 15:38 at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16064 Oct 26 15:34 sama5d3xek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16304 Oct 26 15:35 sama5d4ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16304 Oct 26 15:37 sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

?  v2015.04  cd ../v2015.07
?  v2015.07  ls *spi*spl.bin -l
Quoted 10 lines

-rwxrwxr-x 1 josh josh 16136 Oct 26 15:30 at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16300 Oct 26 15:30 at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16664 Oct 26 15:25 sama5d3xek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16904 Oct 26 15:26 sama5d4ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16904 Oct 26 15:28 sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

Thanks for these information. So, I regard this patch as a fix. If this information can be added into commit message I think that will be better.

Best Regards,
Bo Shen

author
#5 lore raw

PATCH 1/1 ARM: at91: sama5: change the environment address to 0x6000

Quoted 48 lines · Bo Shen

Hi Josh,

Quoted 30 lines · Josh Wu

Hi, Bo

Quoted 9 lines · Bo Shen

Hi Josh,

Quoted 3 lines · Josh Wu

As sama5 board has 32k sram size, so the at91bootstrap and spl for sama5
boards is bigger than 16k (0x4000). That will overlap the U-Boot

Just curious about from which commit the spl binary size bigger than 16k?

From a rough test, I found v2015.07 have spls which is bigger than 16k.
but in v2015.04 all are smaller than 16k (very close).

? temp cd v2015.04
? v2015.04 ls *spi*spl.bin -l
-rwxrwxr-x 1 josh josh 15540 Oct 26 15:38 at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 15704 Oct 26 15:38 at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16064 Oct 26 15:34 sama5d3xek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16304 Oct 26 15:35 sama5d4ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16304 Oct 26 15:37 sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

?  v2015.04  cd ../v2015.07
?  v2015.07  ls *spi*spl.bin -l
Quoted 10 lines

-rwxrwxr-x 1 josh josh 16136 Oct 26 15:30 at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16300 Oct 26 15:30 at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16664 Oct 26 15:25 sama5d3xek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16904 Oct 26 15:26 sama5d4ek_spiflash_defconfig_u-boot-spl.bin -rwxrwxr-x 1 josh josh 16904 Oct 26 15:28 sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

Thanks for these information. So, I regard this patch as a fix. If this information can be added into commit message I think that will be better.

Quoted 1 line

Thanks, Bo.
Indeed, I will generate a v2 and add such information.

Best Regards,
Josh Wu

Quoted 3 lines

Best Regards,
Bo Shen