Affichage des articles dont le libellé est modules. Afficher tous les articles
Affichage des articles dont le libellé est modules. Afficher tous les articles

jeudi 23 janvier 2014

[Q] Compiling modules for the stock Ray kernel (2.6.32.9-perf) topic




Hi!
I'm trying to compile usbserial-related modules for my Xperia Ray that's still on stock GB. What I have done:
  1. downloaded the correct SE kernel sources

  2. installed the latest Google's NDK

  3. loaded the default Ray kernel config (make semc_urushi_defconfig)

  4. set up usbserial and pl2303 as modules (make menuconfig)

  5. export ARCH=arm

  6. export CROSS_COMPILE=......./android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-

  7. edited Makefile and set KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Wno-unused-but-set-variable -o-uninitialized -fno-strict-aliasing -fno-common -Wimplicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks

  8. make CFLAGS_MODULE=-fno-pic modules

The build goes without an error and I get my modules. The problem is when I try to insmod them on my Ray I get "invalid module format" with no additional errors reported in dmesg. The only thing (I think) I know is that it's not the problem with the 'magic version' string as I have tried changing the default in the Makefile and then I do get that that it's a wrong magic version.

Any ideas?