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.
PATCH 1/2 MIPS: qemu_mips: Import asm/unaligned.h from the Linux kernel
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
--- include/asm-mips/unaligned.h | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) create mode 100644 include/asm-mips/unaligned.h
include/asm-mips/unaligned.h new file +26 -0
@@ -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 at 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 */
Signature · 1 line
1.6.6
PATCH 2/2 MIPS: lib_mips/board.c: Fix undefined "getenv_IPaddr" build error
In reply to Shinya KuribayashiIn 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.
---
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(-)
lib_mips/board.c +2 -0
@@ -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 )/*
Signature · 1 line
1.6.6
[U-Boot] Flex-OneNAND related build breakage (was Re: MIPS: build status (2010.01))
In reply to Shinya KuribayashiHi Rohit, Amul, and Kyungmin (Samsung people),
Quoted 3 lines · Shinya Kuribayashi
Build warnings / errors could be categorized into five groups:
3)
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 <[email protected]> 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.
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?
PATCH 2/2 MIPS: lib_mips/board.c: Fix undefined "getenv_IPaddr" build error
In reply to Shinya KuribayashiQuoted 5 lines · Shinya Kuribayashi
In the commit
6ac59c55(net: pull CONFIG checks out of source and into makefile),net/net.ois changed to be built-in only whenCONFIG_CMD_NETis enabled, whilelib_mips/board.chas a reference to "getenv_IPaddr()left as-is.
Quoted 7 lines
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_NEToption: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.