Wanting to add support for USB adapter peripherals. Have grabbed linux-stable, checked out v4.0 and built. Generated ko but insmod rejects
root@econ-100-s:/mnt# insmod ch341.ko
insmod: ERROR: could not insert module ch341.ko: Invalid module format
checking module on build workstation
joseph@joseph-T1700:~/linux-stable/drivers/usb/serial$ file ch341.ko
ch341.ko: ELF 32-bit LSB relocatable, ARM, version 1, BuildID[sha1]=40ba324fadd00bc01a557bdd40babb8cd4b5cf9a, not stripped
check atemsys.ko from ECON100
joseph@joseph-T1700:~$ file atemsys.ko
atemsys.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=3759c9a69c540fd75e7cc864ecadbf35b8a9a2c5, not stripped
Also see “vermagic=4.0.0-xilinx SMP preempt mod_unload modversions ARMv7 p2v8” in atemsys.ko.
Have pulled linux-xlnx from github. Repository does not contain a “4.0.0-xilinx” branch or tag. Where is the 4.0.0-xilinx repository found and what toolchain is required for compatible builds?
Thank you
Update: I was able to build EABI5 kernel modules using the gcc-arm-none-eabi-5_4 toolchain from here,
joseph@joseph-T1700:~/linux-stable$ file ./drivers/usb/serial/usbserial.ko
./drivers/usb/serial/usbserial.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=a0aff5d8aa02db43d32bab20adbaaf4a92739d92, not stripped
joseph@joseph-T1700:~/linux-stable$ file ./drivers/usb/serial/ch341.ko
./drivers/usb/serial/ch341.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=760c9a54314c02ffa2a77686ae3bf91902530b56, not stripped
The module load still fails likely due to kernel version conflict.
root@econ-100-s:/mnt# insmod usbserial.ko
insmod: ERROR: could not insert module usbserial.ko: Invalid module format
root@econ-100-s:/mnt# insmod ch341.ko
insmod: ERROR: could not insert module ch341.ko: Invalid module format