The Motorola Development Community


Go Back   MotorolaFans.com Forums > Developments > Development
Notices

Development Hacking, development, scripts etc

Reply

MotoFans NWBE

Join Date: Oct 2006
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Quote  
#1
03-02-2008
Default Compiling kernel module on A780, problem with linux/slab.h?

Hi,

I've been playing around with my A780 and trying to get a kernel module compiled on there. When I try to use kmalloc()/kfree() and include <linux/slab.h>, I get the following error at compilation:

Code:
In file included from /home/tom/a780/e680-a780/e680-linux/include/linux/slab.h:14,
                 from myModule.c:24:
/home/tom/a780/e680-a780/e680-linux/include/linux/mm.h:485: error: syntax error before "phys_addr_t"
make: *** [myModule.o] Error 1
I'm using lsb's cross-comiplation toolkit and include the kernel headers with -isystem /home/tom/a780/e680-a780/e680-linux/include

where e680-a780 is the tarball downloaded from opensource.motorola.com .

kprintf()'s and such work fine.

Any help is appreciated. Thanks!
Reply With Quote


User Information
Current Phone: A780
zbojnik83 is offlineReport Post
MotoFans NWBE

Join Date: Oct 2006
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Quote  
#2
03-02-2008
Default

I was able to get this resolved by including <asm-generic/mmu.h> where phys_addr_t is defined.

However, it seems that the issue was mixing of kernel headers from the 2.4.20 montavista source and 2.4.26 source included with ezx-crosstool. I also get a kernel version of 2.4.26 in the module and I can't seem to tell ezx-crosstool not to use the 2.4.26 source.

Anybody have issues with ezx-crosstool like this before? Does anybody know if the tool is somehow kernel version specific?

Thanks in advance for any help.
Reply With Quote


User Information
Current Phone: A780
zbojnik83 is offlineReport Post
Moto Fans SENR

Join Date: Sep 2005
Posts: 1,091
Thanks: 0
Thanked 132 Times in 67 Posts
Location: Jakarta, Indonesia

Quote  
#3
03-03-2008
Default

Forgot how I did it but I use Motorola's 2.4.20 ezx kernel source when building ezx-crosstool. If we need to build this kernel, we have to apply a patch. If not wrong this patch made by Motorolafans member pnail and ready around here or maybe mkezx source from www.mkezx.org will help you with this problem.
Reply With Quote


User Information
Current Phone: Motorola E680i and A1200
Location: Jakarta, Indonesia

blackhawk is offlineReport Post
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:51 PM. Search Engine Friendly URLs by vBSEO 3.2.0 Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. VBulletin Skin by ForumMonkeys.