ts-7000
[Top] [All Lists]

[ts-7000] Re: Build kernel module

To:
Subject: [ts-7000] Re: Build kernel module
From: "Blagoj" <>
Date: Tue, 03 May 2011 22:08:21 -0000
Hello,
Yes, your answer solved my problem. The KERNELDIR that i used pointed to kernel 
header folder for Linux 2.6.38, the same as my PC version. 

I've modified the KERNELDIR to point to folder from where i'm building the 
2.6.24 version which i want to use for the target board(KERNELDIR ?= 
/home/my-user-name/path-to-kernel-source) and everything went smooth. :)

Thanks for your support.

/Blagoj 

--- In  "Jaan" <> wrote:
>
> Hi,
> 
> Your KERNELDIR should be a symbolic link in /lib/modules/--version--/build 
> which should point to the kernel source directory, maybe something like 
> /home/user/mykernel (usually, when not cross compiling, it is something like 
> /usr/src/linux-version) ... I think you should try to ignore this symbolic 
> link and write the directory to this Makefile as it is in your system. 
> Something like:
>   KERNELDIR ?= /home/my-user-name/path-to-kernel-source
> 
> And, when you say:
>   ...the process fails
> then you should write, what is the output of the compile/make process.
> 
> Hope some of this helps,
> Jaan
> 
> --- In  "Blagoj" <bkupev@> wrote:
> >
> > Hello,
> > I'm new in linux and embedded and i'm stuck on a simple issue..
> > I'm using source for kernel 2.6.24 and i'm able to successfully build 
> > kernel and start it. I'm using ELDK build tools. But when i try to build a 
> > simple load module the process fails. I assume that there's something wrong 
> > with the make file but i'm not sure how to fix it... the make file that i'm 
> > using is at the end of this message.
> > I suspect that i should change the KERNELDIR but i'm not sure what to state 
> > there?
> > Best regards,
> > Blagoj
> > 
> > # Comment/uncomment the following line to disable/enable debugging
> > #DEBUG = y
> > 
> > # Add your debugging flag (or not) to CFLAGS
> > ifeq ($(DEBUG),y)
> >   DEBFLAGS = -O -g # "-O" is needed to expand inlines
> > else
> >   DEBFLAGS = -O2
> > endif
> > 
> > EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
> > 
> > ifneq ($(KERNELRELEASE),)
> > # call from kernel build system
> > 
> > obj-m   := simple.o
> > 
> > else
> > 
> > KERNELDIR ?= /lib/modules/$(shell uname -r)/build
> > PWD       := $(shell pwd)
> > 
> > default:
> >     $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINCDIR=$(PWD)/../include modules
> > 
> > endif
> > 
> > clean:
> >     rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
> > 
> > depend .depend dep:
> >     $(CC) $(CFLAGS) -M *.c > .depend
> > 
> > ifeq (.depend,$(wildcard .depend))
> > include .depend
> > endif
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU