diff mbox

[U-Boot,06/10,v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import

Message ID 1371715468-21120-6-git-send-email-ying.zhang@freescale.com
State Accepted
Delegated to: York Sun
Headers show

Commit Message

ying.zhang@freescale.com June 20, 2013, 8:04 a.m. UTC
From: Ying Zhang <b40530@freescale.com>

The functionality env_import will be used in the SPL. They
had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it
into the SPL.

Signed-off-by: Ying Zhang <b40530@freescale.com>
---
Compared with the original version, Changed as below:
1. Split from "boot from SD card/SPI flash with SPL".
2. Split from "spl: Make CONFIG_SPL_BUILD contain more functionality"
3. No change.
4. No change.

 common/env_common.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Comments

Wolfgang Denk June 21, 2013, 5:37 a.m. UTC | #1
Dear ying.zhang@freescale.com,

In message <1371715468-21120-6-git-send-email-ying.zhang@freescale.com> you wrote:
> From: Ying Zhang <b40530@freescale.com>
> 
> The functionality env_import will be used in the SPL. They
> had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it
> into the SPL.
> 
> Signed-off-by: Ying Zhang <b40530@freescale.com>
> ---
> Compared with the original version, Changed as below:
> 1. Split from "boot from SD card/SPI flash with SPL".
> 2. Split from "spl: Make CONFIG_SPL_BUILD contain more functionality"
> 3. No change.
> 4. No change.
> 
>  common/env_common.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)

This affects all boards, all architectures?  How well has this been
tested?

Best regards,

Wolfgang Denk
Scott Wood June 26, 2013, 4:12 p.m. UTC | #2
On 06/25/2013 09:29:37 PM, Zhang Ying-B40530 wrote:
> 
> 
> -----Original Message-----
> From: Wolfgang Denk [mailto:wd@denx.de]
> Sent: Friday, June 21, 2013 1:38 PM
> To: Zhang Ying-B40530
> Cc: u-boot@lists.denx.de; Wood Scott-B07421; afleming@gmail.com; Xie  
> Xiaobo-R63061; Zhang Ying-B40530
> Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make  
> CONFIG_SPL_BUILD contain function env_import
> 
> Dear ying.zhang@freescale.com,
> 
> In message  
> <1371715468-21120-6-git-send-email-ying.zhang@freescale.com> you  
> wrote:
> >
> > The functionality env_import will be used in the SPL. They
> > had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it
> > into the SPL.
> >
> > Signed-off-by: Ying Zhang <b40530@freescale.com>
> > ---
> > Compared with the original version, Changed as below:
> > 1. Split from "boot from SD card/SPI flash with SPL".
> > 2. Split from "spl: Make CONFIG_SPL_BUILD contain more  
> functionality"
> > 3. No change.
> > 4. No change.
> >
> >  common/env_common.c |    2 --
> >  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> This affects all boards, all architectures?  How well has this been
> tested?
> [Zhang Ying]
> May I suggest we define a new symbol CONFIG_SPL_ENV_IMPORT to contain
> the functionality "env_import"?
> So, "#ifndef CONFIG_SPL_BUILD"  will be changed to
> "#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_ENV_IMPORT)"

Can we figure out if the ifdef is really needed first?

-Scott
Tom Rini June 26, 2013, 5:34 p.m. UTC | #3
On Wed, Jun 26, 2013 at 11:12:01AM -0500, Scott Wood wrote:
> On 06/25/2013 09:29:37 PM, Zhang Ying-B40530 wrote:
> >
> >
> >-----Original Message-----
> >From: Wolfgang Denk [mailto:wd@denx.de]
> >Sent: Friday, June 21, 2013 1:38 PM
> >To: Zhang Ying-B40530
> >Cc: u-boot@lists.denx.de; Wood Scott-B07421; afleming@gmail.com;
> >Xie Xiaobo-R63061; Zhang Ying-B40530
> >Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make
> >CONFIG_SPL_BUILD contain function env_import
> >
> >Dear ying.zhang@freescale.com,
> >
> >In message
> ><1371715468-21120-6-git-send-email-ying.zhang@freescale.com> you
> >wrote:
> >>
> >> The functionality env_import will be used in the SPL. They
> >> had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it
> >> into the SPL.
> >>
> >> Signed-off-by: Ying Zhang <b40530@freescale.com>
> >> ---
> >> Compared with the original version, Changed as below:
> >> 1. Split from "boot from SD card/SPI flash with SPL".
> >> 2. Split from "spl: Make CONFIG_SPL_BUILD contain more
> >functionality"
> >> 3. No change.
> >> 4. No change.
> >>
> >>  common/env_common.c |    2 --
> >>  1 files changed, 0 insertions(+), 2 deletions(-)
> >
> >This affects all boards, all architectures?  How well has this been
> >tested?
> >[Zhang Ying]
> >May I suggest we define a new symbol CONFIG_SPL_ENV_IMPORT to contain
> >the functionality "env_import"?
> >So, "#ifndef CONFIG_SPL_BUILD"  will be changed to
> >"#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_ENV_IMPORT)"
> 
> Can we figure out if the ifdef is really needed first?

Building for am335x_evm and am335x_evm_usbspl should tell you if it is,
or is not.  Whacking network support into SPL required more than
--gc-sections alone could give us and we needed to drop a few
couldn't-ever-reach calls and functionality out.
Zhang Ying-B40530 June 27, 2013, 2:35 a.m. UTC | #4
-----Original Message-----
From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
Sent: Thursday, June 27, 2013 1:35 AM
To: Wood Scott-B07421
Cc: Zhang Ying-B40530; u-boot@lists.denx.de; afleming@gmail.com; Wood Scott-B07421
Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import

On Wed, Jun 26, 2013 at 11:12:01AM -0500, Scott Wood wrote:
> On 06/25/2013 09:29:37 PM, Zhang Ying-B40530 wrote:
> >
> >
> >-----Original Message-----
> >From: Wolfgang Denk [mailto:wd@denx.de]
> >Sent: Friday, June 21, 2013 1:38 PM
> >To: Zhang Ying-B40530
> >Cc: u-boot@lists.denx.de; Wood Scott-B07421; afleming@gmail.com;
> >Xie Xiaobo-R63061; Zhang Ying-B40530
> >Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make
> >CONFIG_SPL_BUILD contain function env_import
> >
> >Dear ying.zhang@freescale.com,
> >
> >In message
> ><1371715468-21120-6-git-send-email-ying.zhang@freescale.com> you
> >wrote:
> >>
> >> The functionality env_import will be used in the SPL. They
> >> had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it
> >> into the SPL.
> >>
> >> Signed-off-by: Ying Zhang <b40530@freescale.com>
> >> ---
> >> Compared with the original version, Changed as below:
> >> 1. Split from "boot from SD card/SPI flash with SPL".
> >> 2. Split from "spl: Make CONFIG_SPL_BUILD contain more
> >functionality"
> >> 3. No change.
> >> 4. No change.
> >>
> >>  common/env_common.c |    2 --
> >>  1 files changed, 0 insertions(+), 2 deletions(-)
> >
> >This affects all boards, all architectures?  How well has this been
> >tested?
> >[Zhang Ying]
> >May I suggest we define a new symbol CONFIG_SPL_ENV_IMPORT to contain
> >the functionality "env_import"?
> >So, "#ifndef CONFIG_SPL_BUILD"  will be changed to
> >"#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_ENV_IMPORT)"
> 
> Can we figure out if the ifdef is really needed first?

Building for am335x_evm and am335x_evm_usbspl should tell you if it is,
or is not.  Whacking network support into SPL required more than
--gc-sections alone could give us and we needed to drop a few
couldn't-ever-reach calls and functionality out.
[Zhang Ying] 
Yes, I tried to build for am335x_evm without this ifdef, no problem.
Whether it can be removed?
Tom Rini June 27, 2013, 12:17 p.m. UTC | #5
On Thu, Jun 27, 2013 at 02:35:34AM +0000, Zhang Ying-B40530 wrote:

> -----Original Message-----
> From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
[snip]
> Building for am335x_evm and am335x_evm_usbspl should tell you if it is,
> or is not.  Whacking network support into SPL required more than
> --gc-sections alone could give us and we needed to drop a few
> couldn't-ever-reach calls and functionality out.
> [Zhang Ying] 
> Yes, I tried to build for am335x_evm without this ifdef, no problem.
> Whether it can be removed?

Did you also build am335x_evm_usbspl?
Tom Rini June 27, 2013, 9:56 p.m. UTC | #6
On Thu, Jun 27, 2013 at 03:16:34PM -0500, Scott Wood wrote:
> On 06/27/2013 07:17:48 AM, Tom Rini wrote:
> >On Thu, Jun 27, 2013 at 02:35:34AM +0000, Zhang Ying-B40530 wrote:
> >
> >> -----Original Message-----
> >> From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
> >[snip]
> >> Building for am335x_evm and am335x_evm_usbspl should tell you if
> >it is,
> >> or is not.  Whacking network support into SPL required more than
> >> --gc-sections alone could give us and we needed to drop a few
> >> couldn't-ever-reach calls and functionality out.
> >> [Zhang Ying]
> >> Yes, I tried to build for am335x_evm without this ifdef, no problem.
> >> Whether it can be removed?
> >
> >Did you also build am335x_evm_usbspl?
> 
> It builds OK for me with the ifdef removed.  It adds 81 bytes to the
> SPL.

I think we can live with that.

Acked-by: Tom Rini <trini@ti.com>
Zhang Ying-B40530 July 9, 2013, 9:59 a.m. UTC | #7
Excuse me, this patch has not been merged? Thanks.

-----Original Message-----
From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
Sent: Friday, June 28, 2013 5:57 AM
To: Wood Scott-B07421
Cc: u-boot@lists.denx.de; Wood Scott-B07421; afleming@gmail.com; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import

On Thu, Jun 27, 2013 at 03:16:34PM -0500, Scott Wood wrote:
> On 06/27/2013 07:17:48 AM, Tom Rini wrote:
> >On Thu, Jun 27, 2013 at 02:35:34AM +0000, Zhang Ying-B40530 wrote:
> >
> >> -----Original Message-----
> >> From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
> >[snip]
> >> Building for am335x_evm and am335x_evm_usbspl should tell you if
> >it is,
> >> or is not.  Whacking network support into SPL required more than 
> >> --gc-sections alone could give us and we needed to drop a few 
> >> couldn't-ever-reach calls and functionality out.
> >> [Zhang Ying]
> >> Yes, I tried to build for am335x_evm without this ifdef, no problem.
> >> Whether it can be removed?
> >
> >Did you also build am335x_evm_usbspl?
> 
> It builds OK for me with the ifdef removed.  It adds 81 bytes to the 
> SPL.

I think we can live with that.

Acked-by: Tom Rini <trini@ti.com>

--
Tom
Zhang Ying-B40530 Aug. 14, 2013, 2:31 a.m. UTC | #8
Hi, Tom,
	This patch hasn't been applied? I think it should be applied early and it is needed by other patches of this set.
	Thanks.

-----Original Message-----
From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
Sent: Friday, June 28, 2013 5:57 AM
To: Wood Scott-B07421
Cc: u-boot@lists.denx.de; Wood Scott-B07421; afleming@gmail.com; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import

On Thu, Jun 27, 2013 at 03:16:34PM -0500, Scott Wood wrote:
> On 06/27/2013 07:17:48 AM, Tom Rini wrote:
> >On Thu, Jun 27, 2013 at 02:35:34AM +0000, Zhang Ying-B40530 wrote:
> >
> >> -----Original Message-----
> >> From: Tom Rini [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
> >[snip]
> >> Building for am335x_evm and am335x_evm_usbspl should tell you if
> >it is,
> >> or is not.  Whacking network support into SPL required more than 
> >> --gc-sections alone could give us and we needed to drop a few 
> >> couldn't-ever-reach calls and functionality out.
> >> [Zhang Ying]
> >> Yes, I tried to build for am335x_evm without this ifdef, no problem.
> >> Whether it can be removed?
> >
> >Did you also build am335x_evm_usbspl?
> 
> It builds OK for me with the ifdef removed.  It adds 81 bytes to the 
> SPL.

I think we can live with that.

Acked-by: Tom Rini <trini@ti.com>

--
Tom
Tom Rini Aug. 14, 2013, 1:48 p.m. UTC | #9
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/13/2013 10:31 PM, Zhang Ying-B40530 wrote:
> Hi, Tom, This patch hasn't been applied? I think it should be
> applied early and it is needed by other patches of this set. 
> Thanks.


I expect that as part of the overall series, once ready, York will
take this and include it in his pull request, which is why I've given
it my acked-by.

> 
> -----Original Message----- From: Tom Rini
> [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini Sent: Friday,
> June 28, 2013 5:57 AM To: Wood Scott-B07421 Cc:
> u-boot@lists.denx.de; Wood Scott-B07421; afleming@gmail.com; Zhang
> Ying-B40530 Subject: Re: [U-Boot] [PATCH 06/10 v5] spl:
> env_common.c: make CONFIG_SPL_BUILD contain function env_import
> 
> On Thu, Jun 27, 2013 at 03:16:34PM -0500, Scott Wood wrote:
>> On 06/27/2013 07:17:48 AM, Tom Rini wrote:
>>> On Thu, Jun 27, 2013 at 02:35:34AM +0000, Zhang Ying-B40530
>>> wrote:
>>> 
>>>> -----Original Message----- From: Tom Rini
>>>> [mailto:tom.rini@gmail.com] On Behalf Of Tom Rini
>>> [snip]
>>>> Building for am335x_evm and am335x_evm_usbspl should tell you
>>>> if
>>> it is,
>>>> or is not.  Whacking network support into SPL required more
>>>> than --gc-sections alone could give us and we needed to drop
>>>> a few couldn't-ever-reach calls and functionality out. [Zhang
>>>> Ying] Yes, I tried to build for am335x_evm without this
>>>> ifdef, no problem. Whether it can be removed?
>>> 
>>> Did you also build am335x_evm_usbspl?
>> 
>> It builds OK for me with the ifdef removed.  It adds 81 bytes to
>> the SPL.
> 
> I think we can live with that.
> 
> Acked-by: Tom Rini <trini@ti.com>
> 
> -- Tom
> 


- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSC4qaAAoJENk4IS6UOR1WekUP/1Z09OiAc2BHni42XWqAK9JB
FvfQI82mHuI1eOSXa3hRT4wGpfuXaOhjydjXDoI6MNUvN3ZjxaE2EAPdr7oZX0ws
DnRyKPOPHNyK3s/5CQWaKlCfDfxaL4a6mo4EYVsR+vMxJdcZr+wWBNNVwoWaAFU6
LDGlEwONt+m7fM6GGKRfFCfJ7iyBLks893Joitv7oAa2fOnnrto803Bpgq5IIaac
IiEVaSznHfFEhtiaDhPRoUhhuYlgHfEYwSAMNm+FoxvIdKTus4EgBoTFXrbZRmzx
Q9/SwS9FFKZrhKRj8xReB0Yn/wqWWdQFkuUknBnQENhzAXT+Qdr9J3EDYRBT1F9d
KOrjmjZPgcbIrObhmeqAXb9qL5A1Tsa3v/Ap6RErdYwGoHSHhaAetfY3PqGagc3Z
Yai9tJLqgrhuXYFqkcv9CIHhfwJC66nNZ+5bE3nAihjQW9Ny8soqTaoYQoC+MELM
/AjEk/RAYXpSMW3dO9uS20VWEMaATIJ2cqHO04zAZcdvrYdTvRWmfGOYF8APYm1K
6JytRhTNf0Uh3Yatx7qpvBbNhT/mGAV7krUMQiAcRUg7FcAEIJFPawH4OEQx9yTF
LAByOQ9BDRHErtON2gdksItJk3Sam4BwT1x1eeVq8fdzj2o/uTLIm5t63a53TdUd
OnffrvuBulEjZQJCcq1h
=tuhI
-----END PGP SIGNATURE-----
York Sun Aug. 14, 2013, 3:42 p.m. UTC | #10
On 08/14/2013 06:48 AM, Tom Rini wrote:
> On 08/13/2013 10:31 PM, Zhang Ying-B40530 wrote:
>> Hi, Tom, This patch hasn't been applied? I think it should be
>> applied early and it is needed by other patches of this set. 
>> Thanks.
> 
> 
> I expect that as part of the overall series, once ready, York will
> take this and include it in his pull request, which is why I've given
> it my acked-by.
> 
> 

Ying,

This patch fell through the crack. I didn't see it because it was marked
as "superseded". Please check your other patches. You can delegate them
to me.

York
Zhang Ying-B40530 Aug. 15, 2013, 2:25 a.m. UTC | #11
York,
	I had checked all the patch and I am sure there is only this patch almost forgotten.
	I don't know how to do. Need I send the patch again or other way?
	Thanks.
	

-----Original Message-----
From: sun york-R58495 
Sent: Wednesday, August 14, 2013 11:42 PM
To: Zhang Ying-B40530
Cc: Tom Rini; Wood Scott-B07421; u-boot@lists.denx.de; afleming@gmail.com
Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import

On 08/14/2013 06:48 AM, Tom Rini wrote:
> On 08/13/2013 10:31 PM, Zhang Ying-B40530 wrote:
>> Hi, Tom, This patch hasn't been applied? I think it should be applied 
>> early and it is needed by other patches of this set.
>> Thanks.
> 
> 
> I expect that as part of the overall series, once ready, York will 
> take this and include it in his pull request, which is why I've given 
> it my acked-by.
> 
> 

Ying,

This patch fell through the crack. I didn't see it because it was marked as "superseded". Please check your other patches. You can delegate them to me.

York
sun york-R58495 Aug. 15, 2013, 2:42 a.m. UTC | #12
On Aug 14, 2013, at 7:25 PM, Zhang Ying-B40530 wrote:

> York,
> 	I had checked all the patch and I am sure there is only this patch almost forgotten.
> 	I don't know how to do. Need I send the patch again or other way?
> 	Thanks.
> 

No need to resend. I can mark it. Just want to be sure there isn't a newer version hiding somewhere.

York
Zhang Ying-B40530 Aug. 15, 2013, 2:48 a.m. UTC | #13
Hi, York,
	I see. I am sure there isn't newer version.

-----Original Message-----
From: sun york-R58495 
Sent: Thursday, August 15, 2013 10:42 AM
To: Zhang Ying-B40530
Cc: Tom Rini; Wood Scott-B07421; u-boot@lists.denx.de; Andy Fleming; Xie Xiaobo-R63061
Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import

On Aug 14, 2013, at 7:25 PM, Zhang Ying-B40530 wrote:

> York,
> 	I had checked all the patch and I am sure there is only this patch almost forgotten.
> 	I don't know how to do. Need I send the patch again or other way?
> 	Thanks.
> 

No need to resend. I can mark it. Just want to be sure there isn't a newer version hiding somewhere.

York
York Sun Aug. 20, 2013, 5:06 p.m. UTC | #14
On 08/14/2013 07:48 PM, Zhang Ying-B40530 wrote:
> Hi, York,
> 	I see. I am sure there isn't newer version.
> 
Applied to u-boot-mpc85xx.git/master.

York
diff mbox

Patch

diff --git a/common/env_common.c b/common/env_common.c
index 906b41f..8cb81e9 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -156,7 +156,6 @@  int set_default_vars(int nvars, char * const vars[])
 				H_NOCLEAR | H_INTERACTIVE, nvars, vars);
 }
 
-#ifndef CONFIG_SPL_BUILD
 /*
  * Check if CRC is valid and (if yes) import the environment.
  * Note that "buf" may or may not be aligned.
@@ -188,7 +187,6 @@  int env_import(const char *buf, int check)
 
 	return 0;
 }
-#endif
 
 void env_relocate(void)
 {