Skip to contentSkip to conversation

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

PATCH New Josh Wu 2 participants 2 messages Oct 27, 2015 – Nov 1, 2015 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore

Josh Wu

author
#0 lore raw

PATCH v2 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.

Following shows the size of the spl binaries (v2015.04 vs v2015.07):

% ls v2015.04/*spi*spl.bin -l | awk '{print $5,$(NF)}' 15540 v2015.04/at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin 15704 v2015.04/at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin 16064 v2015.04/sama5d3xek_spiflash_defconfig_u-boot-spl.bin 16304 v2015.04/sama5d4ek_spiflash_defconfig_u-boot-spl.bin 16304 v2015.04/sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

% ls v2015.07/*spi*spl.bin -l | awk '{print $5,$(NF)}' 16136 v2015.07/at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin 16300 v2015.07/at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin 16664 v2015.07/sama5d3xek_spiflash_defconfig_u-boot-spl.bin 16904 v2015.07/sama5d4ek_spiflash_defconfig_u-boot-spl.bin 16904 v2015.07/sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

The gcc version is: gcc 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)

---

Changes in v2:
- add more information (spl size) to the commit log

 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 v2 1/1 ARM: at91: sama5: change the environment address to 0x6000

Dear Josh Wu,

Quoted 26 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.

Following shows the size of the spl binaries (v2015.04 vs v2015.07):

% ls v2015.04/*spi*spl.bin -l | awk '{print $5,$(NF)}' 15540 v2015.04/at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin 15704 v2015.04/at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin 16064 v2015.04/sama5d3xek_spiflash_defconfig_u-boot-spl.bin 16304 v2015.04/sama5d4ek_spiflash_defconfig_u-boot-spl.bin 16304 v2015.04/sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

% ls v2015.07/*spi*spl.bin -l | awk '{print $5,$(NF)}' 16136 v2015.07/at91sam9n12ek_spiflash_defconfig_u-boot-spl.bin 16300 v2015.07/at91sam9x5ek_spiflash_defconfig_u-boot-spl.bin 16664 v2015.07/sama5d3xek_spiflash_defconfig_u-boot-spl.bin 16904 v2015.07/sama5d4ek_spiflash_defconfig_u-boot-spl.bin 16904 v2015.07/sama5d4_xplained_spiflash_defconfig_u-boot-spl.bin

The gcc version is: gcc 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)

Quoted 7 lines

---

Changes in v2:
- add more information (spl size) to the commit log

include/configs/at91-sama5_common.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bie?mann