linux 编译报错 not a directory,linux驱动编译和加载问题

参考

ln: target ‘libcublas’ is not a directory

i.MX6Q kernel compilation for camera/video (gstreamer)

Invalid module format

银河麒麟4.0,在目标机上编译驱动,此时不是交叉编译,/lib/modules下面有几个文件夹,内核路径使用uname -r,否则报上述问题。

loading out-of-tree module taints kernel.

解析 Linux 内核可装载模块的版本检查机制

模块依据代码编写与编译时的位置可分:内部模块和外部模块,即 in-tree module 和 out-of-tree module,在内核树外部编写并构建的模块就是外部模块。

version magic '4.13.16 SMP mod_unload ’ should be '4.13.0-36-generic SMP mod_unload ’

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

make modules报错ln: target ‘/source’ is not a directory

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

版本号后面多加了个空格,导致语法错误,哎。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值