This is an old revision of the document!
Table of Contents
Kernel Modules
The unit runs 4.9.166-fsl-imx-INIT-004, built from NXP's linux-imx tree at tag v4.9.166, with INIT's patches on top. The running config is /proc/config.gz. The stock build used OSELAS.Toolchain-2018.12.0 (gcc 8.2.1), per /proc/version.
The kernel is uniprocessor. CONFIG_SMP is not set, so only CPU0 comes up even though the i.MX6DL has two cores. It is a config choice, not a hardware limit, and it changes what /proc/cpuinfo and the scheduler look like:
zcat /proc/config.gz | grep CONFIG_SMP # CONFIG_SMP is not set cat /proc/cpuinfo
Stock modules
List what shipped with the image:
find /lib/modules/$(uname -r) -type f -name '*.ko'
The image ships 36. By family:
| family | modules |
|---|---|
| USB serial | ftdi_sio, usbserial |
| video, backlight | coda, v4l2-mem2mem, videobuf2-vmalloc, lcd |
| crypto | cmac, xor, crc8, sha1-arm-neon, sha256-arm, xor-neon |
| filesystems | btrfs, cifs, fat, vfat, ntfs, squashfs, fscache |
| NFS | nfs, nfsv3, nfsv4, lockd, grace, sunrpc, auth_rpcgss |
| netfilter | ip_tables, x_tables, xt_tcpudp, nf_reject_ipv4 |
| WiFi | mac80211, wlcore, wlcore_sdio, wl18xx |
| lib | raid6_pq, oid_registry |
ftdi_sio is the barcode bridge on ttyUSB0. The CAAM crypto engine is built in, not a module, and registers its algorithms in /proc/crypto. It has nothing to do with the cVEND HSM.
Building
Dockcross works for this. Use the dockcross/linux-armv7-lts container.
- Fetch the matching source: nxp-imx/linux-imx at v4.9.166. The tag is the base version from
uname -r, so4.9.166for4.9.166-fsl-imx-INIT-004. - Copy
/proc/config.gzoff the unit and gunzip it to.configin the source root. - Set
CONFIG_LOCALVERSION_AUTO=n. - Set what you need to
m.CONFIG_SLIP=mbuildsdrivers/net/slip/slip.ko, and the same pattern applies elsewhere. - Set
EXTRAVERSION = -fsl-imx-INIT-004in the top-levelMakefile. Take the suffix fromuname -rif yours differs. - In
scripts/dtc/dtc-lexer.lex.candscripts/dtc/dtc-lexer.lex.c_shipped, changeYYLTYPE yylloc;toextern YYLTYPE yylloc;. - Commit the tree. Uncommitted files add
-dirtyto the version magic. - Build with
make LOCALVERSION= -C . modules. Inside Dockcross you may needsudo make. scpthe module over andinsmodit. If it refuses, checkdmesg.
Problems
A module built against the wrong config or tree fails to load with:
version magic '4.9.166-fsl-imx-INIT-004+ preempt ARMv7 p2v8 ' should be '4.9.166-fsl-imx-INIT-004 preempt ARMv7 p2v8 '
version magic '4.9.166-fsl-imx-INIT-004-dirty preempt ARMv7 p2v8 ' should be '4.9.166-fsl-imx-INIT-004 preempt ARMv7 p2v8 '
The trailing + means CONFIG_LOCALVERSION_AUTO picked up a git version. -dirty means the tree had uncommitted changes. Check:
CONFIG_LOCALVERSION_AUTO=nin.config.LOCALVERSION=on the make line.- A clean
git status.
