Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: asm/xxx.h: No such file or directory
PostPosted: Thu Apr 21, 2011 4:57 am 
Offline

Joined: Thu Apr 21, 2011 4:34 am
Posts: 2
Hi,
I am trying to compile a simple module. however make produces error.

I installed the kernel source,
tar -xvjf linux-2.6.27.tar.bz2
cd linux-2.6.27
zcat 2.6.27-at91.patch.gz |patch -p1
zcat 2.6.27-at91-exp.3.patch.gz |patch -p1
cp at91sam9g20ek_defconfig .config
make ARCH=arm oldconfig
make ARCH=arm menuconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
no error.
Following is the beginning of the "make" messages:
lww@ubuntu:~/work/learn/01$ make
make -C /home/lww/linux2.6.27/linux-2.6.27 M=/home/lww/work/learn/01 modules
make[1]: Entering directory `/home/lww/linux2.6.27/linux-2.6.27'
CC [M] /home/lww/work/learn/01/helloworld.o
In file included from include/linux/prefetch.h:13,
from include/linux/list.h:6,
from include/linux/module.h:9,
from /home/lww/work/learn/01/helloworld.c:1:
include/linux/types.h:12: fatal error: asm/types.h: No such file or directory
compilation terminated.
make[2]: *** [/home/lww/work/learn/01/helloworld.o] Error 1
make[1]: *** [_module_/home/lww/work/learn/01] Error 2
make[1]: Leaving directory `/home/lww/linux2.6.27/linux-2.6.27'
make: *** [modules] Error 2

thanks


Top
 Profile  
 
 Post subject: Re: asm/xxx.h: No such file or directory
PostPosted: Tue May 03, 2011 6:11 pm 
Offline
User avatar

Joined: Wed May 12, 2004 6:59 pm
Posts: 161
Location: Bergamo, Italia
[quote="li.wenwei"]Hi,
I am trying to compile a simple module. however make produces error.

I installed the kernel source,
tar -xvjf linux-2.6.27.tar.bz2
cd linux-2.6.27
zcat 2.6.27-at91.patch.gz |patch -p1
zcat 2.6.27-at91-exp.3.patch.gz |patch -p1
cp at91sam9g20ek_defconfig .config
make ARCH=arm oldconfig
make ARCH=arm menuconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
no error.
[/quote]

Until here you built the kernel
Seems succesful.

[quote="li.wenwei"]
Following is the beginning of the "make" messages:
lww@ubuntu:~/work/learn/01$ make
make -C /home/lww/linux2.6.27/linux-2.6.27 M=/home/lww/work/learn/01 modules
make[1]: Entering directory `/home/lww/linux2.6.27/linux-2.6.27'
CC [M] /home/lww/work/learn/01/helloworld.o
[/quote]

Here is not clear where you are and what exactly are you doing.
I suggest you to search (google.com) how to build a simple kernel module from outside the kernel itself.

_________________
Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
- Atmel Third Party Consultant
Tel. +39-(0)35-255.235 - Fax +39-178-223.9748
http://www.KoanSoftware.com | http://www.KaeilOS.com


Top
 Profile  
 
 Post subject: Re: asm/xxx.h: No such file or directory
PostPosted: Wed May 04, 2011 4:31 am 
Offline

Joined: Thu Apr 21, 2011 4:34 am
Posts: 2
thanks for your reply.
i got it


Top
 Profile  
 
 Post subject: Re: asm/xxx.h: No such file or directory
PostPosted: Wed May 04, 2011 6:39 am 
Offline

Joined: Wed May 04, 2011 5:40 am
Posts: 4
I think it's not finding the right arch directory. Maybe you have to pass ARCH= to all invocations of make?

_________________
--- Admins: Please enable BBCode. ---


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: