I need to add the FTDI USB module to the Android kernel (Android 2.3.1, Linux 2.6.32), so I got the 2.6.32 kernel and tried to build the module:
make modules ARCH=arm CROSS_COMPILE=arm-none-eabi-
But when I tried to do 'insmod ftdi_sio.ko', the error message was
insmod: init_module 'ftdi_sio.ko' failed (Exec format error)
In dmesg's output I found this
ftdi_sio: version magic '2.6.32.27 preempt mod_unload ARMv5 ' should be '2.6.32.27 preempt mod_unload ARMv7 '
I tried to add 'armv7-a' flag (as I read in Android NDK docs)
make modules ARCH=arm CROSS_COMPILE=arm-linux-androideabi- CFLAGS='-march=armv7-a -mfloat-abi=softfp'
Also, I tried following cross-compilers: arm-none-eabi-, arm-eabi-, arm-linux-android-eabi-
Every time result was the same - ARMv5 in the version magic. How can I build the module for ARMv7?
Try setting up CONFIG_CPU_V7=y
in your kernel .config
file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With