Skip to contentSkip to conversation

spl: Make CONFIG_SPL_BUILD contain more functionality

PATCH New ying.zhang at freescale.com 4 participants 11 messages May 17, 2013 – May 24, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete the line ifndef CONFIG_SPL_BUILD in common/env_common.c

 arch/powerpc/cpu/mpc85xx/tlb.c |    2 +-
 arch/powerpc/cpu/mpc8xxx/law.c |    4 ++--
 common/env_common.c            |    2 --
 include/configs/MPC8313ERDB.h  |    2 +-
 include/configs/P1022DS.h      |    4 +++-
 include/configs/p1_p2_rdb_pc.h |    4 +++-
 6 files changed, 10 insertions(+), 8 deletions(-)
arch/powerpc/cpu/mpc85xx/tlb.c +1 -1
index 0dff37f..a44a89c 100644
@@ -55,7 +55,7 @@ void init_tlbs(void)
 	return ;
 }
 
-#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_NAND_MINIMAL)
 void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn,
 		       phys_addr_t *rpn)
 {
arch/powerpc/cpu/mpc8xxx/law.c +2 -2
index 6f9d568..0df62b6 100644
@@ -92,7 +92,7 @@ void disable_law(u8 idx)
 	return;
 }
 
-#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_NAND_MINIMAL)
 static int get_law_entry(u8 i, struct law_entry *e)
 {
 	u32 lawar;
@@ -122,7 +122,7 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 	return idx;
 }
 
-#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_NAND_MINIMAL)
 int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 {
 	u32 idx;
common/env_common.c +0 -2
index 906b41f..8cb81e9 100644
@@ -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)
 {
include/configs/MPC8313ERDB.h +1 -1
index c28dfe0..7ad76c8 100644
@@ -40,13 +40,13 @@
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 #define CONFIG_SPL_MPC83XX_WAIT_FOR_NAND
 
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_NS16550_MIN_FUNCTIONS
+#define CONFIG_SPL_NAND_MINIMAL
 #endif
 
 #define CONFIG_SYS_TEXT_BASE	0x00100000 /* CONFIG_SYS_NAND_U_BOOT_DST */
include/configs/P1022DS.h +3 -1
index 8b13b10..12e5e88 100644
@@ -41,7 +41,6 @@
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET              "u-boot-with-spl.bin"
 
@@ -55,6 +54,9 @@
 #define CONFIG_SYS_NAND_U_BOOT_START   0x00200000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS    0
 #define CONFIG_SYS_LDSCRIPT            "arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_SPL_NAND_MINIMAL
+#endif
 #endif
 
 /* High Level Configuration Options */
include/configs/p1_p2_rdb_pc.h +3 -1
index 7ed634b..59fb9d2 100644
@@ -159,7 +159,6 @@
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
 
@@ -187,6 +186,9 @@
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	((512 << 10) - 0x2000)
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0
 #define CONFIG_SYS_LDSCRIPT		"arch/powerpc/cpu/mpc85xx/u-boot-nand.lds"
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_SPL_NAND_MINIMAL
+#endif
 #endif
 
 #ifndef CONFIG_SYS_TEXT_BASE
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 10 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete the line ifndef CONFIG_SPL_BUILD in common/env_common.c

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD. Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.

Can you please post the everything as a series, including adding the board(s) that need environment in SPL?

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/20130517/dc390111/attachment.pgp>
#2 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 12:34 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; Wood Scott-B07421; afleming at gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 10 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete the line ifndef CONFIG_SPL_BUILD in common/env_common.c

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD.
Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.
[Zhang Ying]
First? Your understanding is correct. CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for SD SPL but not for NAND SPL.

Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL for mpc85xx can't large than 4K, Now only a few bytes of free space.

Can you please post the everything as a series, including adding the board(s) that need environment in SPL?
[Zhang Ying]
The patch is split into several in order to facilitate everyone to review.

--
Tom

#3 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 35 lines · On Fri, May 17, 2013 at 02:10:49PM +0000, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 12:34 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; Wood Scott-B07421; afleming at gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 10 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete the line ifndef CONFIG_SPL_BUILD in common/env_common.c

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD.
Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.
[Zhang Ying]
First?$B!$ Your understanding is correct. CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for SD SPL but not for NAND SPL.

Quoted 8 lines

Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL for mpc85xx can't large than 4K, Now only a few bytes of free space.

Can you please post the everything as a series, including adding the board(s) that need environment in SPL?
[Zhang Ying]
The patch is split into several in order to facilitate everyone to review.

Right. So please post a 5 or 10 or whatever part series that shows us the end goal as well as each step it takes to go from today to that platform working. 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/20130517/5d89d456/attachment.pgp>
#4 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 2:20 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; afleming at gmail.com; Xie at theia.denx.de; Wood Scott-B07421
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 35 lines · On Fri, May 17, 2013 at 02:10:49PM +0000, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 12:34 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; Wood Scott-B07421; afleming at gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 10 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete the line ifndef CONFIG_SPL_BUILD in common/env_common.c

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD.
Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.
[Zhang Ying]
First, Your understanding is correct. CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for SD SPL but not for NAND SPL.

Quoted 8 lines

Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL for mpc85xx can't large than 4K, Now only a few bytes of free space.

Can you please post the everything as a series, including adding the board(s) that need environment in SPL?
[Zhang Ying]
The patch is split into several in order to facilitate everyone to review.

Right. So please post a 5 or 10 or whatever part series that shows us the end goal as well as each step it takes to go from today to that platform working. Thanks!
[Zhang Ying]
So for this patch, are there any problem?

--
Tom

#5 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 54 lines · On Fri, May 17, 2013 at 02:26:04PM +0000, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 2:20 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; afleming at gmail.com; Xie at theia.denx.de; Wood Scott-B07421
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 35 lines · On Fri, May 17, 2013 at 02:10:49PM +0000, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 12:34 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; Wood Scott-B07421; afleming at gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 10 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete the line ifndef CONFIG_SPL_BUILD in common/env_common.c

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD.
Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.
[Zhang Ying]
First, Your understanding is correct. CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for SD SPL but not for NAND SPL.

Quoted 8 lines

Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL for mpc85xx can't large than 4K, Now only a few bytes of free space.

Can you please post the everything as a series, including adding the board(s) that need environment in SPL?
[Zhang Ying]
The patch is split into several in order to facilitate everyone to review.

Quoted 6 lines

Right. So please post a 5 or 10 or whatever part series that shows us the end goal as well as each step it takes to go from today to that platform working. Thanks!
[Zhang Ying]
So for this patch, are there any problem?

Yes. It doesn't seem to do anything. Which is why I want to see the series of patches that result in new functionality on some boards, so we can evaluate the changes in context.

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/20130517/a51c0ba3/attachment.pgp>
#6 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 2:54 PM
To: Zhang Ying-B40530
Cc: Xie at theia.denx.de; u-boot at lists.denx.de; afleming at gmail.com; Wood at theia.denx.de; Wood Scott-B07421
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 54 lines · On Fri, May 17, 2013 at 02:26:04PM +0000, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 2:20 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; afleming at gmail.com; Xie at theia.denx.de; Wood Scott-B07421
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 35 lines · On Fri, May 17, 2013 at 02:10:49PM +0000, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 12:34 PM
To: Zhang Ying-B40530
Cc: u-boot at lists.denx.de; Wood Scott-B07421; afleming at gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 10 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete the line ifndef CONFIG_SPL_BUILD in common/env_common.c

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD.
Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.
[Zhang Ying]
First, Your understanding is correct. CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for SD SPL but not for NAND SPL.

Quoted 8 lines

Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL for mpc85xx can't large than 4K, Now only a few bytes of free space.

Can you please post the everything as a series, including adding the board(s) that need environment in SPL?
[Zhang Ying]
The patch is split into several in order to facilitate everyone to review.

Quoted 6 lines

Right. So please post a 5 or 10 or whatever part series that shows us the end goal as well as each step it takes to go from today to that platform working. Thanks!
[Zhang Ying]
So for this patch, are there any problem?

Yes. It doesn't seem to do anything. Which is why I want to see the series of patches that result in new functionality on some boards, so we can evaluate the changes in context.
[Zhang Ying]
It seems to be several patches were sent together.

#7 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 16 lines · On 05/17/2013 10:04:12 AM, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 2:54 PM
To: Zhang Ying-B40530
Cc: Xie at theia.denx.de; u-boot at lists.denx.de; afleming at gmail.com; Wood at theia.denx.de; Wood Scott-B07421
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 3 lines · On Fri, May 17, 2013 at 02:26:04PM +0000, Zhang Ying-B40530 wrote:

[Zhang Ying]
So for this patch, are there any problem?

Quoted 6 lines

Yes. It doesn't seem to do anything. Which is why I want to see the series of patches that result in new functionality on some boards, so we
can evaluate the changes in context.
[Zhang Ying]
It seems to be several patches were sent together.

No, they weren't. They were sent separately. Use git format-patch to generate all the patches at once, so they're numbered, and use git send-email to send them all at once, so they're threaded properly.

-Scott

#8 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

Oh, I understand. Thanks.
________________________________________
From: Wood Scott-B07421
Sent: Friday, May 17, 2013 4:39 PM
To: Zhang Ying-B40530
Cc: Tom Rini; u-boot at lists.denx.de; afleming at gmail.com; Wood Scott-B07421; Xie Xiaobo-R63061
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 16 lines · On 05/17/2013 10:04:12 AM, Zhang Ying-B40530 wrote:

________________________________________
From: Tom Rini [tom.rini at gmail.com] on behalf of Tom Rini [trini at ti.com]
Sent: Friday, May 17, 2013 2:54 PM
To: Zhang Ying-B40530
Cc: Xie at theia.denx.de; u-boot at lists.denx.de; afleming at gmail.com; Wood at theia.denx.de; Wood Scott-B07421
Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 3 lines · On Fri, May 17, 2013 at 02:26:04PM +0000, Zhang Ying-B40530 wrote:

[Zhang Ying]
So for this patch, are there any problem?

Quoted 6 lines

Yes. It doesn't seem to do anything. Which is why I want to see the series of patches that result in new functionality on some boards, so we
can evaluate the changes in context.
[Zhang Ying]
It seems to be several patches were sent together.

No, they weren't. They were sent separately. Use git format-patch to generate all the patches at once, so they're numbered, and use git send-email to send them all at once, so they're threaded properly.

-Scott

#9 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

In reply to Tom Rini
Quoted 15 lines · Tom Rini
Quoted 9 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and delete

the line

Quoted 1 line

ifndef CONFIG_SPL_BUILD in common/env_common.c

Quoted 8 lines

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop
defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD. Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.

gc-sections does not work on anonymous strings. It also doesn't work to avoid code that doesn't compile due to some missing dependency (e.g. missing #define). I don't know off the top of my head if this code falls into one of these categories (I don't even know what code we're talking about from the context here, without digging back for the original patch).

I'm not sure why being a static function matters.

-Scott

#10 lore raw

PATCH v2 1/1 spl: Make CONFIG_SPL_BUILD contain more functionality

Quoted 25 lines · Scott Wood
Quoted 15 lines · Tom Rini
Quoted 9 lines · ying.zhang at freescale.com

From: Ying Zhang <[email protected]>

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

---
Compared with the previous version, give up new symbol and

delete the line

Quoted 1 line

ifndef CONFIG_SPL_BUILD in common/env_common.c

Quoted 8 lines

What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop
defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD. Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function.

Quoted 8 lines

gc-sections does not work on anonymous strings. It also doesn't work to avoid code that doesn't compile due to some missing dependency (e.g. missing #define). I don't know off the top of my head if this code falls into one of these categories (I don't even know what code we're talking about from the context here, without digging back for the original patch).

I'm not sure why being a static function matters.

Yes, there's a gcc bug (afaict) about strings, and #define-related fail to builds don't work, just unreferenced functions. You do sometimes need/want to whack #ifndef's around static functions for when you have to not define function A because of one of the above fails to be collected, and then you end up with an unused function warning.

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/20130524/8e66bc23/attachment.pgp>