AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090505154733.498f38eb@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:mail.onstor.net
NSV:
SSH:
R:<Bill.Fisher@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 5 May 2009 15:48:03 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Bill Fisher <Bill.Fisher@onstor.com>
Subject: Re: EEE compilation into the kernel
Message-ID: <20090505154803.109aa7db@ripper.onstor.net>
In-Reply-To: <49E537F2.8020101@onstor.com>
References: <49E537F2.8020101@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=US-ASCII
Content-Transfer-Encoding: 7bit

Resending.... with additions



On Tue, 14 Apr 2009 18:27:14 -0700 Bill Fisher <Bill.Fisher@onstor.com>
wrote:

> You were going to send me a pointer to the makefile?
> 
> I have looked at the sm-UI code and it looks pretty
> straight-ahead, modulo the header file include problem(s).
> 

Yeah, so here's the sctuff:

The make command:

make V=1 -C <path-to-kernel-source> \
	M=<path-to-directory-for-compilation>

so in your case,

make V=1 -C <path-to-kernel-source> M=whatever/nfx-tree/code/sm-ui

The 'M' is short for module, or in this case, out-of-tree module.

Then, in sm-ui directory, you would have a kernel style makefile.  I'll
paste the one I have for sm-nfs.  In my config file, I have
CONFIG_ONSTOR_NFS=m in order to make this work.

> To go along with this makefile (the one in nfx-tree, pasted below),
> you have to have a Kconfig entry that corresponds with the config
> option, in this example, CONFIG_ONSTOR_NFS.  That's what was missing
> from this email/code the first time around.  Here is the
> corresponding Kconfig entry:

config ONSTOR_NFS
	tristate "ONStor's NFS Implementation"
	default m
	depends on ONSTOR_TUXRX

> which resides in the kernel tree file arch/mips/onstor/Kconfig, but
> could reside in many places.  Since it is to build an out-of-tree
> module, I put it in a Kconfig file that goes along with only onstor
> stuff.

> Here is the nfx-tree makefile:


# Makefile for building for the Linux kernel

NFX_TREE=$(KBUILD_EXTMOD)/../..

CPPFLAGS += -fms-extensions -I $(NFX_TREE)/Includes -I $(NFX_TREE)/code
-DNFP_TXRX -include "$(NFX_TREE)/Includes/linux/typalooza.h"

obj-$(CONFIG_ONSTOR_NFS) += \
        nfs-open.o \
        ncp-api.o \
        nfs-audit-api.o \
        nfs-cmd-shell.o \
        nfs-cmd.o \
        nfs-conn.o \
        nfs-dupcache.o \
        nfs-module.o \
        nfs-monitor-api.o \
        nfs-notify-api.o \
        nfs-parse.o \
        nfs-proc.o \
        nfs-reply.o \
        nfs-req-api.o \
        nfs-stats.o \
        nfs-string.o \
        nfs-test.o \
        nfs-testprog.o \
        ns-api.o \
        rpc.o


