[U-Boot] [PATCH] TQM85xx: enable partition support, sort commands

Signed-off-by: Wolfgang Denk wd@denx.de --- include/configs/TQM85xx.h | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h index 1fbf4bf..d62576e 100644 --- a/include/configs/TQM85xx.h +++ b/include/configs/TQM85xx.h @@ -562,7 +562,6 @@ * Use NAND-FLash as JFFS2 device */ #define CONFIG_CMD_NAND -#define CONFIG_CMD_JFFS2
#define CONFIG_JFFS2_NAND 1
@@ -584,17 +583,19 @@ */ #include <config_cmd_default.h>
-#define CONFIG_CMD_PING -#define CONFIG_CMD_I2C -#define CONFIG_CMD_DHCP -#define CONFIG_CMD_NFS -#define CONFIG_CMD_SNTP #ifndef CONFIG_TQM8548_AG #define CONFIG_CMD_DATE #endif -#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_DHCP #define CONFIG_CMD_DTT +#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_I2C +#define CONFIG_CMD_JFFS2 #define CONFIG_CMD_MII +#define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_NFS +#define CONFIG_CMD_PING +#define CONFIG_CMD_SNTP
#if defined(CONFIG_PCI) #define CONFIG_CMD_PCI @@ -602,6 +603,9 @@
#undef CONFIG_WATCHDOG /* watchdog disabled */
+#define CONFIG_MAC_PARTITION +#define CONFIG_DOS_PARTITION + /* * Miscellaneous configurable options */

On Sep 2, 2009, at 3:20 AM, Wolfgang Denk wrote:
Signed-off-by: Wolfgang Denk wd@denx.de
include/configs/TQM85xx.h | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-)
applied to 85xx.
- k

On Sep 2, 2009, at 3:20 AM, Wolfgang Denk wrote:
Signed-off-by: Wolfgang Denk wd@denx.de
include/configs/TQM85xx.h | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-)
This breaks building of TQM85xx boards for me.
- k

Dear Kumar Gala,
In message 971EA703-E556-477A-AE04-147CA724BEA8@kernel.crashing.org you wrote:
On Sep 2, 2009, at 3:20 AM, Wolfgang Denk wrote:
Signed-off-by: Wolfgang Denk wd@denx.de
include/configs/TQM85xx.h | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-)
This breaks building of TQM85xx boards for me.
Confirmed, will post a new patch version.
Best regards,
Wolfgang Denk

Signed-off-by: Wolfgang Denk wd@denx.de
--- v2: Fix building for TQM8548_BE
On TQM8548_BE, building failed like that: Configuring for TQM85xx board... common/libcommon.a(cmd_mtdparts.o): In function `part_validate_eraseblock': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:316: undefined reference to `get_mtd_device_nm' common/libcommon.a(cmd_mtdparts.o): In function `mtd_device_validate': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:706: undefined reference to `get_mtd_device_nm' make: *** [u-boot] Error 1
This was because CONFIG_CMD_MTDPARTS was defined after it was used. Move the part that uses it after the #define.
include/configs/TQM85xx.h | 48 ++++++++++++++++++++++++-------------------- 1 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h index 1fbf4bf..9548950 100644 --- a/include/configs/TQM85xx.h +++ b/include/configs/TQM85xx.h @@ -557,12 +557,34 @@ #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME
+/* + * Command line configuration. + */ +#include <config_cmd_default.h> + +#ifndef CONFIG_TQM8548_AG +#define CONFIG_CMD_DATE +#endif +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_DTT +#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_I2C +#define CONFIG_CMD_JFFS2 +#define CONFIG_CMD_MII +#define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_NFS +#define CONFIG_CMD_PING +#define CONFIG_CMD_SNTP + +#if defined(CONFIG_PCI) +#define CONFIG_CMD_PCI +#endif + #ifdef CONFIG_NAND /* * Use NAND-FLash as JFFS2 device */ #define CONFIG_CMD_NAND -#define CONFIG_CMD_JFFS2
#define CONFIG_JFFS2_NAND 1
@@ -579,29 +601,11 @@
#endif /* CONFIG_NAND */
-/* - * Command line configuration. - */ -#include <config_cmd_default.h> - -#define CONFIG_CMD_PING -#define CONFIG_CMD_I2C -#define CONFIG_CMD_DHCP -#define CONFIG_CMD_NFS -#define CONFIG_CMD_SNTP -#ifndef CONFIG_TQM8548_AG -#define CONFIG_CMD_DATE -#endif -#define CONFIG_CMD_EEPROM -#define CONFIG_CMD_DTT -#define CONFIG_CMD_MII - -#if defined(CONFIG_PCI) -#define CONFIG_CMD_PCI -#endif - #undef CONFIG_WATCHDOG /* watchdog disabled */
+#define CONFIG_MAC_PARTITION +#define CONFIG_DOS_PARTITION + /* * Miscellaneous configurable options */

Signed-off-by: Wolfgang Denk wd@denx.de
--- v2: Fix building for TQM8548_BE
On TQM8548_BE, building failed like that: Configuring for TQM85xx board... common/libcommon.a(cmd_mtdparts.o): In function `part_validate_eraseblock': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:316: undefined reference to `get_mtd_device_nm' common/libcommon.a(cmd_mtdparts.o): In function `mtd_device_validate': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:706: undefined reference to `get_mtd_device_nm' make: *** [u-boot] Error 1
This was because CONFIG_CMD_MTDPARTS was defined after it was used. Move the part that uses it after the #define. v3: Fix "undefined reference to `get_mtd_device_nm'" errors for non-8548 boards; build-tested with ELDK 4.2 on TQM8540, TQM8541, TQM8548, TQM8548_AG, TQM8548_BE, TQM8555 and TQM8560
include/configs/TQM85xx.h | 51 ++++++++++++++++++++++++-------------------- 1 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h index 1fbf4bf..8f7fe0e 100644 --- a/include/configs/TQM85xx.h +++ b/include/configs/TQM85xx.h @@ -557,17 +557,40 @@ #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME
+/* + * Command line configuration. + */ +#include <config_cmd_default.h> + +#ifndef CONFIG_TQM8548_AG +#define CONFIG_CMD_DATE +#endif +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_DTT +#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_I2C +#define CONFIG_CMD_JFFS2 +#define CONFIG_CMD_MII +#define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_NFS +#define CONFIG_CMD_PING +#define CONFIG_CMD_SNTP + +#if defined(CONFIG_PCI) +#define CONFIG_CMD_PCI +#endif + +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ + #ifdef CONFIG_NAND /* * Use NAND-FLash as JFFS2 device */ #define CONFIG_CMD_NAND -#define CONFIG_CMD_JFFS2
#define CONFIG_JFFS2_NAND 1
#ifdef CONFIG_CMD_MTDPARTS -#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define CONFIG_FLASH_CFI_MTD #define MTDIDS_DEFAULT "nand0=TQM85xx-nand" #define MTDPARTS_DEFAULT "mtdparts=TQM85xx-nand:-" @@ -579,29 +602,11 @@
#endif /* CONFIG_NAND */
-/* - * Command line configuration. - */ -#include <config_cmd_default.h> - -#define CONFIG_CMD_PING -#define CONFIG_CMD_I2C -#define CONFIG_CMD_DHCP -#define CONFIG_CMD_NFS -#define CONFIG_CMD_SNTP -#ifndef CONFIG_TQM8548_AG -#define CONFIG_CMD_DATE -#endif -#define CONFIG_CMD_EEPROM -#define CONFIG_CMD_DTT -#define CONFIG_CMD_MII - -#if defined(CONFIG_PCI) -#define CONFIG_CMD_PCI -#endif - #undef CONFIG_WATCHDOG /* watchdog disabled */
+#define CONFIG_MAC_PARTITION +#define CONFIG_DOS_PARTITION + /* * Miscellaneous configurable options */

On Sep 8, 2009, at 3:29 PM, Wolfgang Denk wrote:
Signed-off-by: Wolfgang Denk wd@denx.de
v2: Fix building for TQM8548_BE
On TQM8548_BE, building failed like that: Configuring for TQM85xx board... common/libcommon.a(cmd_mtdparts.o): In function `part_validate_eraseblock': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:316: undefined reference to `get_mtd_device_nm' common/libcommon.a(cmd_mtdparts.o): In function `mtd_device_validate': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:706: undefined reference to `get_mtd_device_nm' make: *** [u-boot] Error 1
This was because CONFIG_CMD_MTDPARTS was defined after it was used. Move the part that uses it after the #define. v3: Fix "undefined reference to `get_mtd_device_nm'" errors for non-8548 boards; build-tested with ELDK 4.2 on TQM8540, TQM8541, TQM8548, TQM8548_AG, TQM8548_BE, TQM8555 and TQM8560
include/configs/TQM85xx.h | 51 +++++++++++++++++++++++ +-------------------- 1 files changed, 28 insertions(+), 23 deletions(-)
Did this build ok w/o any warnings on TQM8540?
I'm seeing:
[galak@komodo u-boot-85xx]$ ./MAKEALL TQM8540 ... TQM8540 (MPC8540) Configuring for TQM85xx board... /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .text lma 0xfffc0000 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .rodata lma 0xffff13a4 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .reloc lma 0xffffc400 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data lma 0xffffdc30 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data.rel.ro.local lma 0xffffe964 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data.rel lma 0xffffe9e4 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data.rel.local lma 0xfffff380 overlaps previous sections text data bss dec hex filename 247104 16992 35304 299400 49188 ./u-boot
Which effective says to me we've run out of space in the image.
- k

Dear Kumar Gala,
In message 83723583-5E4B-4A14-BF3A-2CDD4478EEE0@kernel.crashing.org you wrote:
Did this build ok w/o any warnings on TQM8540?
No, I'm getting the section overlaps warnings.
I'm seeing:
...
Which effective says to me we've run out of space in the image.
I see this, too.
It's a problem that exists independent of this patch, you get the same errors before. The problems are caused by your commit ec79d33 ("85xx: Move to a common linker script").
I reported this problem before, but it seems you missed that, see: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65788/focus=67568
I hoped you would fix this problem (or we can revert commit ec79d33?)
Best regards,
Wolfgang Denk

On Sep 10, 2009, at 2:56 AM, Wolfgang Denk wrote:
Dear Kumar Gala,
In message <83723583-5E4B-4A14- BF3A-2CDD4478EEE0@kernel.crashing.org> you wrote:
Did this build ok w/o any warnings on TQM8540?
No, I'm getting the section overlaps warnings.
I'm seeing:
...
Which effective says to me we've run out of space in the image.
I see this, too.
It's a problem that exists independent of this patch, you get the same errors before. The problems are caused by your commit ec79d33 ("85xx: Move to a common linker script").
I reported this problem before, but it seems you missed that, see: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65788/focus=67568
I hoped you would fix this problem (or we can revert commit ec79d33?)
Ok. I think we are see two issues interact.
I've just sent a pull request w/the RESET_VECTOR_ADDRESS fix that should address the linker script issue. These seems to build cleanly on all 85xx platforms w/ELDK4.2 for me.
Now if you apply the TQM85xx.h on top of that you will see that the enabling of new features causes the size to increase beyond what is allocated for TQM8540.
- k

Dear Kumar Gala,
In message D09E46D6-37C0-44E4-A7E9-4042BCF63B37@kernel.crashing.org you wrote:
It's a problem that exists independent of this patch, you get the same errors before. The problems are caused by your commit ec79d33 ("85xx: Move to a common linker script").
I reported this problem before, but it seems you missed that, see: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65788/focus=67568
I hoped you would fix this problem (or we can revert commit ec79d33?)
Ok. I think we are see two issues interact.
I've just sent a pull request w/the RESET_VECTOR_ADDRESS fix that should address the linker script issue. These seems to build cleanly on all 85xx platforms w/ELDK4.2 for me.
Now if you apply the TQM85xx.h on top of that you will see that the enabling of new features causes the size to increase beyond what is allocated for TQM8540.
Maybe. But this is just another manifestation of the original problem: without commit ec79d33 we didn't need the RESET_VECTOR_ADDRESS stuff at all, and an image size of 256 kB was sufficient without and with the "TQM85xx: enable partition suppor" patch applied.
Now, after commit ec79d33 (which needed to be fixed by the RESET_VECTOR_ADDRESS stuff in the first place), we suddenly need more than 256 kB.
This obviously means that commit ec79d33 introduced changes to the image layout that make it bigger.
I consider this a bug in commit ec79d33. I don't want to waste more space than needed.
Best regards,
Wolfgang Denk

On Sep 10, 2009, at 6:55 AM, Wolfgang Denk wrote:
Dear Kumar Gala,
In message <D09E46D6-37C0-44E4- A7E9-4042BCF63B37@kernel.crashing.org> you wrote:
It's a problem that exists independent of this patch, you get the same errors before. The problems are caused by your commit ec79d33 ("85xx: Move to a common linker script").
I reported this problem before, but it seems you missed that, see: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65788/focus=67568
I hoped you would fix this problem (or we can revert commit ec79d33?)
Ok. I think we are see two issues interact.
I've just sent a pull request w/the RESET_VECTOR_ADDRESS fix that should address the linker script issue. These seems to build cleanly on all 85xx platforms w/ELDK4.2 for me.
Now if you apply the TQM85xx.h on top of that you will see that the enabling of new features causes the size to increase beyond what is allocated for TQM8540.
Maybe. But this is just another manifestation of the original problem: without commit ec79d33 we didn't need the RESET_VECTOR_ADDRESS stuff at all, and an image size of 256 kB was sufficient without and with the "TQM85xx: enable partition suppor" patch applied.
Now, after commit ec79d33 (which needed to be fixed by the RESET_VECTOR_ADDRESS stuff in the first place), we suddenly need more than 256 kB.
This obviously means that commit ec79d33 introduced changes to the image layout that make it bigger.
I consider this a bug in commit ec79d33. I don't want to waste more space than needed.
I don't agree. If I revert both commits and apply the TQM config.h update I see build failures.
I've posted a 'tqm-test' branch of the mpc85xx tree that does just that. I see the following:
[galak@komodo u-boot-85xx]$ ./MAKEALL TQM8540 ... TQM8540 (MPC8540) Configuring for TQM85xx board... /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: section .bootpg [fffff000 -> fffff1df] overlaps section .data.rel.local [ffffe964 -> fffff6a7] /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .bootpg lma 0xfffff000 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data.rel.ro.local lma 0xfffff6a8 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data.rel lma 0xfffff728 overlaps previous sections make: *** [u-boot] Error 1 /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-size: './u-boot': No such file
- k

Ok. I think we are see two issues interact.
I've just sent a pull request w/the RESET_VECTOR_ADDRESS fix that should address the linker script issue. These seems to build cleanly on all 85xx platforms w/ELDK4.2 for me.
Now if you apply the TQM85xx.h on top of that you will see that the enabling of new features causes the size to increase beyond what is allocated for TQM8540.
Maybe. But this is just another manifestation of the original problem: without commit ec79d33 we didn't need the RESET_VECTOR_ADDRESS stuff at all, and an image size of 256 kB was sufficient without and with the "TQM85xx: enable partition suppor" patch applied.
Now, after commit ec79d33 (which needed to be fixed by the RESET_VECTOR_ADDRESS stuff in the first place), we suddenly need more than 256 kB.
This obviously means that commit ec79d33 introduced changes to the image layout that make it bigger.
I consider this a bug in commit ec79d33. I don't want to waste more space than needed.
I don't agree. If I revert both commits and apply the TQM config.h update I see build failures.
I've posted a 'tqm-test' branch of the mpc85xx tree that does just that. I see the following:
[galak@komodo u-boot-85xx]$ ./MAKEALL TQM8540 ... TQM8540 (MPC8540) Configuring for TQM85xx board... /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: section .bootpg [fffff000 -> fffff1df] overlaps section .data.rel.local [ffffe964 -> fffff6a7] /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .bootpg lma 0xfffff000 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data.rel.ro.local lma 0xfffff6a8 overlaps previous sections /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-ld: u-boot: section .data.rel lma 0xfffff728 overlaps previous sections make: *** [u-boot] Error 1 /opt/eldk/4.2/ppc-linux-x86/usr/bin/ppc_85xxDP-size: './u-boot': No such file
Wolfgang,
Any update on this?
- k

Dear Kumar Gala,
In message B1390CAD-0173-4103-9F31-A169A20AADA5@kernel.crashing.org you wrote:
Any update on this?
Not yet, got other, more pressing work to do. Sorry. Will look into this ASAP.
Best regards,
Wolfgang Denk

On Sep 8, 2009, at 3:29 PM, Wolfgang Denk wrote:
Signed-off-by: Wolfgang Denk wd@denx.de
v2: Fix building for TQM8548_BE
On TQM8548_BE, building failed like that: Configuring for TQM85xx board... common/libcommon.a(cmd_mtdparts.o): In function `part_validate_eraseblock': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:316: undefined reference to `get_mtd_device_nm' common/libcommon.a(cmd_mtdparts.o): In function `mtd_device_validate': /home/wd/git/u-boot/work/common/cmd_mtdparts.c:706: undefined reference to `get_mtd_device_nm' make: *** [u-boot] Error 1
This was because CONFIG_CMD_MTDPARTS was defined after it was used. Move the part that uses it after the #define. v3: Fix "undefined reference to `get_mtd_device_nm'" errors for non-8548 boards; build-tested with ELDK 4.2 on TQM8540, TQM8541, TQM8548, TQM8548_AG, TQM8548_BE, TQM8555 and TQM8560
include/configs/TQM85xx.h | 51 +++++++++++++++++++++++ +-------------------- 1 files changed, 28 insertions(+), 23 deletions(-)
We never resolved this.
- k

Dear Kumar Gala,
In message 0F1CBA0C-D4AB-42C4-8288-7580DE91D275@kernel.crashing.org you wrote:
We never resolved this.
Right. Still on my list. Sorry - I hope I can find a little time this week.
Best regards,
Wolfgang Denk
participants (2)
-
Kumar Gala
-
Wolfgang Denk