Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old August 3rd, 2009, 01:05 AM   #1 (permalink)
New Member
 
Join Date: Aug 2009
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to compile a kernel module to Android Linux Kernel ?

Hi,all!
I'd like to compile a kernel module to Android Linux Kernel. But I donnot know how to build the Makefile for the module.
Here is my Makefile,and /home/tyz/0728 is source code dir of android:
obj-m= test_k.o
KERNELDIR= /home/tyz/0728/kernel/
CROSS_COMPILE= /home/tyz/0728/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
CC= $(CROSS_COMPILE)gcc
PWD= $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
rm Module.symvers

After make modules,I get nothing but errors :
make -C /home/tyz/0728/kernel/ M=/home/tyz/NetBeansProjects/test3GNetlink modules
make[1]: Entering directory `/home/tyz/0728/kernel'

ERROR: Kernel configuration is invalid.
include/linux/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.


WARNING: Symbol version dump /home/tyz/0728/kernel/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /home/tyz/NetBeansProjects/test3GNetlink/test_k.o
cc1: error: unrecognized command line option "-m64"
cc1: error: unrecognized command line option "-mno-red-zone"
cc1: error: unrecognized command line option "-mcmodel=kernel"
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
cc1: error: unrecognized command line option "-mno-sse"
cc1: error: unrecognized command line option "-mno-mmx"
cc1: error: unrecognized command line option "-mno-sse2"
cc1: error: unrecognized command line option "-mno-3dnow"
make[2]: *** [/home/tyz/NetBeansProjects/test3GNetlink/test_k.o] error 1
make[1]: *** [_module_/home/tyz/NetBeansProjects/test3GNetlink] error 2
make[1]: Leaving directory `/home/tyz/0728/kernel'
make: *** [modules] error 2

what should I do ?Thanks!

neutyz is offline  
Last edited by neutyz; August 3rd, 2009 at 01:09 AM. Reason: add some words
Reply With Quote
Sponsors
Reply

Bookmarks

Tags
kernel module


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Droid 2 Overclock(Kernel Module+Instructions) FreeWELL Droid 2 - All Things Root 93 November 8th, 2011 07:28 PM
Droid X 2.2 Overclock (Kernel Module w/Instructions) FreeWELL Droid X - All Things Root 594 October 19th, 2011 11:09 AM
Android and Linux Kernel developer group hongjiujing Application Development 0 December 16th, 2009 11:48 PM



All times are GMT -5. The time now is 12:19 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo