[U-Boot] MIPS: build status (2010.01)

Hi,
here's a build summary of the latest git with GCC 4.4.1:
$ ./MAKEALL mips mips_el
--------------------- SUMMARY ---------------------------- Boards compiled: 23 Boards with warnings or errors: 11 ( qemu_mips vct_platinum_onenand vct_platinum_onenand_small vct_platinumavc_onenand vct_platinumavc_onenand_small vct_premium_onenand vct_premium_onenand_small dbau1000 dbau1100 dbau1500 gth2 ) ----------------------------------------------------------
Build warnings / errors could be categorized into five groups:
1) zlib.c: missing <asm/unaligned.h> build error 2) lib_mips/board.c: undefined reference to `getenv_IPaddr' build error 3) env_onenand.c: CONFIG_ENV_{ADDR,SIZE}_FLEX undeclared build error 4) cmd_ide.c: dbuf strict-aliasing warning 5) dlmalloc.c: strict-aliasing warning
I'll post two patches to fix #1 and #2. As for #3, I'll reply to this mail with build logs to remind appropriate people of these issues.
Per #4, it would be better to upgrade the byteorder/swab headers first, rather than fixing occasional strict-aliasing reports. Since they are only reported by GCC 4.4, I'd like to leave this issue as-is for now.
With regard to #5, I've checked the mail archives and found that this is one of the known issues, I will ignore it.
$ mips-linux-gnu-gcc --version mips-linux-gnu-gcc (Sourcery G++ Lite 4.4-57) 4.4.1 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

with a few adjustments for U-Boot. This fixes the following build error:
make -C lib_generic/ zlib.c:31:27: error: asm/unaligned.h: No such file or directory zlib.c: In function 'inflate_fast': zlib.c:641: warning: implicit declaration of function 'get_unaligned' make[1]: *** [zlib.o] Error 1 make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic' make: *** [lib_generic/libgeneric.a] Error 2
Reported-by: Himanshu Chauhan himanshu@symmetricore.com Signed-off-by: Shinya Kuribayashi skuribay@pobox.com --- include/asm-mips/unaligned.h | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) create mode 100644 include/asm-mips/unaligned.h
diff --git a/include/asm-mips/unaligned.h b/include/asm-mips/unaligned.h new file mode 100644 index 0000000..da6a347 --- /dev/null +++ b/include/asm-mips/unaligned.h @@ -0,0 +1,26 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) + */ +#ifndef _ASM_MIPS_UNALIGNED_H +#define _ASM_MIPS_UNALIGNED_H + +#include <compiler.h> +#if defined(__MIPSEB__) +# define get_unaligned __get_unaligned_be +# define put_unaligned __put_unaligned_be +#elif defined(__MIPSEL__) +# define get_unaligned __get_unaligned_le +# define put_unaligned __put_unaligned_le +#else +# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" +#endif + +# include <linux/unaligned/le_byteshift.h> +# include <linux/unaligned/be_byteshift.h> +# include <linux/unaligned/generic.h> + +#endif /* _ASM_MIPS_UNALIGNED_H */

In the commit 6ac59c55 (net: pull CONFIG checks out of source and into makefile), net/net.o is changed to be built-in only when CONFIG_CMD_NET is enabled, while lib_mips/board.c has a reference to "getenv_IPaddr() left as-is.
And now Micronas VCT Platinum AVC board builds (vct_platinumavc*_config) failed as follows, because they don't have ethernet support and disable CONFIG_CMD_NET option:
lib_mips/libmips.a(board.o): In function `board_init_r': board.c:(.text+0x2e4): undefined reference to `getenv_IPaddr' make: *** [u-boot] Error 1
VCT Platinum AVC is the only MIPS target who doesn't have CONFIG_CMD_NET and suffer from this issue at this moment.
Signed-off-by: Shinya Kuribayashi skuribay@pobox.com ---
Note that arm/avr32/i386/m68k/nios/nios2/ppc/sparc have the same issue, while blackfin/microblaze/sh don't.
lib_mips/board.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib_mips/board.c b/lib_mips/board.c index b2d113e..5c35884 100644 --- a/lib_mips/board.c +++ b/lib_mips/board.c @@ -370,8 +370,10 @@ void board_init_r (gd_t *id, ulong dest_addr) /* relocate environment function pointers etc. */ env_relocate();
+#ifdef CONFIG_CMD_NET /* IP Address */ bd->bi_ip_addr = getenv_IPaddr("ipaddr"); +#endif
#if defined(CONFIG_PCI) /*

On 1/11/10 11:00 AM, Shinya Kuribayashi wrote:
In the commit 6ac59c55 (net: pull CONFIG checks out of source and into makefile), net/net.o is changed to be built-in only when CONFIG_CMD_NET is enabled, while lib_mips/board.c has a reference to "getenv_IPaddr() left as-is.
And now Micronas VCT Platinum AVC board builds (vct_platinumavc*_config) failed as follows, because they don't have ethernet support and disable CONFIG_CMD_NET option:
lib_mips/libmips.a(board.o): In function `board_init_r': board.c:(.text+0x2e4): undefined reference to `getenv_IPaddr' make: *** [u-boot] Error 1
And I missed that this one will be fixed soon in a different way. Please ignore this patch, thanks.

Hi Rohit, Amul, and Kyungmin (Samsung people),
Shinya Kuribayashi wrote:
Build warnings / errors could be categorized into five groups:
- env_onenand.c: CONFIG_ENV_{ADDR,SIZE}_FLEX undeclared build error
In the following commit, Flex-OneNAND support was introduced:
commit c758e947aa7d39a2be607ecdedd818ad300807b2 Author: Amul Kumar Saha amul.saha@samsung.com Date: Wed Nov 4 10:38:46 2009 +0530
ENV Variable support for Flex-OneNAND
Define and use CONFIG_ENV_ADDR_FLEX and CONFIG_ENV_SIZE_FLEX for storing environment variables.
Signed-off-by: Rohit Hagargundgi h.rohit@samsung.com Signed-off-by: Amul Kumar Saha amul.saha@samsung.com
However, it breaks the existing 'normal' OneNAND user's builds like this:
LOG/vct_platinum_onenand.ERR ----------------------------- env_onenand.c: In function 'env_relocate_spec': env_onenand.c:70: error: 'CONFIG_ENV_ADDR_FLEX' undeclared (first use in this function) env_onenand.c:70: error: (Each undeclared identifier is reported only once env_onenand.c:70: error: for each function it appears in.) env_onenand.c: In function 'saveenv': env_onenand.c:106: error: 'CONFIG_ENV_ADDR_FLEX' undeclared (first use in this function) env_onenand.c:107: error: 'CONFIG_ENV_SIZE_FLEX' undeclared (first use in this function) make[1]: *** [env_onenand.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [common/libcommon.a] Error 2
Affected (MIPS) targets: - MIPS Micronas VCT Premium/Platinum/Platinum AVC (vct_*_onenand_config). - I'm not sure about other OneNAND users in mainline.
Having a look at the code, and from CONFIG_ENV_{ADDR,SIZE}_FLEX names, they're apparently Flex-OneNAND specific configurations, right? If so 'normal' OneNAND users don't want to have, I'm afraid.
Any comments on how, and where supposed to be fixed?
participants (1)
-
Shinya Kuribayashi