By the way, I'm using SDK 1.5 and android-goldfish-2.6.27. I also tested android-goldfish-2.6.29 and still ok. Haven't tried the with 1.6 but I think it's still applicable.
On Oct 29, 4:16 pm, Chew Esmero <chew.esm...@gmail.com> wrote: > Only "Enable loadable module support". I think you really need to > build your driver with KERNEL_DIR pointing to your goldfish kernel > directory and using the cross-compiler provided with Android source. > If not, your driver will be built using your host's kernel headers. > The output module is not recognizable in Android kernel. > > On Oct 29, 3:33 pm, perumal316 <perumal...@gmail.com> wrote: > > > > > Hi, > > > I tried enabling the module support and boot the emulator using that > > kernel but still getting the same error when insmod a module from the > > terminal in emulator. > > > I also changing the Make file as specified and make the program but > > get a long list of errors like "undeclared identifier" and cannnot > > find header files and others. > > > If there anything else I must do, like only need to enable module > > support or must enable any other options too? > > > Thanks in Advance, > > Perumal > > > On Oct 29, 1:23 pm, Chew Esmero <chew.esm...@gmail.com> wrote: > > > > Yes, it is possible. Exec Format Error: it seems that your module is > > > not built using the headers of your goldfish kernel. Try this simple > > > makefile when building your new driver (assuming hello.c as source): > > > > obj-m := hello.o > > > > CROSS_COMPILE=arm-eabi- > > > KERNEL_DIR ?= ~/goldfish/kernel/ > > > > all: > > > $(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$ > > > (CROSS_COMPILE) modules > > > > clean: > > > rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions > > > modules.order Module.symvers Module.markers > > > > You need to take note that you need to export first CROSS_COMPILE > > > variable to your current shell. (i.e. #export CROSS_COMPILE=~/<your- > > > android-dir>/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin) Then you > > > issue the command #make. I think this will resolve the Exec Format > > > Error problem. > > > > As for the 'operation not permitted' problem in #insmod, it seems that > > > the "Loadable Module Support" in your goldfish's kernel config is > > > still not enabled. You can try this: > > > > <goldfish-kernel># ARCH=arm make goldfish_defconfig > > > <goldfish-kernel># ARCH=arm make menuconfig > > > > [*] Enable loadable module support ---> (make sure to have this one) > > > > <goldfish-kernel># ARCH=arm ARCH=arm CROSS_COMPILE=arm-eabi- make > > > > Your final kernel will be arch/arm/boot/zImage. After booting emulator > > > using that kernel, you can now do your #insmod in emulator shell. > > > > Hope that helps. > > > > On Oct 29, 1:01 pm, perumal316 <perumal...@gmail.com> wrote: > > > > > Thanks,Yes, now it can be loaded when the emulator is booted with the > > > > new kernel. > > > > But must I always build the module against my new kernel and boot with > > > > the new kernel to load a new module? > > > > Is it possible to insmod <module>, similar like in Linux to load a > > > > module? > > > > I have tried in emulator's terminal and in shell but keep on getting > > > > the "init module failed, Exec Format Error or init module > > > > failed,operation not permitted" error messages. > > > > > Regards, > > > > Perumal > > > > > On Oct 20, 9:06 pm, Chew Esmero <chew.esm...@gmail.com> wrote: > > > > > > Did you build the module against your new kernel? (i.e. ARCH=arm > > > > > KERNEL_DIR=<android-root-dir>/kernel make). I've encountered that > > > > > error message before and it seems that the booted kernel still do not > > > > > allow "Enable Loadable Module" .config support. Are you sure emulator > > > > > is booted with the new kernel? (i.e. emulator -kernel <new-kernel> - > > > > > show-kernel -avd <name-of-avd>) --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel -~----------~----~----~----~------~----~------~--~---