[EVO 4G General] cutaway_:
To start: Yes, I have searched the forums for similar items. There are no helpful responses. Hopefully this extra info helps.

Phone: HTC Evo 4G

OS: Cyanogenmod 7.1.0 Supersonic

Kernel Info: 2.6.37.6-cyanogenmod-01509-g8913be8

Background: I need to speak with serial devices via the USB port. The specific device I want to send data is an FTDI device. I am successfully communicating with the device via my Linux-based desktop. The challenge is porting my code to Android.

Here we go.

I started here: http://android.serverbox.ch/?p=285

To get the development environment and kernel for my phone I followed this:

http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source

When compiling my kernel I ran into a problem with the environment variables defined in the tutorial. I replaced CCOMPILE with CROSS_COMPILE and pointed it to my Code Sourcery install:

export CROSS_COMPILE=/home/LINUX_USER/Hardware/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-

I updated my kernel configuration (according to the FTDI tutorial) and tried to build the kernel and FTDI kernel module. My first attempt to "make" the kernel didn't work. I found this:

http://xdaforums.com/archive/index.php/t-932190.html

Which provided me with a flag to get make to run:

# make EXTRA_AFLAGS=-mfpu=neon

The FTDI kernel module built successfully and I pushed the module to the SD card and tried to install module:

# /home/LINUX_USER/Hardware/android/android-sdk-linux/platform-tools/adb push drivers/usb/serial/ftdi_sio.ko /sdcard/

# insmod /sdcard/ftdi_sio.ko

insmod: init_module '/sdcard/ftdi_sio.ko' failed (Exec format error)

Since it didn't work I checked dmesg

# dmesg shows this:

[snip]

<3>[20821.873504] ftdi_sio: version magic '2.6.37.6-cyanogenmod-g996b70e preempt mod_unload ARMv7 ' should be '2.6.37.6-cyanogenmod-01509-g8913be8 preempt mod_unload ARMv7 '

I validated the kernel version on my phone and looked for a fix:

# uname -a

Linux localhost 2.6.37.6-cyanogenmod-01509-g8913be8 #1 PREEMPT Wed Jul 27 21:34:30 EDT 2011 armv7l GNU/Linux

The following tutorial provided me with instructions on how to address this issue:

http://glandium.org/blog/?p=2214

I changed the subversion number for the kernel by updating .scmversion to contain the following data:

-01509-g8913be8

After recompiling I tried to load the FTDI module again and got the following messages:

# insmod ftdi_sio.ko

insmod: init_module 'ftdi_sio.ko' failed (No such file or directory)

# dmesg | tail -15

<6>[58392.044647] batt: batt power_supply_changed: battery at 58389757684756 (2011-11-16 17:35:59.423392893 UTC)

<4>[58392.053100] at 58389762414981 (2011-11-16 17:35:59.413322092 UTC)

<4>[58413.600006] ftdi_sio: Unknown symbol usb_register_driver (err 0)

<4>[58413.602172] ftdi_sio: Unknown symbol usb_serial_handle_sysrq_char (err 0)

<4>[58413.604858] ftdi_sio: Unknown symbol usb_serial_disconnect (err 0)

<4>[58413.607910] ftdi_sio: Unknown symbol usb_serial_generic_open (err 0)

<4>[58413.610290] ftdi_sio: Unknown symbol usb_serial_generic_close (err 0)

<4>[58413.612609] ftdi_sio: Unknown symbol usb_control_msg (err 0)

<4>[58413.615142] ftdi_sio: Unknown symbol usb_deregister (err 0)

<4>[58413.617340] ftdi_sio: Unknown symbol usb_serial_generic_unthrottle (err 0)

<4>[58413.619262] ftdi_sio: Unknown symbol usb_serial_handle_break (err 0)

<4>[58413.622161] ftdi_sio: Unknown symbol usb_serial_generic_throttle (err 0)

<4>[58413.622955] ftdi_sio: Unknown symbol usb_serial_probe (err 0)

<4>[58413.624511] ftdi_sio: Unknown symbol usb_serial_register (err 0)

<4>[58413.630371] ftdi_sio: Unknown symbol usb_serial_deregister (err 0)

Since this failed I tried other compilers as well with the same results.

export CROSS_COMPILE=/home/LINUX_USER/Hardware/android/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-

export CROSS_COMPILE=/home/LINUX_USER/Hardware/android/cyanogenmod/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

I need help understanding what I should try next.

Thank you,

cutaway