[U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL

From: Ying Zhang b40530@freescale.com
There will need the environment in SPL for reasons other than network support (in particular, hwconfig contains info for how to set up DDR).
Add a new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT for environment in common/Makefile.
Signed-off-by: Ying Zhang b40530@freescale.com --- Compared with the previous version, add ifneq ($(CONFIG_SPL_NET_SUPPORT),y) /endif around the files specified by CONFIG_ENV_IS_IN_xxx but CONFIG_ENV_IS_NOWHERE.
README | 8 ++++++++ common/Makefile | 27 +++++++++++++++++---------- include/configs/a3m071.h | 1 + include/configs/am335x_evm.h | 1 + include/configs/pcm051.h | 1 + 5 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/README b/README index 0c4cb20..a42836c 100644 --- a/README +++ b/README @@ -2992,6 +2992,14 @@ FIT uImage format: CONFIG_SPL_LIBGENERIC_SUPPORT Support for lib/libgeneric.o in SPL binary
+ CONFIG_SPL_ENV_SUPPORT + Support for the environment operating in SPL binary + + CONFIG_SPL_NET_SUPPORT + Support for the net/libnet.o in SPL binary. + It conflicts with SPL env from storage medium specified by + CONFIG_ENV_IS_xxx but CONFIG_ENV_IS_NOWHERE + CONFIG_SPL_PAD_TO Image offset to which the SPL should be padded before appending the SPL payload. By default, this is defined as diff --git a/common/Makefile b/common/Makefile index f50bf2e..26b8495 100644 --- a/common/Makefile +++ b/common/Makefile @@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o COBJS-y += cmd_boot.o COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o COBJS-y += cmd_help.o -COBJS-y += cmd_nvedit.o COBJS-y += cmd_version.o
# environment COBJS-y += env_attr.o COBJS-y += env_callback.o -COBJS-y += env_common.o COBJS-y += env_flags.o COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o @@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o endif
ifdef CONFIG_SPL_BUILD -COBJS-y += cmd_nvedit.o -COBJS-y += env_common.o COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o +# environment +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o +ifneq ($(CONFIG_SPL_NET_SUPPORT),y) +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o +else +COBJS-y += env_nowhere.o +endif endif +# core command +COBJS-y += cmd_nvedit.o +#environment +COBJS-y += env_common.o COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o COBJS-y += console.o COBJS-y += dlmalloc.o diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h index e9af825..8f29229 100644 --- a/include/configs/a3m071.h +++ b/include/configs/a3m071.h @@ -426,6 +426,7 @@ #define CONFIG_SPL_BSS_MAX_SIZE (64 << 10)
#define CONFIG_SPL_OS_BOOT +#define CONFIG_SPL_ENV_SUPPORT /* Place patched DT blob (fdt) at this address */ #define CONFIG_SYS_SPL_ARGS_ADDR 0x01800000
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index ef00306..f47d3d1 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -325,6 +325,7 @@ #define CONFIG_SPL_GPIO_SUPPORT #define CONFIG_SPL_YMODEM_SUPPORT #define CONFIG_SPL_NET_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT #define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL" #define CONFIG_SPL_ETH_SUPPORT #define CONFIG_SPL_SPI_SUPPORT diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h index d0ea74e..926842f 100644 --- a/include/configs/pcm051.h +++ b/include/configs/pcm051.h @@ -224,6 +224,7 @@ #define CONFIG_SPL_GPIO_SUPPORT #define CONFIG_SPL_YMODEM_SUPPORT #define CONFIG_SPL_NET_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT #define CONFIG_SPL_NET_VCI_STRING "pcm051 U-Boot SPL" #define CONFIG_SPL_ETH_SUPPORT #define CONFIG_SPL_SPI_SUPPORT

On 05/16/2013 10:05:17 PM, ying.zhang@freescale.com wrote:
diff --git a/common/Makefile b/common/Makefile index f50bf2e..26b8495 100644 --- a/common/Makefile +++ b/common/Makefile @@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o COBJS-y += cmd_boot.o COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o COBJS-y += cmd_help.o -COBJS-y += cmd_nvedit.o COBJS-y += cmd_version.o
# environment COBJS-y += env_attr.o COBJS-y += env_callback.o -COBJS-y += env_common.o COBJS-y += env_flags.o COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o @@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o endif
ifdef CONFIG_SPL_BUILD -COBJS-y += cmd_nvedit.o -COBJS-y += env_common.o COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o +# environment +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o +ifneq ($(CONFIG_SPL_NET_SUPPORT),y) +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o +else +COBJS-y += env_nowhere.o +endif
Why do you include these files only if we *don't* have net support?
-Scott

________________________________________ From: Wood Scott-B07421 Sent: Friday, May 17, 2013 10:41 PM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; afleming@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
On 05/16/2013 10:05:17 PM, ying.zhang@freescale.com wrote:
diff --git a/common/Makefile b/common/Makefile index f50bf2e..26b8495 100644 --- a/common/Makefile +++ b/common/Makefile @@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o COBJS-y += cmd_boot.o COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o COBJS-y += cmd_help.o -COBJS-y += cmd_nvedit.o COBJS-y += cmd_version.o
# environment COBJS-y += env_attr.o COBJS-y += env_callback.o -COBJS-y += env_common.o COBJS-y += env_flags.o COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o @@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o endif
ifdef CONFIG_SPL_BUILD -COBJS-y += cmd_nvedit.o -COBJS-y += env_common.o COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o +# environment +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o +ifneq ($(CONFIG_SPL_NET_SUPPORT),y) +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o +else +COBJS-y += env_nowhere.o +endif
Why do you include these files only if we *don't* have net support? [Zhang Ying] This because CONFIG_SPL_NET_SUPPORT is conflict with SPL ENV. This is comments from Tom .
-Scott

On 05/17/2013 07:58:15 PM, Zhang Ying-B40530 wrote:
From: Wood Scott-B07421 Sent: Friday, May 17, 2013 10:41 PM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; afleming@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
On 05/16/2013 10:05:17 PM, ying.zhang@freescale.com wrote:
diff --git a/common/Makefile b/common/Makefile index f50bf2e..26b8495 100644 --- a/common/Makefile +++ b/common/Makefile @@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o COBJS-y += cmd_boot.o COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o COBJS-y += cmd_help.o -COBJS-y += cmd_nvedit.o COBJS-y += cmd_version.o
# environment COBJS-y += env_attr.o COBJS-y += env_callback.o -COBJS-y += env_common.o COBJS-y += env_flags.o COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o @@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o endif
ifdef CONFIG_SPL_BUILD -COBJS-y += cmd_nvedit.o -COBJS-y += env_common.o COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o +# environment +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o +ifneq ($(CONFIG_SPL_NET_SUPPORT),y) +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o +else +COBJS-y += env_nowhere.o +endif
Why do you include these files only if we *don't* have net support? [Zhang Ying] This because CONFIG_SPL_NET_SUPPORT is conflict with SPL ENV. This is comments from Tom .
I'm not that familiar with CONFIG_SPL_NET_SUPPORT, but it looks like it just enables the net/ directory in an SPL. How does that conflict with env stuff? Perhaps there's some other symbol that better describes the actual conflict.
-Scott

-----Original Message----- From: Wood Scott-B07421 Sent: Tuesday, May 21, 2013 2:56 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; afleming@gmail.com; Xie Xiaobo-R63061; Tom Rini Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
On 05/17/2013 07:58:15 PM, Zhang Ying-B40530 wrote:
From: Wood Scott-B07421
Sent: Friday, May 17, 2013 10:41 PM
To: Zhang Ying-B40530
Cc: u-boot@lists.denx.demailto:u-boot@lists.denx.de; afleming@gmail.commailto:afleming@gmail.com; Xie Xiaobo-R63061;
Zhang Ying-B40530
Subject: Re: [PATCH] common/Makefile: Add new symbol
CONFIG_SPL_ENV_SUPPORT for environment in SPL
On 05/16/2013 10:05:17 PM, ying.zhang@freescale.commailto:ying.zhang@freescale.com wrote:
diff --git a/common/Makefile b/common/Makefile
index f50bf2e..26b8495 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o
COBJS-y += cmd_boot.o
COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o
COBJS-y += cmd_help.o
-COBJS-y += cmd_nvedit.o
COBJS-y += cmd_version.o
# environment
COBJS-y += env_attr.o
COBJS-y += env_callback.o
-COBJS-y += env_common.o
COBJS-y += env_flags.o
COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
@@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o
endif
ifdef CONFIG_SPL_BUILD
-COBJS-y += cmd_nvedit.o
-COBJS-y += env_common.o
COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o
COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
+# environment
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
+ifneq ($(CONFIG_SPL_NET_SUPPORT),y)
+COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
+COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
+COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
+COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
+COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
+else
+COBJS-y += env_nowhere.o
+endif
Why do you include these files only if we *don't* have net support?
[Zhang Ying]
This because CONFIG_SPL_NET_SUPPORT is conflict with SPL ENV. This
is comments from Tom .
I'm not that familiar with CONFIG_SPL_NET_SUPPORT, but it looks like it
just enables the net/ directory in an SPL. How does that conflict with
env stuff? Perhaps there's some other symbol that better describes the
actual conflict.
[Zhang Ying] This is Tom's words: a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section. CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_... section is in the non-SPL-only area. Now, your end-goal is to have env from, I assume, NAND, also exist on SPL? I guess for now, lets go ahead and duplicate a few lines of ENV_IS.. inside the SPL area and when you add NAND env, add ifneq ($(CONFIG_SPL_NET_SUPPORT),y)...endif around it and add to the README that CONFIG_SPL_NET_SUPPORT conflicts with SPL env from nand.
My understanding is that there are two kinds of methods:
1. In Tom's opinion: add CONFIG_ENV_IS_IN_... inside the SPL area and add ifneq ($(CONFIG_SPL_NET_SUPPORT),y)...endif around it.
2. Add new SPL env symbol(for example: CONFIG_SPL_ENV_IS_IN_MMC) for the SPL. This need to add excessive symbol for SPL env.

On 05/20/2013 09:43:53 PM, Zhang Ying-B40530 wrote:
-----Original Message----- From: Wood Scott-B07421 Sent: Tuesday, May 21, 2013 2:56 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; afleming@gmail.com; Xie Xiaobo-R63061; Tom Rini Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
I'm not that familiar with CONFIG_SPL_NET_SUPPORT, but it looks like it
just enables the net/ directory in an SPL. How does that conflict with
env stuff? Perhaps there's some other symbol that better describes the
actual conflict.
[Zhang Ying]
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build case.
-Scott

-----Original Message----- From: Wood Scott-B07421 Sent: Wednesday, May 22, 2013 3:15 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; afleming@gmail.com; Xie Xiaobo-R63061; tom.rini@gmail.com Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
On 05/20/2013 09:43:53 PM, Zhang Ying-B40530 wrote:
-----Original Message----- From: Wood Scott-B07421 Sent: Tuesday, May 21, 2013 2:56 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; afleming@gmail.com; Xie Xiaobo-R63061; Tom Rini Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
I'm not that familiar with CONFIG_SPL_NET_SUPPORT, but it looks like it
just enables the net/ directory in an SPL. How does that conflict with
env stuff? Perhaps there's some other symbol that better describes the
actual conflict.
[Zhang Ying]
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build case. [Zhang Ying] So far I haven't seen it. What should I do?

(sorry for jumping in so late in this discussion)
On 05/21/2013 09:14 PM, Scott Wood wrote:
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build case.
But the a3m071 SPL U-Boot version also uses the env from NOR flash. So defining CONFIG_ENV_IS_NOWHERE here would be really confusing!
Thanks, Stefan

-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: Wednesday, May 22, 2013 2:09 PM To: Wood Scott-B07421 Cc: Zhang Ying-B40530; Wood Scott-B07421; Xie@theia.denx.de; u-boot@lists.denx.de; afleming@gmail.com Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
(sorry for jumping in so late in this discussion)
On 05/21/2013 09:14 PM, Scott Wood wrote:
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build case.
But the a3m071 SPL U-Boot version also uses the env from NOR flash. So defining CONFIG_ENV_IS_NOWHERE here would be really confusing! [Zhang Ying] I think Scott means that the specific boards CONFIG_SPL_NET_SUPPORT is set should define CONFIG_ENV_IS_NOWHERE in the SPL build case. For example: am335x and pcm051.

On Wed, May 22, 2013 at 08:06:01AM +0000, Zhang Ying-B40530 wrote:
-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: Wednesday, May 22, 2013 2:09 PM To: Wood Scott-B07421 Cc: Zhang Ying-B40530; Wood Scott-B07421; Xie@theia.denx.de; u-boot@lists.denx.de; afleming@gmail.com Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
(sorry for jumping in so late in this discussion)
On 05/21/2013 09:14 PM, Scott Wood wrote:
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build case.
But the a3m071 SPL U-Boot version also uses the env from NOR flash. So defining CONFIG_ENV_IS_NOWHERE here would be really confusing! [Zhang Ying] I think Scott means that the specific boards CONFIG_SPL_NET_SUPPORT is set should define CONFIG_ENV_IS_NOWHERE in the SPL build case. For example: am335x and pcm051.
Correct. I need to see if I can reproduce the problem I had with Joel's patch however.

-----Original Message----- From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini Sent: Thursday, May 23, 2013 5:23 AM To: Zhang Ying-B40530 Cc: Stefan Roese; Wood Scott-B07421; Xie@theia.denx.de; afleming@gmail.com; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
On Wed, May 22, 2013 at 08:06:01AM +0000, Zhang Ying-B40530 wrote:
-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: Wednesday, May 22, 2013 2:09 PM To: Wood Scott-B07421 Cc: Zhang Ying-B40530; Wood Scott-B07421; Xie@theia.denx.de; u-boot@lists.denx.de; afleming@gmail.com Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
(sorry for jumping in so late in this discussion)
On 05/21/2013 09:14 PM, Scott Wood wrote:
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build case.
But the a3m071 SPL U-Boot version also uses the env from NOR flash. So defining CONFIG_ENV_IS_NOWHERE here would be really confusing! [Zhang Ying] I think Scott means that the specific boards CONFIG_SPL_NET_SUPPORT is set should define CONFIG_ENV_IS_NOWHERE in the SPL build case. For example: am335x and pcm051.
Correct. I need to see if I can reproduce the problem I had with Joel's patch however. [Zhang Ying] So, Can you accept this patch now? I hope to finish it early, have spent a long time.

On 05/22/2013 01:09:07 AM, Stefan Roese wrote:
(sorry for jumping in so late in this discussion)
On 05/21/2013 09:14 PM, Scott Wood wrote:
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o
and
duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets
merged,
we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL
build
case.
But the a3m071 SPL U-Boot version also uses the env from NOR flash. So defining CONFIG_ENV_IS_NOWHERE here would be really confusing!
Why is it including env_nowhere.o then?
When you say "the a3m071 SPL U-Boot version", do you mean the SPL itself, or the entire configuration that happens to include an SPL?
-Scott

-----Original Message----- From: Wood Scott-B07421 Sent: Wednesday, May 22, 2013 11:45 PM To: Stefan Roese Cc: Zhang Ying-B40530; Wood Scott-B07421; Xie@theia.denx.de; u-boot@lists.denx.de; afleming@gmail.com Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
On 05/22/2013 01:09:07 AM, Stefan Roese wrote:
(sorry for jumping in so late in this discussion)
On 05/21/2013 09:14 PM, Scott Wood wrote:
This is Tom's words:
a3m071 relies on SPL always building cmd_nvedit.o and env_common.o
and
duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section.
CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_...
section is in the non-SPL-only area.
If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets
merged,
we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL
build
case.
But the a3m071 SPL U-Boot version also uses the env from NOR flash. So defining CONFIG_ENV_IS_NOWHERE here would be really confusing!
Why is it including env_nowhere.o then?
When you say "the a3m071 SPL U-Boot version", do you mean the SPL itself, or the entire configuration that happens to include an SPL? [Zhang Ying] The a3m071 SPL has not included env_nowhere.o, it only included env_flash.o and CONFIG_ENV_IS_IN_FLASH is set. The am335x and pcm051 SPL included env_nowhere.o and CONFIG_ENV_IS_NOWHERE is set. Meanwhile CONFIG_SPL_NET_SUPPORT is set.
What this meant is CONFIG_SPL_NET_SUPPORT only co-exist with CONFIG_ENV_IS_NOWHERE in the SPL.
participants (5)
-
Scott Wood
-
Stefan Roese
-
Tom Rini
-
ying.zhang@freescale.com
-
Zhang Ying-B40530