I’m trying to cross compile the cryptodev external kernel module for
use on a BBB (I want to used crypto accelerated AES in openssl). When
I try to modprobe the module, I get:
ERROR: could not insert ‘cryptodev’: Exec format error
and I’m stuck and requesting help from those who have cross compiled modules.
My steps:
- I’m running Ubuntu raring 3.8.13-bone21
- I downloaded the stock 3.8.13 kernel [1]
- I downloaded the 3.8.13-boine21 patch and config [2] [3]
- I applied the patch and copied the config to the kernel
- apt-get install gcc-linux-arm-gnueabi
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules
- Cross compiled the module. Cryptodev [4] has no dependencies other
than the kernel itself. I passed ARCH=arm and
CROSS_COMPILE=arm-linux-gnueabi- and it built. - run make install with a prefix and captured the cryptodev.ko
- I put cryptodev.ko in /lib/modules/extra on the BBB
- sudo depmod -a
- sudo modprobe cryptodev and I get the error above.
Other info:
file cryptodev.ko yields:
cryptodev.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), BuildID[sha1]=0xcd15e83f02079b8c522a896f9c93a7166b6bac7e, not stripped
modinfo cryptodev yields:
filename: /lib/modules/3.8.13-bone21/extra/cryptodev.ko
license: GPL
description: CryptoDev driver
author: Nikos Mavrogiannopoulos
srcversion: 65CAA0FA92528091299328F
depends:
vermagic: 3.8.13 SMP mod_unload modversions ARMv7 p2v8
parm: cryptodev_verbosity:0: normal, 1: verbose, 2: debug (int)
I’m not sure why the vermagic line doesn’t have 3.8.13-bone21?
Trying to insmod yields:
Error: could not insert module cryptodev.ko: Invalid module format
[101075.881894] cryptodev: no symbol version for module_layout
Thanks for the help,
Josh
[1] https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.8.13.tar.gz
[2] http://rcn-ee.net/deb/raring-armhf/v3.8.13-bone21/patch-3.8.13-bone21.diff.gz
[3] http://rcn-ee.net/deb/raring-armhf/v3.8.13-bone21/defconfig
[4] http://cryptodev-linux.org/