All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270
@ 2010-08-26 10:47 Mikhail Kshevetskiy
  2010-08-26 10:47 ` [U-Boot] [PATCH 02/11] arm/pxa: fix board/vpac270/vpac270.c compilation if usb support is disabled Mikhail Kshevetskiy
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:47 UTC (permalink / raw)
  To: u-boot

This file is not used, automatically generated u-boot.lds is used instead

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 board/vpac270/u-boot.lds |   55 ----------------------------------------------
 1 files changed, 0 insertions(+), 55 deletions(-)
 delete mode 100644 board/vpac270/u-boot.lds

diff --git a/board/vpac270/u-boot.lds b/board/vpac270/u-boot.lds
deleted file mode 100644
index 58c371d..0000000
--- a/board/vpac270/u-boot.lds
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-	. = 0x00000000;
-
-	. = ALIGN(4);
-	.text      :
-	{
-	  cpu/pxa/start.o	(.text)
-	  *(.text)
-	}
-
-	. = ALIGN(4);
-	.rodata : { *(.rodata) }
-
-	. = ALIGN(4);
-	.data : { *(.data) }
-
-	. = ALIGN(4);
-	.got : { *(.got) }
-
-	__u_boot_cmd_start = .;
-	.u_boot_cmd : { *(.u_boot_cmd) }
-	__u_boot_cmd_end = .;
-
-	. = ALIGN(4);
-	__bss_start = .;
-	.bss : { *(.bss) }
-	_end = .;
-}
-- 
1.7.1

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

* [U-Boot] [PATCH 02/11] arm/pxa: fix board/vpac270/vpac270.c compilation if usb support is disabled
  2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
@ 2010-08-26 10:47 ` Mikhail Kshevetskiy
  2010-08-26 10:47 ` [U-Boot] [PATCH 03/11] arm/pxa: enable stuart/btuart for vpac270 Mikhail Kshevetskiy
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:47 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 board/vpac270/vpac270.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/board/vpac270/vpac270.c b/board/vpac270/vpac270.c
index 18e47e2..2f29cf4 100644
--- a/board/vpac270/vpac270.c
+++ b/board/vpac270/vpac270.c
@@ -73,6 +73,7 @@ int dram_init (void)
 	return 0;
 }
 
+#ifdef CONFIG_CMD_USB
 int usb_board_init(void)
 {
 	UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
@@ -119,6 +120,7 @@ void usb_board_stop(void)
 
 	return;
 }
+#endif
 
 #ifdef CONFIG_DRIVER_DM9000
 int board_eth_init(bd_t *bis)
-- 
1.7.1

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

* [U-Boot] [PATCH 03/11] arm/pxa: enable stuart/btuart for vpac270
  2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
  2010-08-26 10:47 ` [U-Boot] [PATCH 02/11] arm/pxa: fix board/vpac270/vpac270.c compilation if usb support is disabled Mikhail Kshevetskiy
@ 2010-08-26 10:47 ` Mikhail Kshevetskiy
  2010-08-26 10:47 ` [U-Boot] [PATCH 04/11] arm/pxa: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000 Mikhail Kshevetskiy
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:47 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 include/configs/vpac270.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
index d3e22d9..e31b08a 100644
--- a/include/configs/vpac270.h
+++ b/include/configs/vpac270.h
@@ -62,7 +62,10 @@
  * Serial Console Configuration
  */
 #define	CONFIG_PXA_SERIAL
+#define	CONFIG_SERIAL_MULTI
 #define	CONFIG_FFUART			1
+#define	CONFIG_STUART			1
+#define	CONFIG_BTUART			1
 #define	CONFIG_BAUDRATE			115200
 #define	CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
 
-- 
1.7.1

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

* [U-Boot] [PATCH 04/11] arm/pxa: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000
  2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
  2010-08-26 10:47 ` [U-Boot] [PATCH 02/11] arm/pxa: fix board/vpac270/vpac270.c compilation if usb support is disabled Mikhail Kshevetskiy
  2010-08-26 10:47 ` [U-Boot] [PATCH 03/11] arm/pxa: enable stuart/btuart for vpac270 Mikhail Kshevetskiy
@ 2010-08-26 10:47 ` Mikhail Kshevetskiy
  2010-08-26 10:48 ` [U-Boot] [PATCH 05/11] arm/pxa: fix environment location/length for vpac270 and related bugs Mikhail Kshevetskiy
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:47 UTC (permalink / raw)
  To: u-boot

* CONFIG_SYS_CLKS_IN_HZ is not used anywhere, so removing it
* CONFIG_SYS_HZ is set to 1000 on most architectures, so it
  seems to be the safe default

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 include/configs/vpac270.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
index e31b08a..4c162bd 100644
--- a/include/configs/vpac270.h
+++ b/include/configs/vpac270.h
@@ -151,8 +151,7 @@
 /*
  * Clock Configuration
  */
-#undef	CONFIG_SYS_CLKS_IN_HZ
-#define	CONFIG_SYS_HZ			3250000		/* Timer @ 3250000 Hz */
+#define	CONFIG_SYS_HZ			1000		/* Timer @ 3250000 Hz */
 #define CONFIG_SYS_CPUSPEED		0x190		/* standard setting for 312MHz; L=16, N=1.5, A=0, SDCLK!=SystemBus */
 
 /*
-- 
1.7.1

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

* [U-Boot] [PATCH 05/11] arm/pxa: fix environment location/length for vpac270 and related bugs.
  2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
                   ` (2 preceding siblings ...)
  2010-08-26 10:47 ` [U-Boot] [PATCH 04/11] arm/pxa: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000 Mikhail Kshevetskiy
@ 2010-08-26 10:48 ` Mikhail Kshevetskiy
  2010-08-26 11:41   ` Marek Vasut
  2010-08-26 10:48 ` [U-Boot] [PATCH 06/11] arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config Mikhail Kshevetskiy
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:48 UTC (permalink / raw)
  To: u-boot

Define MONITOR_BASE on the base of used flash type. Define ENV_ADDR as
MONITOR_BASE + MONITOR_LEN. Fix environment sector size (NOR: 32Kb for
first four sectors and 128Kb for other; OneNAND: 128Kb).

Last but not least: we have MONITOR_LEN = 0x40000, one sector for environment
and one sector for its redundancy copy (2 * 0x20000 = 256Kb). So the kernel
may start from 0x00080000 only.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 include/configs/vpac270.h |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
index 4c162bd..d3e805a 100644
--- a/include/configs/vpac270.h
+++ b/include/configs/vpac270.h
@@ -49,7 +49,7 @@
 	"if usb reset && fatload usb 0 0xa4000000 uImage; then "	\
 		"bootm 0xa4000000; "					\
 	"fi; "								\
-	"bootm 0x40000;"
+	"bootm 0x00080000;"
 #define	CONFIG_BOOTARGS			"console=tty0 console=ttyS0,115200"
 #define	CONFIG_TIMESTAMP
 #define	CONFIG_BOOTDELAY		2	/* Autoboot delay */
@@ -188,6 +188,7 @@
 #if	defined(CONFIG_CMD_FLASH)	/* NOR */
 #define	PHYS_FLASH_1			0x00000000	/* Flash Bank #1 */
 #define	PHYS_FLASH_2			0x02000000	/* Flash Bank #2 */
+#define	CONFIG_SYS_MONITOR_BASE		PHYS_FLASH_1
 
 #define	CONFIG_SYS_FLASH_CFI
 #define	CONFIG_FLASH_CFI_DRIVER		1
@@ -207,18 +208,19 @@
 #elif	defined(CONFIG_CMD_ONENAND)	/* OneNAND */
 #define	CONFIG_SYS_NO_FLASH
 #define	CONFIG_SYS_ONENAND_BASE		0x00000000
+#define	CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_ONENAND_BASE
 #define	CONFIG_ENV_IS_IN_ONENAND	1
 
 #else	/* No flash */
 #define	CONFIG_SYS_NO_FLASH
 #define	CONFIG_SYS_ENV_IS_NOWHERE
+#define	CONFIG_SYS_MONITOR_BASE		0x000000
 #endif
 
-#define	CONFIG_SYS_MONITOR_BASE		0x000000
 #define	CONFIG_SYS_MONITOR_LEN		0x40000
 
-#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_LEN)
-#define CONFIG_ENV_SECT_SIZE	0x40000
+#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
+#define CONFIG_ENV_SECT_SIZE	0x20000
 #define CONFIG_ENV_ADDR_REDUND	(CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
 #define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SIZE)
 
-- 
1.7.1

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

* [U-Boot] [PATCH 06/11] arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config
  2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
                   ` (3 preceding siblings ...)
  2010-08-26 10:48 ` [U-Boot] [PATCH 05/11] arm/pxa: fix environment location/length for vpac270 and related bugs Mikhail Kshevetskiy
@ 2010-08-26 10:48 ` Mikhail Kshevetskiy
  2010-08-26 11:43   ` Marek Vasut
  2010-08-26 10:48 ` [U-Boot] [PATCH 07/11] arm/pxa: decrease environment size and stack size for vpac270 Mikhail Kshevetskiy
  2010-08-26 10:48 ` [U-Boot] [PATCH 08/11] arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) Mikhail Kshevetskiy
  6 siblings, 1 reply; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:48 UTC (permalink / raw)
  To: u-boot

it is not required and not recommended.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 include/configs/vpac270.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
index d3e805a..c8663e8 100644
--- a/include/configs/vpac270.h
+++ b/include/configs/vpac270.h
@@ -40,8 +40,6 @@
 #define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)
 #define	CONFIG_SYS_GBL_DATA_SIZE	128
 
-#define	CONFIG_ENV_OVERWRITE		/* override default environment */
-
 #define	CONFIG_BOOTCOMMAND						\
 	"if mmc init && fatload mmc 0 0xa4000000 uImage; then "		\
 		"bootm 0xa4000000; "					\
-- 
1.7.1

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

* [U-Boot] [PATCH 07/11] arm/pxa: decrease environment size and stack size for vpac270
  2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
                   ` (4 preceding siblings ...)
  2010-08-26 10:48 ` [U-Boot] [PATCH 06/11] arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config Mikhail Kshevetskiy
@ 2010-08-26 10:48 ` Mikhail Kshevetskiy
  2010-08-26 11:45   ` Marek Vasut
  2010-08-26 10:48 ` [U-Boot] [PATCH 08/11] arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) Mikhail Kshevetskiy
  6 siblings, 1 reply; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:48 UTC (permalink / raw)
  To: u-boot

it looks like 4Kb for environment and 64Kb for stack is sufficient

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 include/configs/vpac270.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
index c8663e8..98faf9a 100644
--- a/include/configs/vpac270.h
+++ b/include/configs/vpac270.h
@@ -36,7 +36,7 @@
 /*
  * Environment settings
  */
-#define	CONFIG_ENV_SIZE			0x4000
+#define	CONFIG_ENV_SIZE			(4 * 1024)
 #define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)
 #define	CONFIG_SYS_GBL_DATA_SIZE	128
 
@@ -157,7 +157,7 @@
  *
  * The stack sizes are set up in start.S using the settings below
  */
-#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack */
+#define	CONFIG_STACKSIZE		(64*1024)	/* regular stack */
 #ifdef	CONFIG_USE_IRQ
 #define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */
 #define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */
-- 
1.7.1

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

* [U-Boot] [PATCH 08/11] arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment)
  2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
                   ` (5 preceding siblings ...)
  2010-08-26 10:48 ` [U-Boot] [PATCH 07/11] arm/pxa: decrease environment size and stack size for vpac270 Mikhail Kshevetskiy
@ 2010-08-26 10:48 ` Mikhail Kshevetskiy
  2010-08-26 11:48   ` Marek Vasut
  6 siblings, 1 reply; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2010-08-26 10:48 UTC (permalink / raw)
  To: u-boot

it looks like u-boot allocates a buffer of CONFIG_ENV_SECT_SIZE
size when making "saveenv" command. In our case CONFIG_ENV_SECT_SIZE
is 128Kb, so having CONFIG_SYS_MALLOC_LEN = (128Kb + space for
environment) is not sufficient.

Increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) to
resolve a problem.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
---
 include/configs/vpac270.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
index 98faf9a..ddb3e0e 100644
--- a/include/configs/vpac270.h
+++ b/include/configs/vpac270.h
@@ -37,7 +37,7 @@
  * Environment settings
  */
 #define	CONFIG_ENV_SIZE			(4 * 1024)
-#define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)
+#define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 196*1024)
 #define	CONFIG_SYS_GBL_DATA_SIZE	128
 
 #define	CONFIG_BOOTCOMMAND						\
-- 
1.7.1

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

* [U-Boot] [PATCH 05/11] arm/pxa: fix environment location/length for vpac270 and related bugs.
  2010-08-26 10:48 ` [U-Boot] [PATCH 05/11] arm/pxa: fix environment location/length for vpac270 and related bugs Mikhail Kshevetskiy
@ 2010-08-26 11:41   ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2010-08-26 11:41 UTC (permalink / raw)
  To: u-boot

Dne ?t 26. srpna 2010 12:48:00 Mikhail Kshevetskiy napsal(a):
> Define MONITOR_BASE on the base of used flash type. Define ENV_ADDR as
> MONITOR_BASE + MONITOR_LEN. Fix environment sector size (NOR: 32Kb for
> first four sectors and 128Kb for other; OneNAND: 128Kb).
> 
> Last but not least: we have MONITOR_LEN = 0x40000, one sector for
> environment and one sector for its redundancy copy (2 * 0x20000 = 256Kb).
> So the kernel may start from 0x00080000 only.
> 
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
> ---
>  include/configs/vpac270.h |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
> index 4c162bd..d3e805a 100644
> --- a/include/configs/vpac270.h
> +++ b/include/configs/vpac270.h
> @@ -49,7 +49,7 @@
>  	"if usb reset && fatload usb 0 0xa4000000 uImage; then "	\
>  		"bootm 0xa4000000; "					\
>  	"fi; "								\
> -	"bootm 0x40000;"
> +	"bootm 0x00080000;"

Good catch, but let's make it 0x60000 as spare env isn't used.

>  #define	CONFIG_BOOTARGS			"console=tty0 
console=ttyS0,115200"
>  #define	CONFIG_TIMESTAMP
>  #define	CONFIG_BOOTDELAY		2	/* Autoboot delay */
> @@ -188,6 +188,7 @@
>  #if	defined(CONFIG_CMD_FLASH)	/* NOR */
>  #define	PHYS_FLASH_1			0x00000000	/* Flash Bank #1 
*/
>  #define	PHYS_FLASH_2			0x02000000	/* Flash Bank #2 
*/
> +#define	CONFIG_SYS_MONITOR_BASE		PHYS_FLASH_1

This is always 0 ... that's why it's defined in common place.
> 
>  #define	CONFIG_SYS_FLASH_CFI
>  #define	CONFIG_FLASH_CFI_DRIVER		1
> @@ -207,18 +208,19 @@
>  #elif	defined(CONFIG_CMD_ONENAND)	/* OneNAND */
>  #define	CONFIG_SYS_NO_FLASH
>  #define	CONFIG_SYS_ONENAND_BASE		0x00000000
> +#define	CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_ONENAND_BASE
>  #define	CONFIG_ENV_IS_IN_ONENAND	1
> 
>  #else	/* No flash */
>  #define	CONFIG_SYS_NO_FLASH
>  #define	CONFIG_SYS_ENV_IS_NOWHERE
> +#define	CONFIG_SYS_MONITOR_BASE		0x000000
>  #endif
> 
> -#define	CONFIG_SYS_MONITOR_BASE		0x000000
>  #define	CONFIG_SYS_MONITOR_LEN		0x40000
> 
> -#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_LEN)
> -#define CONFIG_ENV_SECT_SIZE	0x40000
> +#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE +
> CONFIG_SYS_MONITOR_LEN) +#define CONFIG_ENV_SECT_SIZE	0x20000
>  #define CONFIG_ENV_ADDR_REDUND	(CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
>  #define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SIZE)

Please rebase the patch on top of for-wd-master.

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

* [U-Boot] [PATCH 06/11] arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config
  2010-08-26 10:48 ` [U-Boot] [PATCH 06/11] arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config Mikhail Kshevetskiy
@ 2010-08-26 11:43   ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2010-08-26 11:43 UTC (permalink / raw)
  To: u-boot

Dne ?t 26. srpna 2010 12:48:01 Mikhail Kshevetskiy napsal(a):
> it is not required and not recommended.

If CONFIG_ENV_OVERWRITE is #defined in your config
file, the write protection for vendor parameters is
completely disabled. Anybody can change or delete
these parameters.

I think that's ok. Anyone can remove it before deploying the real product.

> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
> ---
>  include/configs/vpac270.h |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
> index d3e805a..c8663e8 100644
> --- a/include/configs/vpac270.h
> +++ b/include/configs/vpac270.h
> @@ -40,8 +40,6 @@
>  #define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)
>  #define	CONFIG_SYS_GBL_DATA_SIZE	128
> 
> -#define	CONFIG_ENV_OVERWRITE		/* override default environment 
*/
> -
>  #define	CONFIG_BOOTCOMMAND						
\
>  	"if mmc init && fatload mmc 0 0xa4000000 uImage; then "		\
>  		"bootm 0xa4000000; "					\

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

* [U-Boot] [PATCH 07/11] arm/pxa: decrease environment size and stack size for vpac270
  2010-08-26 10:48 ` [U-Boot] [PATCH 07/11] arm/pxa: decrease environment size and stack size for vpac270 Mikhail Kshevetskiy
@ 2010-08-26 11:45   ` Marek Vasut
  2010-09-18 20:11     ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2010-08-26 11:45 UTC (permalink / raw)
  To: u-boot

Dne ?t 26. srpna 2010 12:48:02 Mikhail Kshevetskiy napsal(a):
> it looks like 4Kb for environment and 64Kb for stack is sufficient

Wolfgang, what's your opinion?

Thanks
> 
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
> ---
>  include/configs/vpac270.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
> index c8663e8..98faf9a 100644
> --- a/include/configs/vpac270.h
> +++ b/include/configs/vpac270.h
> @@ -36,7 +36,7 @@
>  /*
>   * Environment settings
>   */
> -#define	CONFIG_ENV_SIZE			0x4000
> +#define	CONFIG_ENV_SIZE			(4 * 1024)
>  #define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)
>  #define	CONFIG_SYS_GBL_DATA_SIZE	128
> 
> @@ -157,7 +157,7 @@
>   *
>   * The stack sizes are set up in start.S using the settings below
>   */
> -#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack 
*/
> +#define	CONFIG_STACKSIZE		(64*1024)	/* regular stack 
*/
>  #ifdef	CONFIG_USE_IRQ
>  #define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */
>  #define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */

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

* [U-Boot] [PATCH 08/11] arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment)
  2010-08-26 10:48 ` [U-Boot] [PATCH 08/11] arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) Mikhail Kshevetskiy
@ 2010-08-26 11:48   ` Marek Vasut
  2010-09-18 20:14     ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2010-08-26 11:48 UTC (permalink / raw)
  To: u-boot

Dne ?t 26. srpna 2010 12:48:03 Mikhail Kshevetskiy napsal(a):
> it looks like u-boot allocates a buffer of CONFIG_ENV_SECT_SIZE
> size when making "saveenv" command. In our case CONFIG_ENV_SECT_SIZE
> is 128Kb, so having CONFIG_SYS_MALLOC_LEN = (128Kb + space for
> environment) is not sufficient.
> 
> Increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) to
> resolve a problem.

You probably hit this because you changed the ENV size. Wolfgang, can you please 
comment on this one too?

Thanks
> 
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
> ---
>  include/configs/vpac270.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
> index 98faf9a..ddb3e0e 100644
> --- a/include/configs/vpac270.h
> +++ b/include/configs/vpac270.h
> @@ -37,7 +37,7 @@
>   * Environment settings
>   */
>  #define	CONFIG_ENV_SIZE			(4 * 1024)
> -#define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)
> +#define	CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 196*1024)
>  #define	CONFIG_SYS_GBL_DATA_SIZE	128
> 
>  #define	CONFIG_BOOTCOMMAND						
\

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

* [U-Boot] [PATCH 07/11] arm/pxa: decrease environment size and stack size for vpac270
  2010-08-26 11:45   ` Marek Vasut
@ 2010-09-18 20:11     ` Wolfgang Denk
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2010-09-18 20:11 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <201008261345.41408.marek.vasut@gmail.com> you wrote:
> Dne Ct 26. srpna 2010 12:48:02 Mikhail Kshevetskiy napsal(a):
> > it looks like 4Kb for environment and 64Kb for stack is sufficient
>
> Wolfgang, what's your opinion?

I don't think this makes sense on a real-life system, but then, I
don't know neither the hardware nor it's use cases.  If the board
maintainer claims that this is OK for all known use cases...

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
Perfection is reached, not when there is no longer anything  to  add,
but when there is no longer anything to take away.
                                           - Antoine de Saint-Exupery

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

* [U-Boot] [PATCH 08/11] arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment)
  2010-08-26 11:48   ` Marek Vasut
@ 2010-09-18 20:14     ` Wolfgang Denk
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2010-09-18 20:14 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <201008261348.08623.marek.vasut@gmail.com> you wrote:
> Dne Ct 26. srpna 2010 12:48:03 Mikhail Kshevetskiy napsal(a):
> > it looks like u-boot allocates a buffer of CONFIG_ENV_SECT_SIZE
> > size when making "saveenv" command. In our case CONFIG_ENV_SECT_SIZE
> > is 128Kb, so having CONFIG_SYS_MALLOC_LEN = (128Kb + space for
> > environment) is not sufficient.
> > 
> > Increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) to
> > resolve a problem.
>
> You probably hit this because you changed the ENV size. Wolfgang, can you p> lease 
> comment on this one too?

The space needed for malloc() depends on many things. Most systems
have sufficient RAM these days, so it makes little sense to be stingy
here.

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
Old programmers never die, they just branch to a new address.

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

end of thread, other threads:[~2010-09-18 20:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-26 10:47 [U-Boot] [PATCH 01/11] arm/pxa: remove unused u-boot.lds from board/vpac270 Mikhail Kshevetskiy
2010-08-26 10:47 ` [U-Boot] [PATCH 02/11] arm/pxa: fix board/vpac270/vpac270.c compilation if usb support is disabled Mikhail Kshevetskiy
2010-08-26 10:47 ` [U-Boot] [PATCH 03/11] arm/pxa: enable stuart/btuart for vpac270 Mikhail Kshevetskiy
2010-08-26 10:47 ` [U-Boot] [PATCH 04/11] arm/pxa: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000 Mikhail Kshevetskiy
2010-08-26 10:48 ` [U-Boot] [PATCH 05/11] arm/pxa: fix environment location/length for vpac270 and related bugs Mikhail Kshevetskiy
2010-08-26 11:41   ` Marek Vasut
2010-08-26 10:48 ` [U-Boot] [PATCH 06/11] arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config Mikhail Kshevetskiy
2010-08-26 11:43   ` Marek Vasut
2010-08-26 10:48 ` [U-Boot] [PATCH 07/11] arm/pxa: decrease environment size and stack size for vpac270 Mikhail Kshevetskiy
2010-08-26 11:45   ` Marek Vasut
2010-09-18 20:11     ` Wolfgang Denk
2010-08-26 10:48 ` [U-Boot] [PATCH 08/11] arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) Mikhail Kshevetskiy
2010-08-26 11:48   ` Marek Vasut
2010-09-18 20:14     ` Wolfgang Denk

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.