All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size
@ 2012-01-29 21:37 Alexandre Belloni
  2012-02-18 15:13 ` Albert ARIBAUD
  0 siblings, 1 reply; 20+ messages in thread
From: Alexandre Belloni @ 2012-01-29 21:37 UTC (permalink / raw)
  To: u-boot

On at91sam platforms, u-boot grew larger than the allocated size in
dataflash, the layout was:
bootstrap  0x00000000
ubootenv   0x00004200
uboot      0x00008400
kernel     0x00042000

u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
0x39C00 bytes anymore.

Now, the layout is:
bootstrap  0x00000000
uboot      0x00004000
ubootenv   0x00084000
ubootenv2  0x00088000
kernel     0x0008C000

Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
---
 include/configs/at91sam9260ek.h |   18 ++++++++++++------
 include/configs/at91sam9261ek.h |   18 ++++++++++++------
 include/configs/at91sam9263ek.h |   10 +++++++---
 include/configs/at91sam9rlek.h  |   10 +++++++---
 4 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index db52ee6..b537760 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -185,10 +185,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -199,10 +201,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS1 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -231,6 +235,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 5140b26..fa461da 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -187,10 +187,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET	0x4200
+#define CONFIG_ENV_OFFSET	0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -201,10 +203,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS3 */
 #define CONFIG_ENV_IS_IN_DATAFLASH
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + 0x8400)
-#define CONFIG_ENV_OFFSET	0x4200
+#define CONFIG_ENV_OFFSET	0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -233,6 +237,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_CMDLINE_EDITING
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 8399246..253bee4 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -314,10 +314,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -347,6 +349,8 @@
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 79ea1f2..423f523 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -153,10 +153,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -183,6 +185,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING		1
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size
  2012-01-29 21:37 [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size Alexandre Belloni
@ 2012-02-18 15:13 ` Albert ARIBAUD
  2012-02-18 16:21   ` Albert ARIBAUD
  0 siblings, 1 reply; 20+ messages in thread
From: Albert ARIBAUD @ 2012-02-18 15:13 UTC (permalink / raw)
  To: u-boot

Le 29/01/2012 22:37, Alexandre Belloni a ?crit :
> On at91sam platforms, u-boot grew larger than the allocated size in
> dataflash, the layout was:
> bootstrap  0x00000000
> ubootenv   0x00004200
> uboot      0x00008400
> kernel     0x00042000
>
> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
> 0x39C00 bytes anymore.
>
> Now, the layout is:
> bootstrap  0x00000000
> uboot      0x00004000
> ubootenv   0x00084000
> ubootenv2  0x00088000
> kernel     0x0008C000
>
> Signed-off-by: Alexandre Belloni<alexandre.belloni@piout.net>

Please prefix patch title/summary with "at91:" or better yet, with the 
involved boards' names.

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size
  2012-02-18 15:13 ` Albert ARIBAUD
@ 2012-02-18 16:21   ` Albert ARIBAUD
  2012-02-20 10:40     ` Alexandre Belloni
  0 siblings, 1 reply; 20+ messages in thread
From: Albert ARIBAUD @ 2012-02-18 16:21 UTC (permalink / raw)
  To: u-boot

Hi again Alexandre,

Le 18/02/2012 16:13, Albert ARIBAUD a ?crit :
> Le 29/01/2012 22:37, Alexandre Belloni a ?crit :
>> On at91sam platforms, u-boot grew larger than the allocated size in
>> dataflash, the layout was:
>> bootstrap 0x00000000
>> ubootenv 0x00004200
>> uboot 0x00008400
>> kernel 0x00042000
>>
>> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
>> 0x39C00 bytes anymore.
>>
>> Now, the layout is:
>> bootstrap 0x00000000
>> uboot 0x00004000
>> ubootenv 0x00084000
>> ubootenv2 0x00088000
>> kernel 0x0008C000
>>
>> Signed-off-by: Alexandre Belloni<alexandre.belloni@piout.net>
>
> Please prefix patch title/summary with "at91:" or better yet, with the
> involved boards' names.

Also, doesn't this overallocate for U-Boot and seriously reduce the 
space available for Linux in Flash?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size
  2012-02-18 16:21   ` Albert ARIBAUD
@ 2012-02-20 10:40     ` Alexandre Belloni
  2012-02-20 10:46       ` Albert ARIBAUD
  0 siblings, 1 reply; 20+ messages in thread
From: Alexandre Belloni @ 2012-02-20 10:40 UTC (permalink / raw)
  To: u-boot

Hi,

On Sat, Feb 18, 2012 at 05:21:46PM +0100, Albert ARIBAUD wrote :
> Also, doesn't this overallocate for U-Boot and seriously reduce the
> space available for Linux in Flash?
> 

I did so on Marek's recommendation. Right now, u-boot's size for
AT91SAM9261EK is 235kB. I guess we can allocate a bit less.

My board has 8MB of dataflash, I couldn't find what size is available on
other evaluation kits...

Regards,

-- 
Alexandre Belloni

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size
  2012-02-20 10:40     ` Alexandre Belloni
@ 2012-02-20 10:46       ` Albert ARIBAUD
  2012-02-20 12:48         ` [U-Boot] [PATCH] AT91SAM9*: " Alexandre Belloni
  2012-02-20 12:51         ` [U-Boot] [PATCH v2] " Alexandre Belloni
  0 siblings, 2 replies; 20+ messages in thread
From: Albert ARIBAUD @ 2012-02-20 10:46 UTC (permalink / raw)
  To: u-boot

Hi Alexandre,

Le 20/02/2012 11:40, Alexandre Belloni a ?crit :
> Hi,
>
> On Sat, Feb 18, 2012 at 05:21:46PM +0100, Albert ARIBAUD wrote :
>> Also, doesn't this overallocate for U-Boot and seriously reduce the
>> space available for Linux in Flash?
>>
>
> I did so on Marek's recommendation. Right now, u-boot's size for
> AT91SAM9261EK is 235kB. I guess we can allocate a bit less.
>
> My board has 8MB of dataflash, I couldn't find what size is available on
> other evaluation kits...

Hmm... With 8MByte FLASH the proposed mapping leaves 7+ MB for the 
flashed kernel, which should be enough :) so that's ok.

> Regards,

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-20 10:46       ` Albert ARIBAUD
@ 2012-02-20 12:48         ` Alexandre Belloni
  2012-02-20 13:00           ` Albert ARIBAUD
  2012-02-20 12:51         ` [U-Boot] [PATCH v2] " Alexandre Belloni
  1 sibling, 1 reply; 20+ messages in thread
From: Alexandre Belloni @ 2012-02-20 12:48 UTC (permalink / raw)
  To: u-boot

On at91sam platforms, u-boot grew larger than the allocated size in
dataflash, the layout was:
bootstrap  0x00000000
ubootenv   0x00004200
uboot      0x00008400
kernel     0x00042000

u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
0x39C00 bytes anymore.

Now, the layout is:
bootstrap  0x00000000
uboot      0x00004000
ubootenv   0x00084000
ubootenv2  0x00088000
kernel     0x0008C000

Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
---
 include/configs/at91sam9260ek.h |   18 ++++++++++++------
 include/configs/at91sam9261ek.h |   18 ++++++++++++------
 include/configs/at91sam9263ek.h |   10 +++++++---
 include/configs/at91sam9rlek.h  |   10 +++++++---
 4 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index db52ee6..b537760 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -185,10 +185,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -199,10 +201,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS1 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -231,6 +235,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 5140b26..fa461da 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -187,10 +187,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET	0x4200
+#define CONFIG_ENV_OFFSET	0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -201,10 +203,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS3 */
 #define CONFIG_ENV_IS_IN_DATAFLASH
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + 0x8400)
-#define CONFIG_ENV_OFFSET	0x4200
+#define CONFIG_ENV_OFFSET	0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -233,6 +237,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_CMDLINE_EDITING
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 8399246..253bee4 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -314,10 +314,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -347,6 +349,8 @@
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 79ea1f2..423f523 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -153,10 +153,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -183,6 +185,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING		1
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size
  2012-02-20 10:46       ` Albert ARIBAUD
  2012-02-20 12:48         ` [U-Boot] [PATCH] AT91SAM9*: " Alexandre Belloni
@ 2012-02-20 12:51         ` Alexandre Belloni
  1 sibling, 0 replies; 20+ messages in thread
From: Alexandre Belloni @ 2012-02-20 12:51 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 20, 2012 at 11:46:58AM +0100, Albert ARIBAUD wrote :
> Hmm... With 8MByte FLASH the proposed mapping leaves 7+ MB for the
> flashed kernel, which should be enough :) so that's ok.
> 

Ok then, I just prefixed the patch title with AT91SAM9*:

Regards,

-- 
Alexandre Belloni

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-20 12:48         ` [U-Boot] [PATCH] AT91SAM9*: " Alexandre Belloni
@ 2012-02-20 13:00           ` Albert ARIBAUD
  2012-02-20 16:40             ` [U-Boot] [PATCH v3] " Alexandre Belloni
  0 siblings, 1 reply; 20+ messages in thread
From: Albert ARIBAUD @ 2012-02-20 13:00 UTC (permalink / raw)
  To: u-boot

Hi Alexandre,

Le 20/02/2012 13:48, Alexandre Belloni a ?crit :
> On at91sam platforms, u-boot grew larger than the allocated size in
> dataflash, the layout was:
> bootstrap  0x00000000
> ubootenv   0x00004200
> uboot      0x00008400
> kernel     0x00042000
>
> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
> 0x39C00 bytes anymore.
>
> Now, the layout is:
> bootstrap  0x00000000
> uboot      0x00004000
> ubootenv   0x00084000
> ubootenv2  0x00088000
> kernel     0x0008C000
>
> Signed-off-by: Alexandre Belloni<alexandre.belloni@piout.net>
> ---

As this follows a V2 patch, you should post as V3 and with patch history 
(diffs from V3 to V2 and from V2 to V1) inserted here.

>   include/configs/at91sam9260ek.h |   18 ++++++++++++------
>   include/configs/at91sam9261ek.h |   18 ++++++++++++------
>   include/configs/at91sam9263ek.h |   10 +++++++---
>   include/configs/at91sam9rlek.h  |   10 +++++++---
>   4 files changed, 38 insertions(+), 18 deletions(-)

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v3] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-20 13:00           ` Albert ARIBAUD
@ 2012-02-20 16:40             ` Alexandre Belloni
  2012-02-27 15:25               ` Ulf Samuelsson
  0 siblings, 1 reply; 20+ messages in thread
From: Alexandre Belloni @ 2012-02-20 16:40 UTC (permalink / raw)
  To: u-boot

On at91sam platforms, u-boot grew larger than the allocated size in
dataflash, the layout was:
bootstrap  0x00000000
ubootenv   0x00004200
uboot      0x00008400
kernel     0x00042000

u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
0x39C00 bytes anymore.

Now, the layout is:
bootstrap  0x00000000
uboot      0x00004000
ubootenv   0x00084000
ubootenv2  0x00088000
kernel     0x0008C000

Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
---
Changes for v2:
	- changed the layout as per Marek's recommendation
Changes for v3:
	- prefixed the patch title with AT91SAM9*:

 include/configs/at91sam9260ek.h |   18 ++++++++++++------
 include/configs/at91sam9261ek.h |   18 ++++++++++++------
 include/configs/at91sam9263ek.h |   10 +++++++---
 include/configs/at91sam9rlek.h  |   10 +++++++---
 4 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index db52ee6..b537760 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -185,10 +185,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -199,10 +201,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS1 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -231,6 +235,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 5140b26..fa461da 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -187,10 +187,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET	0x4200
+#define CONFIG_ENV_OFFSET	0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -201,10 +203,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS3 */
 #define CONFIG_ENV_IS_IN_DATAFLASH
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + 0x8400)
-#define CONFIG_ENV_OFFSET	0x4200
+#define CONFIG_ENV_OFFSET	0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -233,6 +237,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_CMDLINE_EDITING
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 8399246..253bee4 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -314,10 +314,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -347,6 +349,8 @@
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 79ea1f2..423f523 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -153,10 +153,12 @@
 /* bootstrap + u-boot + env + linux in dataflash on CS0 */
 #define CONFIG_ENV_IS_IN_DATAFLASH	1
 #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
-#define CONFIG_ENV_OFFSET		0x4200
+#define CONFIG_ENV_OFFSET		0x84000
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
-#define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_ENV_SIZE		0x4000
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -183,6 +185,8 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING		1
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
 /*
  * Size of malloc() pool
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v3] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-20 16:40             ` [U-Boot] [PATCH v3] " Alexandre Belloni
@ 2012-02-27 15:25               ` Ulf Samuelsson
  2012-02-28 22:57                 ` Alexandre Belloni
  0 siblings, 1 reply; 20+ messages in thread
From: Ulf Samuelsson @ 2012-02-27 15:25 UTC (permalink / raw)
  To: u-boot

On 2012-02-20 17:40, Alexandre Belloni wrote:
> On at91sam platforms, u-boot grew larger than the allocated size in
> dataflash, the layout was:
> bootstrap  0x00000000
> ubootenv   0x00004200
> uboot      0x00008400
> kernel     0x00042000
>
> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
> 0x39C00 bytes anymore.
>
> Now, the layout is:
> bootstrap  0x00000000
> uboot      0x00004000
> ubootenv   0x00084000
> ubootenv2  0x00088000
> kernel     0x0008C000
>


NAK!

1. You need to be aware of the page size of dataflashes.
     Each page is 1056 bytes, not 1024 bytes.
     Your patch will make the U-Boot image start in the middle of a page.
2. Std AT91bootstrap loads U-Boot from 0x8400
     so your patch breaks 99% of all SAM9  boards.

If you want to grow U-Boot, then

bootstrap  0x00000000		; 16 kB
ubootenv   0x00004200		; 16 kB	- Should be plenty
uboot      0x00008400		;
kernel     0x00063000		; Why waste space...




> Signed-off-by: Alexandre Belloni<alexandre.belloni@piout.net>
> ---
> Changes for v2:
> 	- changed the layout as per Marek's recommendation
> Changes for v3:
> 	- prefixed the patch title with AT91SAM9*:
>
>   include/configs/at91sam9260ek.h |   18 ++++++++++++------
>   include/configs/at91sam9261ek.h |   18 ++++++++++++------
>   include/configs/at91sam9263ek.h |   10 +++++++---
>   include/configs/at91sam9rlek.h  |   10 +++++++---
>   4 files changed, 38 insertions(+), 18 deletions(-)
>
> diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
> index db52ee6..b537760 100644
> --- a/include/configs/at91sam9260ek.h
> +++ b/include/configs/at91sam9260ek.h
> @@ -185,10 +185,12 @@
>   /* bootstrap + u-boot + env + linux in dataflash on CS0 */
>   #define CONFIG_ENV_IS_IN_DATAFLASH	1
>   #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
> -#define CONFIG_ENV_OFFSET		0x4200
> +#define CONFIG_ENV_OFFSET		0x84000
>   #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
> -#define CONFIG_ENV_SIZE		0x4200
> -#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_ENV_SIZE		0x4000
> +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
> +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
> +#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
>   #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
>   				"root=/dev/mtdblock0 "			\
>   				"mtdparts=atmel_nand:-(root) "		\
> @@ -199,10 +201,12 @@
>   /* bootstrap + u-boot + env + linux in dataflash on CS1 */
>   #define CONFIG_ENV_IS_IN_DATAFLASH	1
>   #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
> -#define CONFIG_ENV_OFFSET		0x4200
> +#define CONFIG_ENV_OFFSET		0x84000
>   #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
> -#define CONFIG_ENV_SIZE		0x4200
> -#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_ENV_SIZE		0x4000
> +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
> +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
> +#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
>   #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
>   				"root=/dev/mtdblock0 "			\
>   				"mtdparts=atmel_nand:-(root) "		\
> @@ -231,6 +235,8 @@
>   #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
>   #define CONFIG_SYS_LONGHELP		1
>   #define CONFIG_CMDLINE_EDITING	1
> +#define CONFIG_AUTO_COMPLETE
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
>
>   /*
>    * Size of malloc() pool
> diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
> index 5140b26..fa461da 100644
> --- a/include/configs/at91sam9261ek.h
> +++ b/include/configs/at91sam9261ek.h
> @@ -187,10 +187,12 @@
>   /* bootstrap + u-boot + env + linux in dataflash on CS0 */
>   #define CONFIG_ENV_IS_IN_DATAFLASH
>   #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
> -#define CONFIG_ENV_OFFSET	0x4200
> +#define CONFIG_ENV_OFFSET	0x84000
>   #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
> -#define CONFIG_ENV_SIZE		0x4200
> -#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_ENV_SIZE		0x4000
> +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
> +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
> +#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
>   #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
>   				"root=/dev/mtdblock0 "			\
>   				"mtdparts=atmel_nand:-(root) "		\
> @@ -201,10 +203,12 @@
>   /* bootstrap + u-boot + env + linux in dataflash on CS3 */
>   #define CONFIG_ENV_IS_IN_DATAFLASH
>   #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + 0x8400)
> -#define CONFIG_ENV_OFFSET	0x4200
> +#define CONFIG_ENV_OFFSET	0x84000
>   #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + CONFIG_ENV_OFFSET)
> -#define CONFIG_ENV_SIZE		0x4200
> -#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_ENV_SIZE		0x4000
> +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
> +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
> +#define CONFIG_BOOTCOMMAND	"cp.b 0xD008C000 0x22000000 0x210000; bootm"
>   #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
>   				"root=/dev/mtdblock0 "			\
>   				"mtdparts=atmel_nand:-(root) "		\
> @@ -233,6 +237,8 @@
>   #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
>   #define CONFIG_SYS_LONGHELP
>   #define CONFIG_CMDLINE_EDITING
> +#define CONFIG_AUTO_COMPLETE
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
>
>   /*
>    * Size of malloc() pool
> diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
> index 8399246..253bee4 100644
> --- a/include/configs/at91sam9263ek.h
> +++ b/include/configs/at91sam9263ek.h
> @@ -314,10 +314,12 @@
>   /* bootstrap + u-boot + env + linux in dataflash on CS0 */
>   #define CONFIG_ENV_IS_IN_DATAFLASH	1
>   #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
> -#define CONFIG_ENV_OFFSET		0x4200
> +#define CONFIG_ENV_OFFSET		0x84000
>   #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
> -#define CONFIG_ENV_SIZE		0x4200
> -#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_ENV_SIZE		0x4000
> +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
> +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
> +#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
>   #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
>   				"root=/dev/mtdblock0 " \
>   				"mtdparts=atmel_nand:-(root) "\
> @@ -347,6 +349,8 @@
>   #define CONFIG_AUTO_COMPLETE
>   #define CONFIG_SYS_HUSH_PARSER
>   #define CONFIG_SYS_PROMPT_HUSH_PS2	">  "
> +#define CONFIG_AUTO_COMPLETE
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
>
>   /*
>    * Size of malloc() pool
> diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
> index 79ea1f2..423f523 100644
> --- a/include/configs/at91sam9rlek.h
> +++ b/include/configs/at91sam9rlek.h
> @@ -153,10 +153,12 @@
>   /* bootstrap + u-boot + env + linux in dataflash on CS0 */
>   #define CONFIG_ENV_IS_IN_DATAFLASH	1
>   #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
> -#define CONFIG_ENV_OFFSET		0x4200
> +#define CONFIG_ENV_OFFSET		0x84000
>   #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
> -#define CONFIG_ENV_SIZE		0x4200
> -#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_ENV_SIZE		0x4000
> +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
> +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
> +#define CONFIG_BOOTCOMMAND	"cp.b 0xC008C000 0x22000000 0x210000; bootm"
>   #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
>   				"root=/dev/mtdblock0 " \
>   				"mtdparts=atmel_nand:-(root) "\
> @@ -183,6 +185,8 @@
>   #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
>   #define CONFIG_SYS_LONGHELP		1
>   #define CONFIG_CMDLINE_EDITING		1
> +#define CONFIG_AUTO_COMPLETE
> +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
>
>   /*
>    * Size of malloc() pool

-- 
Best Regards
Ulf Samuelsson
ulf at emagii.com
+46 722 427437

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v3] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-27 15:25               ` Ulf Samuelsson
@ 2012-02-28 22:57                 ` Alexandre Belloni
  2012-02-29  0:50                   ` Ulf Samuelsson
  0 siblings, 1 reply; 20+ messages in thread
From: Alexandre Belloni @ 2012-02-28 22:57 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 27, 2012 at 04:25:02PM +0100, Ulf Samuelsson wrote :
> On 2012-02-20 17:40, Alexandre Belloni wrote:
> >On at91sam platforms, u-boot grew larger than the allocated size in
> >dataflash, the layout was:
> >bootstrap  0x00000000
> >ubootenv   0x00004200
> >uboot      0x00008400
> >kernel     0x00042000
> >
> >u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
> >0x39C00 bytes anymore.
> >
> >Now, the layout is:
> >bootstrap  0x00000000
> >uboot      0x00004000
> >ubootenv   0x00084000
> >ubootenv2  0x00088000
> >kernel     0x0008C000
> >
> 
> 
> NAK!
> 
> 1. You need to be aware of the page size of dataflashes.
>     Each page is 1056 bytes, not 1024 bytes.
>     Your patch will make the U-Boot image start in the middle of a page.

Ok, I couldn't find a clear spec on that dataflash...

> 2. Std AT91bootstrap loads U-Boot from 0x8400
>     so your patch breaks 99% of all SAM9  boards.
> 

Those boards are broken anyway ! As u-boot is bigger than the load size
of at91bootstrap (0x33900 by default). So, not changing means that you
are screwed after flashing a new u-boot.

> If you want to grow U-Boot, then
> 
> bootstrap  0x00000000		; 16 kB
> ubootenv   0x00004200		; 16 kB	- Should be plenty
> uboot      0x00008400		;
> kernel     0x00063000		; Why waste space...
> 

What about the redundant env ? Why shouldn't we reorder u-boot and its
env ?

Regards,

-- 
Alexandre Belloni

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v3] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-28 22:57                 ` Alexandre Belloni
@ 2012-02-29  0:50                   ` Ulf Samuelsson
  2012-02-29  8:58                     ` Alexandre Belloni
  0 siblings, 1 reply; 20+ messages in thread
From: Ulf Samuelsson @ 2012-02-29  0:50 UTC (permalink / raw)
  To: u-boot






28 feb 2012 kl. 23:57 skrev Alexandre Belloni <alexandre.belloni@piout.net>:

> On Mon, Feb 27, 2012 at 04:25:02PM +0100, Ulf Samuelsson wrote :
>> On 2012-02-20 17:40, Alexandre Belloni wrote:
>>> On at91sam platforms, u-boot grew larger than the allocated size in
>>> dataflash, the layout was:
>>> bootstrap  0x00000000
>>> ubootenv   0x00004200
>>> uboot      0x00008400
>>> kernel     0x00042000
>>> 
>>> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
>>> 0x39C00 bytes anymore.
>>> 
>>> Now, the layout is:
>>> bootstrap  0x00000000
>>> uboot      0x00004000
>>> ubootenv   0x00084000
>>> ubootenv2  0x00088000
>>> kernel     0x0008C000
>>> 
>> 
>> 
>> NAK!
>> 
>> 1. You need to be aware of the page size of dataflashes.
>>    Each page is 1056 bytes, not 1024 bytes.
>>    Your patch will make the U-Boot image start in the middle of a page.
> 
> Ok, I couldn't find a clear spec on that dataflash...

maybe you should have tried to look at the Atmel homepage...

> 
>> 2. Std AT91bootstrap loads U-Boot from 0x8400
>>    so your patch breaks 99% of all SAM9  boards.
>> 
> 
> Those boards are broken anyway !

No they are not.
The partitioning gives you some hint on where to store the kernel,
but you can store the kernel at any suitable address.
you lose some conveniance, but thats all.

Storing U-boot at any other address than 0x8400, means that AT91bootstrap
must be modified, and there is significant disadvantages in having two possible u-boot locations.
if you have an at91bootstrap binary, will this use the old or new location?
I fail to see any benefit in moving, so that 



> As u-boot is bigger than the load size
> of at91bootstrap (0x33900 by default). So, not changing means that you
> are screwed after flashing a new u-boot

IIRC, The latest bootstrap with Kconfig has configurable size.
Changing size is OK, changing location is not.




>> If you want to grow U-Boot, then
>> 
>> bootstrap  0x00000000        ; 16 kB
>> ubootenv   0x00004200        ; 16 kB    - Should be plenty
>> uboot      0x00008400        ;
>> kernel     0x00063000        ; Why waste space...
>> 
> 
> What about the redundant env ? Why shouldn't we reorder u-boot and its
> env ?

Because it adds problems without any benefits.
When I looked the last time, the environment is only 8 pages,
So you can fit a redundant environment anyway in 16 kB+}


> 
> Regards,
> 
> -- 
> Alexandre Belloni


Best Regards
Ulf Samuelsson
ulf at emagii.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v3] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-29  0:50                   ` Ulf Samuelsson
@ 2012-02-29  8:58                     ` Alexandre Belloni
  2012-02-29  9:49                       ` Ulf Samuelsson
  0 siblings, 1 reply; 20+ messages in thread
From: Alexandre Belloni @ 2012-02-29  8:58 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 29, 2012 at 01:50:18AM +0100, Ulf Samuelsson wrote :
> > 
> >> 2. Std AT91bootstrap loads U-Boot from 0x8400
> >>    so your patch breaks 99% of all SAM9  boards.
> >> 
> > 
> > Those boards are broken anyway !
> 
> No they are not.
> The partitioning gives you some hint on where to store the kernel,
> but you can store the kernel at any suitable address.
> you lose some conveniance, but thats all.
> 
> Storing U-boot at any other address than 0x8400, means that AT91bootstrap
> must be modified, and there is significant disadvantages in having two possible u-boot locations.
> if you have an at91bootstrap binary, will this use the old or new location?
> I fail to see any benefit in moving, so that 
> 
> 
> 
> > As u-boot is bigger than the load size
> > of at91bootstrap (0x33900 by default). So, not changing means that you
> > are screwed after flashing a new u-boot
> 
> IIRC, The latest bootstrap with Kconfig has configurable size.
> Changing size is OK, changing location is not.
> 
> 

Doesn't that mean that you then have to recompile/reflash at91bootstrap
and so that the boards are broken using the latest ut-boot ? I couldn't
get my board working with the stock at91bootstrap because it cannot load
u-boot.

It has to be fixed or I don't see the point in keeping those configs.
If we don't want to change the location, and I can understand the
reasons why, then was my first patch ok ?

http://lists.denx.de/pipermail/u-boot/2012-January/114485.html

I'd like to see that fixed so that I could integrate it properly in
buildroot...

> 
> 
> >> If you want to grow U-Boot, then
> >> 
> >> bootstrap  0x00000000        ; 16 kB
> >> ubootenv   0x00004200        ; 16 kB    - Should be plenty
> >> uboot      0x00008400        ;
> >> kernel     0x00063000        ; Why waste space...
> >> 
> > 
> > What about the redundant env ? Why shouldn't we reorder u-boot and its
> > env ?
> 
> Because it adds problems without any benefits.
> When I looked the last time, the environment is only 8 pages,
> So you can fit a redundant environment anyway in 16 kB+}
> 



-- 
Alexandre Belloni

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v3] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-29  8:58                     ` Alexandre Belloni
@ 2012-02-29  9:49                       ` Ulf Samuelsson
  2012-04-08 18:17                         ` [U-Boot] [PATCH v4] " Alexandre Belloni
  0 siblings, 1 reply; 20+ messages in thread
From: Ulf Samuelsson @ 2012-02-29  9:49 UTC (permalink / raw)
  To: u-boot

On 2012-02-29 09:58, Alexandre Belloni wrote:
> On Wed, Feb 29, 2012 at 01:50:18AM +0100, Ulf Samuelsson wrote :
>>> SIZE
>>>> 2. Std AT91bootstrap loads U-Boot from 0x8400
>>>>     so your patch breaks 99% of all SAM9  boards.
>>>>
>>> Those boards are broken anyway !
>> No they are not.
>> The partitioning gives you some hint on where to store the kernel,
>> but you can store the kernel at any suitable address.
>> you lose some conveniance, but thats all.
>>
>> Storing U-boot at any other address than 0x8400, means that AT91bootstrap
>> must be modified, and there is significant disadvantages in having two possible u-boot locations.
>> if you have an at91bootstrap binary, will this use the old or new location?
>> I fail to see any benefit in moving, so that
>>
>>
>>
>>> As u-boot is bigger than the load size
>>> of at91bootstrap (0x33900 by default). So, not changing means that you
>>> are screwed after flashing a new u-boot
>> IIRC, The latest bootstrap with Kconfig has configurable size.
>> Changing size is OK, changing location is not.
>>
>>
> Doesn't that mean that you then have to recompile/reflash at91bootstrap
> and so that the boards are broken using the latest ut-boot ? I couldn't
> get my board working with the stock at91bootstrap because it cannot load
> u-boot.
>
The size of the image loaded by at91bootstrap
can be configured by the user using KConfig.

The load address cannot be changed in KConfig
For this, you have to modify the source code - bad idea.

I think it would be good, if the u-boot image contained its own size 
somewhere.
(Maybe it does already) marked with some magic key, so that the size can be
determined during run time.

I don't like the idea to move the environment as the default.
There are people that try to fit the complete kernel + file system
into a single 8 MB dataflash and you are using way too much space
for U-Boot.  If you want to have environment in the high memory,
then this should be an option, and not enabled by default.

Also, you are putting the environment into the same block as the kernel.

 From the datasheet:
"Each page within a sector must be updated/rewritten at least once 
within every
10,000 cumulative page erase/program operations in that sector."

So updating the environment, may corrupt the kernel.

With a large environment = 32 kB this will happen 4 times faster
than with an 8 kB environement.
I.E: instead of within every 1250 "saveenv", it must happen
within every 312 "saveenv" which is "danger close".

The environment should thus be as small as acceptable.-

To avoid the problem fully, you have to allocate a 256 KB sector for 
each environment,
which means that U-Boot will use 1 MB. Maybe a single 256 kB sector will do.
This will cause a significant addition to programming time and is real 
wasteful
in terms of memory-

Better to localize the problem and put the 2 x 8 kB environment and 
U-Boot in the first sector
with U-Boot overlapping into the second sector.
This will allow people to choose exactly where the kernel starts.

The kernel should start at sector 3 (page 512) = 0x84000 to avoid
problems, if you keep reprogramming u-boot.
Sector 0 = 8 kB, 1 = 248 kB, 2 = 256 kB (with 1 kB = 1056 bytes in this 
case)

People which wants to optimize memory can then still put the kernel at a 
lower location.

Did not study the size issue, fully, but I would not be surprised if you
could, by removing features, still fit u-boot within sector 1, so moving 
"kernel" to
0x84000 should be an option, enabled in those configs, which do result in
growing beyond 0x42000.


> If we don't want to change the location, and I can understand the
> reasons why, then was my first patch ok ?
>
> http://lists.denx.de/pipermail/u-boot/2012-January/114485.html
>
> I'd like to see that fixed so that I could integrate it properly in
> buildroot...
>

>>
>>>> If you want to grow U-Boot, then
>>>>
>>>> bootstrap  0x00000000        ; 16 kB
>>>> ubootenv   0x00004200        ; 16 kB    - Should be plenty
>>>> uboot      0x00008400        ;
>>>> kernel     0x00063000        ; Why waste space...
>>>>
>>> What about the redundant env ? Why shouldn't we reorder u-boot and its
>>> env ?
>> Because it adds problems without any benefits.
>> When I looked the last time, the environment is only 8 pages,
>> So you can fit a redundant environment anyway in 16 kB+}
>>
>
>


-- 
Best Regards
Ulf Samuelsson

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v4] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-02-29  9:49                       ` Ulf Samuelsson
@ 2012-04-08 18:17                         ` Alexandre Belloni
  2012-04-08 20:06                           ` Wolfgang Denk
  0 siblings, 1 reply; 20+ messages in thread
From: Alexandre Belloni @ 2012-04-08 18:17 UTC (permalink / raw)
  To: u-boot

On at91sam platforms, u-boot grew larger than the allocated size in
dataflash, the layout was:
bootstrap  0x00000000
ubootenv   0x00004200
uboot      0x00008400
kernel     0x00042000

u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
0x39C00 bytes anymore.

Now, the layout is:
bootstrap  0x00000000
ubootenv   0x00004200
uboot      0x00008400
kernel     0x00084000

Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
---
Changes for v2:
	- changed the layout as per Marek's recommendation
Changes for v3:
	- prefixed the patch title with AT91SAM9*:
Changes for v4:
	- changed the layout again as per Ulf Samuelsson's request:
	http://lists.denx.de/pipermail/u-boot/2012-February/118988.html

 include/configs/at91sam9260ek.h |    5 +++--
 include/configs/at91sam9261ek.h |    5 +++--
 include/configs/at91sam9263ek.h |    4 +++-
 include/configs/at91sam9rlek.h  |    3 ++-
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index db52ee6..49b3386 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -188,7 +188,7 @@
 #define CONFIG_ENV_OFFSET		0x4200
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0084000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -202,7 +202,7 @@
 #define CONFIG_ENV_OFFSET		0x4200
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD0084000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -231,6 +231,7 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
+#define CONFIG_AUTO_COMPLETE
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 5140b26..967a4c4 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -190,7 +190,7 @@
 #define CONFIG_ENV_OFFSET	0x4200
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0084000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -204,7 +204,7 @@
 #define CONFIG_ENV_OFFSET	0x4200
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD0084000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=atmel_nand:-(root) "		\
@@ -233,6 +233,7 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_CMDLINE_EDITING
+#define CONFIG_AUTO_COMPLETE
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 8399246..a6fe325 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -317,7 +317,7 @@
 #define CONFIG_ENV_OFFSET		0x4200
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0084000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -347,6 +347,8 @@
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+#define CONFIG_AUTO_COMPLETE
+
 
 /*
  * Size of malloc() pool
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 79ea1f2..6640b06 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -156,7 +156,7 @@
 #define CONFIG_ENV_OFFSET		0x4200
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0084000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
 				"root=/dev/mtdblock0 " \
 				"mtdparts=atmel_nand:-(root) "\
@@ -183,6 +183,7 @@
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING		1
+#define CONFIG_AUTO_COMPLETE
 
 /*
  * Size of malloc() pool
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v4] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-04-08 18:17                         ` [U-Boot] [PATCH v4] " Alexandre Belloni
@ 2012-04-08 20:06                           ` Wolfgang Denk
  2012-04-09  6:36                             ` Andreas Bießmann
  0 siblings, 1 reply; 20+ messages in thread
From: Wolfgang Denk @ 2012-04-08 20:06 UTC (permalink / raw)
  To: u-boot

Dear Alexandre Belloni,

In message <1333909023-6725-1-git-send-email-alexandre.belloni@piout.net> you wrote:
> On at91sam platforms, u-boot grew larger than the allocated size in
> dataflash, the layout was:
> bootstrap  0x00000000
> ubootenv   0x00004200
> uboot      0x00008400
> kernel     0x00042000
> 
> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
> 0x39C00 bytes anymore.
> 
> Now, the layout is:
> bootstrap  0x00000000
> ubootenv   0x00004200
> uboot      0x00008400
> kernel     0x00084000

Where are these odd sizes like

>  #define CONFIG_ENV_SIZE		0x4200

coming from?  Has a size of 0x4200 any special maning on these
systems?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Intel told us the Pentium would have "RISK" features...

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v4] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-04-08 20:06                           ` Wolfgang Denk
@ 2012-04-09  6:36                             ` Andreas Bießmann
  2012-04-09  8:15                               ` Wolfgang Denk
  0 siblings, 1 reply; 20+ messages in thread
From: Andreas Bießmann @ 2012-04-09  6:36 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang,

On 08.04.12 22:06, Wolfgang Denk wrote:
> Dear Alexandre Belloni,
> 
> In message <1333909023-6725-1-git-send-email-alexandre.belloni@piout.net> you wrote:
>> On at91sam platforms, u-boot grew larger than the allocated size in
>> dataflash, the layout was:
>> bootstrap  0x00000000
>> ubootenv   0x00004200
>> uboot      0x00008400
>> kernel     0x00042000
>>
>> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
>> 0x39C00 bytes anymore.
>>
>> Now, the layout is:
>> bootstrap  0x00000000
>> ubootenv   0x00004200
>> uboot      0x00008400
>> kernel     0x00084000
> 
> Where are these odd sizes like
> 
>>  #define CONFIG_ENV_SIZE		0x4200
> 
> coming from?  Has a size of 0x4200 any special maning on these
> systems?

please read Ulfs mail:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/123862/focus=125897

I think it is OK to apply this patch.
All these atmel boards need some more attention (lack of maintainer).
Reinhard started to migrate a lot of stuff but unfortunately this
process is not completely finished. I will not say it is left undone but
there is still a lot to do.
I think another point is that these Atmel devices became less important
than before in U-Boot (I see not really much users here even though a
lot of people use it):
 a) a lot of users favor the at91bootstrap SPL to boot linux (no need
for u-boot)
 b) they have well-hung cores

best regards

Andreas Bie?mann

PS: besides a) there was a user in irc around Christmas who count 'the
SPL for atmel devices in U-Boot' a good idea. He said he wants to play
with it ... I wonder if he does.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v4] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-04-09  6:36                             ` Andreas Bießmann
@ 2012-04-09  8:15                               ` Wolfgang Denk
  2012-04-17 23:26                                 ` Ulf Samuelsson
  0 siblings, 1 reply; 20+ messages in thread
From: Wolfgang Denk @ 2012-04-09  8:15 UTC (permalink / raw)
  To: u-boot

Dear Andreas,

In message <4F82835F.2030201@googlemail.com> you wrote:
> 
> > Where are these odd sizes like
> > 
> >>  #define CONFIG_ENV_SIZE		0x4200
> > 
> > coming from?  Has a size of 0x4200 any special maning on these
> > systems?
> 
> please read Ulfs mail:
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/123862/focus=125897

Thanks for the pointer.

> I think it is OK to apply this patch.

I did not intend to object against this patch; I just wonered about
the odd numbers,

> I think another point is that these Atmel devices became less important
> than before in U-Boot (I see not really much users here even though a
> lot of people use it):
>  a) a lot of users favor the at91bootstrap SPL to boot linux (no need
> for u-boot)

This could probably be changed if they were converted to using
U-Boot's SPL mechanism instead - but then, I also realize that there
is only very low interest for them.


>  b) they have well-hung cores

Indeed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If it ain't broke, don't fix it."                       - Bert Lantz

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v4] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-04-09  8:15                               ` Wolfgang Denk
@ 2012-04-17 23:26                                 ` Ulf Samuelsson
  2012-04-21 21:19                                   ` Alexandre Belloni
  0 siblings, 1 reply; 20+ messages in thread
From: Ulf Samuelsson @ 2012-04-17 23:26 UTC (permalink / raw)
  To: u-boot

On 2012-04-09 10:15, Wolfgang Denk wrote:
> Dear Andreas,
>
> In message<4F82835F.2030201@googlemail.com>  you wrote:
>>> Where are these odd sizes like
>>>
>>>>   #define CONFIG_ENV_SIZE		0x4200
>>> coming from?  Has a size of 0x4200 any special maning on these
>>> systems?
>> please read Ulfs mail:
>> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/123862/focus=125897
> Thanks for the pointer.
>
>> I think it is OK to apply this patch.
> I did not intend to object against this patch; I just wonered about
> the odd numbers,
>
>> I think another point is that these Atmel devices became less important
>> than before in U-Boot (I see not really much users here even though a
>> lot of people use it):
>>   a) a lot of users favor the at91bootstrap SPL to boot linux (no need
>> for u-boot)

While AT91bootstrap supports booting linux, this is real minimal support.
Everything is hard-wired so for development it really sucks.
It is really only useful for production work.
I personally never used this capability.

This functionality is pretty new in AT91boostrap,
and the Atmel (non) presence in the mailing list is an older problem.

While I no longer work for Atmel, I have a feeling that the problem is 
as follows:

Users are using the Atmel version of U-Boot, not mainstream.
If not using the Atmel version, then they maybe using a build system
like OpenEmbedded where u-boot is built as a part of the build process
and people have very little incentive in modifying that part

There is very little incentive at Atmel to upgrade because
1. Patches provided by Atmel are ignored.
2. Patches are applied to mainline which keeps breaking the AT91 support.
3. All possible fixes to boot problem are rejected (discussion with 
Haavard).
4. It is considered more important to have a "clean" implementation, 
than a working implementation.
     (Choice of NOR Flash Driver)

Atmel does not want to continuously spend effort on unbreaking other 
peoples work.

Problems are not fixed in the mainline due to problem (1).
Instead the problems are fixed in the buildsystem and it is not considered
worthwhile to submit such fixes to the mailinglist.

The action by the project to "solve" the problem by removing the boards 
from
the MAKEALL scripts and also to remove BSPs is not encouraging.

There used to be a rule that patches should not break board support, but
that rule seems to have gone down the drains.

The Atmel code is (IIRC) based on 0.3.4 so it is very old, so an update 
is really needed
but before U-Boot becomes "developer-friendly", I doubt that will happen.
If the project wants to have Atmel "on-board", then fixing problem (1) 
is key.



> This could probably be changed if they were converted to using
> U-Boot's SPL mechanism instead - but then, I also realize that there
> is only very low interest for them.
>
>

I think you are right. Atmel wants control over this part.

>>   b) they have well-hung cores

Still plenty of ARM9 users out there, but a new core would be an obvious
way forward for the 2012 model AT91 application processors.
Don't see many reasons for updating the current SAM9Gx5 family.

"http://www.mscbp.hu/Documents/Atmel Q-Touch.pdf"
seems to hint at a Cortex-A5, but this document is from 2010,
so plans may have changed.

> Indeed.
>
> Best regards,
>
> Wolfgang Denk
>
-- 
Best Regards
Ulf Samuelsson
ulf at emagii.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot] [PATCH v4] AT91SAM9*: Change kernel address in dataflash to match u-boot's size
  2012-04-17 23:26                                 ` Ulf Samuelsson
@ 2012-04-21 21:19                                   ` Alexandre Belloni
  0 siblings, 0 replies; 20+ messages in thread
From: Alexandre Belloni @ 2012-04-21 21:19 UTC (permalink / raw)
  To: u-boot

Hi,

On Wed, Apr 18, 2012 at 01:26:18AM +0200, Ulf Samuelsson wrote :
> While AT91bootstrap supports booting linux, this is real minimal support.
> Everything is hard-wired so for development it really sucks.
> It is really only useful for production work.
> I personally never used this capability.
> 
> This functionality is pretty new in AT91boostrap,
> and the Atmel (non) presence in the mailing list is an older problem.
> 
> While I no longer work for Atmel, I have a feeling that the problem
> is as follows:
> 
> Users are using the Atmel version of U-Boot, not mainstream.
> If not using the Atmel version, then they maybe using a build system
> like OpenEmbedded where u-boot is built as a part of the build process
> and people have very little incentive in modifying that part
> 
> There is very little incentive at Atmel to upgrade because
> 1. Patches provided by Atmel are ignored.
> 2. Patches are applied to mainline which keeps breaking the AT91 support.
> 3. All possible fixes to boot problem are rejected (discussion with
> Haavard).
> 4. It is considered more important to have a "clean" implementation,
> than a working implementation.
>     (Choice of NOR Flash Driver)
> 
> Atmel does not want to continuously spend effort on unbreaking other
> peoples work.
> 
> Problems are not fixed in the mainline due to problem (1).
> Instead the problems are fixed in the buildsystem and it is not considered
> worthwhile to submit such fixes to the mailinglist.
> 
> The action by the project to "solve" the problem by removing the
> boards from
> the MAKEALL scripts and also to remove BSPs is not encouraging.
> 
> There used to be a rule that patches should not break board support, but
> that rule seems to have gone down the drains.
> 
> The Atmel code is (IIRC) based on 0.3.4 so it is very old, so an
> update is really needed
> but before U-Boot becomes "developer-friendly", I doubt that will happen.
> If the project wants to have Atmel "on-board", then fixing problem
> (1) is key.
> 

Would it be possible to get a list of what is not working on mainline
but is working in ATMEL's version ? or at least some pointers.
It seems to be working well on my board. I'm really interested in
getting mainline working well.

I know there is not much interest in the AT91 boards now but I would
really like to see that issue fixed.

Regards,

-- 
Alexandre Belloni

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-04-21 21:19 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 21:37 [U-Boot] [PATCH v2] Change kernel address in dataflash to match u-boot's size Alexandre Belloni
2012-02-18 15:13 ` Albert ARIBAUD
2012-02-18 16:21   ` Albert ARIBAUD
2012-02-20 10:40     ` Alexandre Belloni
2012-02-20 10:46       ` Albert ARIBAUD
2012-02-20 12:48         ` [U-Boot] [PATCH] AT91SAM9*: " Alexandre Belloni
2012-02-20 13:00           ` Albert ARIBAUD
2012-02-20 16:40             ` [U-Boot] [PATCH v3] " Alexandre Belloni
2012-02-27 15:25               ` Ulf Samuelsson
2012-02-28 22:57                 ` Alexandre Belloni
2012-02-29  0:50                   ` Ulf Samuelsson
2012-02-29  8:58                     ` Alexandre Belloni
2012-02-29  9:49                       ` Ulf Samuelsson
2012-04-08 18:17                         ` [U-Boot] [PATCH v4] " Alexandre Belloni
2012-04-08 20:06                           ` Wolfgang Denk
2012-04-09  6:36                             ` Andreas Bießmann
2012-04-09  8:15                               ` Wolfgang Denk
2012-04-17 23:26                                 ` Ulf Samuelsson
2012-04-21 21:19                                   ` Alexandre Belloni
2012-02-20 12:51         ` [U-Boot] [PATCH v2] " Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.