use it...
may be very helpful add this script to android kernel building how-to ;)
#!/bin/sh
#######
#Actually, I getting it by this way...
#cd android
#repo init -u git://android.git.kernel.org/platform/manifest.git
#repo sync
#######
#But, if you want to get only tools, you must try this...
# git clone git://android.git.kernel.org/platform/prebuilt.git
#where your android tools
export CROSSTOOLS=/usr/src/android/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1
export PATH=$CROSSTOOLS/bin:$PATH
export CROSS_TARGET=arm-eabi
export CC="${CROSS_TARGET}-gcc"
export CXX="${CROSS_TARGET}-g++"
export AR="${CROSS_TARGET}-ar"
export AS="${CROSS_TARGET}-as"
export LD="${CROSS_TARGET}-ld"
export RANLIB="${CROSS_TARGET}-ranlib"
export READELF="${CROSS_TARGET}-readelf"
export STRIP="${CROSS_TARGET}-strip"
On 05/08/2009, lei <[email protected]> wrote:
>
> ARCH=ARM
>
> On Aug 4, 6:09 pm, Neo <[email protected]> wrote:
>> On Aug 3, 8:21 am, 永振 田 <[email protected]> wrote:
>>
>>
>>
>>
>>
>> > Hi,all!
>> > I'd like to compile a kernel module to Android Linux Kernel,but I have
>> > no idea how to write the Makefile for the kernel module.
>> > Here is my Makefile(just like pc):
>>
>> > 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
>>
>> > when make modules,the Makefile do nothing but list errors as follows:
>> > t...@debian:~/NetBeansProjects/test3GNetlink$ make modules
>> > 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
>>
>> Why do you have to write a Makefile for the compiling the kernel, it
>> is already there in kernel sources. So go there and just do a "make"
>> after setting the cross-compiler option.- Hide quoted text -
>>
>> - Show quoted text -
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel
-~----------~----~----~----~------~----~------~--~---