AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090202114622.7d568fa0@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:exch1.onstor.net
NSV:
SSH:
R:<Bill.Fisher@onstor.com>,<larry.scheer@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	49874C29.4060807@onstor.com
X-Sylpheed-End-Special-Headers: 1
Date: Mon, 2 Feb 2009 11:46:45 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: Bill Fisher <Bill.Fisher@onstor.com>
Cc: Larry Scheer <larry.scheer@onstor.com>
Subject: Re: compiling acpu and ncpu code for the kernel
Message-ID: <20090202114645.57803110@ripper.onstor.net>
In-Reply-To: <49874C29.4060807@onstor.com>
References: <49874C29.4060807@onstor.com>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, 2 Feb 2009 11:40:25 -0800 Bill Fisher <Bill.Fisher@onstor.com>
wrote:

> Guys:
>=20
> There are still some serious header conflicts trying to get the
> modified code compiled for the kernel in the present
> nfx-tree. I am using the following special hacks
> to defs.mk and things are "still" pulling in the user level header
> files.
>=20
> Hence I'm be moving the code to fs/onstor under the kernel tree
> to avoid this mess. Unless you strongly object that is the plan.
>=20
> /usr/bin/mipsel-linux-gnu-gcc-4.1=20
> -I../../../linux/kernel/linux-mips-2.6/include=20
> -I../../../linux/kernel/linux-mips-2.6/include/linux=20
> -I.\./../../linux/kernel/linux-mips-2.6/include/sys=20
> -I../../../linux/kernel/linux-mips-2.6/include/net=20
> -I../../../linux/kernel/linux-mips-2.6/i\nclude/asm-mips=20
> -I../../../linux/kernel/linux-mips-2.6/include/asm-mips/mach-generic=20
> -I/usr/mipsel-linux-gnu/include=20
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Try getting rid of this first.  I blame Larry for this one.  Well,
*somebody* has to be blamed.  This include path should never be
explicityly specified, rather only included implicitly by the cross
compiler itself.

And the compile options should also include "-nostdinc" for kernel code.


> -include ../../../linu\x/kernel/linux-mips-2.6/include/linux/autoconf.h=20
> -I../../Includes -I. -I../../Build/cg/dbg -fno-builtin-printf=20
> -fno-builtin-abort -DSIBYTE \-DSB1250 -DR4000 -D__long64 -DTUXRX=20
> -DLANGUAGE_C   -O2   -nostdlib -nostdinc -DNETEEE_FRAGMENT=20
> -DEEE_ALLOC_USE_TAILQ -DEEE_VALIDATE -DREQ_T\RACING=20
> -DNFS_DONT_FREE_REQUESTS -DRECYCLE_REQUESTS -DCIFS_DONT_FREE_REQUESTS=20
> -DRECYCLE_REQUESTS -DDCACHE_VERIFY_CACHE_LIST_AFTER_INSERTION=20
> \-DDCACHE_SAVE_REQ_RESP -DDCACHE_DEBUG_ENABLE -DDCACHE_DEBUG_ASSERT=20
> -DBASIC_STATS -DDETAIL_STATS -DPKT_ALLOC_USE_TAILQ -DFS_RPC_USE_TAILQ=20
> -D\VS_VALIDATE_REFCNT_FREQ=3D10000 -DREF_TRACKING -DFCB_STATS=20
> -DVS_VALIDATE_REFCNT -DPKT_ALLOC_USE_TAILQ -DREQ_TRACING=20
> -DNFS_DONT_FREE_REQUESTS \-DRECYCLE_REQUESTS
> -DCIFS_DONT_FREE_REQUESTS -DRECYCLE_REQUESTS
> -DDCACHE_VERIFY_CACHE_LIST_AFTER_INSERTION -DDCACHE_SAVE_REQ_RESP
> -DDCACHE_\DEBUG_ENABLE -DDCACHE_DEBUG_ASSERT -DBASIC_STATS
> -DDETAIL_STATS -DFS_RPC_USE_TAILQ  -G 0 -mlong64
> -DOS_INCL=3D\"linux.h\"  -DCOUGAR -DDEFAUL\T_VENDOR_NAME=3D\"ONStor\"
> -DDEFAULT_PROD_NAME=3D\"COUGAR\" -g -fno-reorder-blocks -DTUXRX
> -DAGILE_HARDWARE -c tpl.c
> -o ../../Build/cg/dbg/Obje\cts/TUXRX/sm-tpl/tpl.o In file included
> from ../../../linux/kernel/linux-mips-2.6/include/linux/bitops.h:9,
> from ../../../linux/kernel/linux-mips-2.6/include/linux/thread_info.h:20,
>                   from=20
> ../../../linux/kernel/linux-mips-2.6/include/linux/preempt.h:9,
>                   from=20
> ../../../linux/kernel/linux-mips-2.6/include/linux/spinlock.h:49,
>                   from /usr/mipsel-linux-gnu/include/asm/atomic.h:20,
>                   from=20
> ../../../linux/kernel/linux-mips-2.6/include/linux/skbuff.h:22,
>                   from tpl.c:14:
> /usr/mipsel-linux-gnu/include/asm/bitops.h: In function =E2=80=98set_bit=
=E2=80=99:
> /usr/mipsel-linux-gnu/include/asm/bitops.h:73: error:
> =E2=80=98R10000_LLSC_WAR=E2=80=99 undeclared (first use in this function)
> /usr/mipsel-linux-gnu/include/asm/bitops.h:73: error: (Each
> undeclared identifier is reported only once
