Skip to contentSkip to conversation

common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

PATCH New ying.zhang at freescale.com 3 participants 5 messages May 13, 2013 – May 15, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

From: Ying Zhang <[email protected]>

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 in common/Makefile.

---
 README                       |    3 +++
 common/Makefile              |   16 ++++++----------
 include/configs/am335x_evm.h |    1 +
 include/configs/pcm051.h     |    1 +
 4 files changed, 11 insertions(+), 10 deletions(-)
README +3 -0
index d8a1198..f38f375 100644
@@ -2984,6 +2984,9 @@ 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_PAD_TO
 		Image offset to which the SPL should be padded before appending
 		the SPL payload. By default, this is defined as
common/Makefile +6 -10
index 0e0fff1..1adae03 100644
@@ -44,7 +44,6 @@ 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
@@ -67,7 +66,6 @@ COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
 COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
 COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
 COBJS-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
-COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 
 # command
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
@@ -214,18 +212,16 @@ 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
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_common.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
 endif
+COBJS-y += cmd_nvedit.o
+COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
 COBJS-y += console.o
 COBJS-y += dlmalloc.o
include/configs/am335x_evm.h +1 -0
index ef00306..f47d3d1 100644
@@ -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
include/configs/pcm051.h +1 -0
index d0ea74e..926842f 100644
@@ -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
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH v2 1/1 common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

Quoted 7 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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 in common/Makefile.

[snip]

Quoted 33 lines
common/Makefile +0 -10
@@ -44,7 +44,6 @@ 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
@@ -67,7 +66,6 @@ COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
 COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
 COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
 COBJS-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
-COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 
 # command
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
@@ -214,18 +212,16 @@ 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

common/Makefile COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o · line 227

Quoted 10 lines
common/Makefile +6 -0
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_common.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
 endif
+COBJS-y += cmd_nvedit.o
+COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
 COBJS-y += console.o
 COBJS-y += dlmalloc.o

Just move the whole CONFIG_ENV_IS_IN.. section down to where we always build objects, and update the comments in the Makefile in both spots.

And a3m071 needs to be updated for CONFIG_SPL_ENV_SUPPORT too. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130513/b501be87/attachment.pgp>
#2 lore raw

PATCH v2 1/1 common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Tom Rini
Sent: Tuesday, May 14, 2013 6:13 AM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; Wood Scott-B07421; Xie Xiaobo-R63061; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH v2] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

Quoted 7 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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 in common/Makefile.

[snip]

Quoted 33 lines
common/Makefile +0 -10
@@ -44,7 +44,6 @@ 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
@@ -67,7 +66,6 @@ COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
 COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
 COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
 COBJS-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
-COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 
 # command
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
@@ -214,18 +212,16 @@ 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

common/Makefile COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o · line 227

Quoted 10 lines
common/Makefile +6 -0
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_common.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
 endif
+COBJS-y += cmd_nvedit.o
+COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
 COBJS-y += console.o
 COBJS-y += dlmalloc.o

Just move the whole CONFIG_ENV_IS_IN.. section down to where we always build objects, and update the comments in the Makefile in both spots. [Zhang Ying]
For common lines(for example: cmd_nvedit.o) that shared by the SPL and non-SPL, can we move it to public area? So, we can avoid excessive SPL symbols.

And a3m071 needs to be updated for CONFIG_SPL_ENV_SUPPORT too. Thanks! [Zhang Ying]
In include/configs/a3m071.h, there was no CONFIG_SPL_NET_SUPPORT to be defined. Are you sure to add CONFIG_SPL_ENV_SUPPORT for it?

#3 lore raw

PATCH v2 1/1 common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

Quoted 58 lines · On Tue, May 14, 2013 at 03:52:04AM +0000, Zhang Ying-B40530 wrote:

-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Tom Rini
Sent: Tuesday, May 14, 2013 6:13 AM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; Wood Scott-B07421; Xie Xiaobo-R63061; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH v2] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

Quoted 7 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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 in common/Makefile.

[snip]

Quoted 41 lines
common/Makefile +6 -10
@@ -44,7 +44,6 @@ 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
@@ -67,7 +66,6 @@ COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
 COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
 COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o
 COBJS-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o
-COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 
 # command
 COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
@@ -214,18 +212,16 @@ 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
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_common.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
 endif
+COBJS-y += cmd_nvedit.o
+COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
Quoted 8 lines

common/Makefile COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o · line 227

Quoted 2 lines
common/Makefile +0 -0
 COBJS-y += console.o
 COBJS-y += dlmalloc.o

Just move the whole CONFIG_ENV_IS_IN.. section down to where we always build objects, and update the comments in the Makefile in both spots. [Zhang Ying]
For common lines(for example: cmd_nvedit.o) that shared by the SPL and non-SPL, can we move it to public area? So, we can avoid excessive SPL symbols.

Right. Re-order things so we're duplicating as little as possible. There's already a bit of needless duplication going on here.

Quoted 4 lines

And a3m071 needs to be updated for CONFIG_SPL_ENV_SUPPORT too. Thanks! [Zhang Ying]
In include/configs/a3m071.h, there was no CONFIG_SPL_NET_SUPPORT to be defined.
Are you sure to add CONFIG_SPL_ENV_SUPPORT for it?

Yes, it uses the environment as part of CONFIG_SPL_OS support rather than CONFIG_SPL_NET_SUPPORT.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130514/c648ae43/attachment.pgp>
#4 lore raw

PATCH v2 1/1 common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT

Quoted 22 lines
Quoted 22 lines

endif

ifdef CONFIG_SPL_BUILD

common/Makefile +6 -8
-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
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_common.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
+COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
 endif
+COBJS-y += cmd_nvedit.o
+COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
Quoted 8 lines
Quoted 2 lines

COBJS-y += console.o
COBJS-y += dlmalloc.o

Just move the whole CONFIG_ENV_IS_IN.. section down to where we always build objects, and update the comments in the Makefile in both spots. [Zhang Ying]
For common lines(for example: cmd_nvedit.o) that shared by the SPL and non-SPL, can we move it to public area? So, we can avoid excessive SPL symbols.

Right. Re-order things so we're duplicating as little as possible. There's already a bit of needless duplication going on here.
[Zhang Ying]
Ok, we had moved CONFIG_ENV_IS_IN.. section to public area in another patch just submitted :"move the common makefile line out of the CONFIG_SPL_BUILD ifdef". Please review.