ts-7000
[Top] [All Lists]

[ts-7000] Re: kernel module compilation

To:
Subject: [ts-7000] Re: kernel module compilation
From: "jdts7xxx" <>
Date: Fri, 23 Mar 2007 13:06:27 -0000
--- In  "jdts7xxx" <> wrote:
Already fixed. Sorry. For other perhaps to make this question more
helpful when searching through old postings.
The crosstools need to be 3x versions. version 4 will give apcs-32
errors when configuring the kernel sources and ofcourse all the
trouble with the compilation of your kernel module file.
Change the cross_compiler variable in the Makefile of the kernel
source and modify the build symbolic link in the debian filesystem on
your host machine, i.e. ....debian/lib/modules/2.4.26.tsxx/ to refer
to the correct kernel source.



>
> Hi,
> I'm trying to compile to very basic 'hello world' kernel module but
> got stuck. Perhaps somebody has some pointers.
> the makefile is:
> CC      := arm-unknown-linux-gnu-gcc
>   2 TARGET  := helloworld
>   3 INCLUDE :=
> -I/usr/local/ts7300/debian/lib/modules/2.4.26-ts10/build/include
>   4 CFLAGS  := -O2 -Wall -DMODULE -D__KERNEL__ -DLINUX
>   5
>   6 all:: ${TARGET}.o
>   7
>   8 .phony: clean
>   9
>  10 ${TARGET}.o: ${TARGET}.c
>  11     $(CC) $(CFLAGS) ${INCLUDE} -c ${TARGET}.c
>  12
> The kernel source is installed in ....debian/usr/src/linux24 and
> the symbolic link 'build' of the makefile points correctly to the
> kernelsource location. 
> 
> but a make generates:
> make
> arm-unknown-linux-gnu-gcc -O2 -Wall -DMODULE -D__KERNEL__ -DLINUX
> -I/usr/local/ts7300/debian/lib/modules/2.4.26-ts10/build/include -c
> helloworld.c
> In file included from
>
/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/lib/gcc/arm-unknown-linux-gnu/4.0.1/../../../../arm-unknown-linux-gnu/sys-include/linux/autoconf.h:1,
>                  from
>
/usr/local/ts7300/debian/lib/modules/2.4.26-ts10/build/include/linux/config.h:4,
>                  from
>
/usr/local/ts7300/debian/lib/modules/2.4.26-ts10/build/include/linux/module.h:10,
>                  from helloworld.c:1:
>
/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/lib/gcc/arm-unknown-linux-gnu/4.0.1/../../../../arm-unknown-linux-gnu/sys-include/linux/err_kernel_only.h:1:2:
> error: #error Kernel only header included in userspace
> and lots of other kernel header file errors. 
> Some environment variable missing? Configuration, path?
> T. Walstra
>




 
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