ln: target ‘libcublas’ is not a directory
i.MX6Q kernel compilation for camera/video (gstreamer)
银河麒麟4.0,在目标机上编译驱动,此时不是交叉编译,/lib/modules
下面有几个文件夹,内核路径使用uname -r
,否则报上述问题。
解析 Linux 内核可装载模块的版本检查机制
模块依据代码编写与编译时的位置可分:内部模块和外部模块,即 in-tree module 和 out-of-tree module,在内核树外部编写并构建的模块就是外部模块。
version magic '3.10.0_hifone SMP mod_unload ARMv7 p2v8 ’ should be '3.10.0_s40 SMP mod_unload ARMv7
修改,
include/generated/utsrelease.h
#define UTS_RELEASE "4.13.16"
#define UTS_RELEASE "4.13.0-36-generic"
include/config/kernel.release
4.13.16
4.13.0-36-generic
或内核源代码的makefile
VERSION = 4
PATCHLEVEL = 13
SUBLEVEL = 16
EXTRAVERSION =
VERSION = 4
PATCHLEVEL = 13
SUBLEVEL = 0
EXTRAVERSION = -36-generic
sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=~/Apalis-iMX6-LXDE-Image_2.8.4/rootfs/ modules_install
现象,
zc@ubuntu:~/project$ make modules_install
ln: target '/source' is not a directory
Makefile:1232: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1
调试Makefile发现,
ln -s /program/zynqmp/linux-xlnx-v2018.2 /project/zynqmp_rootfs/lib/modules/4.14.0-fdk-1.0.0-20181120.1856 /source
版本号后面多加了个空格,导致语法错误,哎。