我正在尝试编译一个新的自定义内核,这是我尝试使用 make --trace
安装模块时得到的结果:
Makefile:1202: target '_modinst_' does not exist
rm -rf /lib/modules/4.8.17-ARCH 4.1.1-RC1-g9ce0bd6/kernel
rm -f /lib/modules/4.8.17-ARCH 4.1.1-RC1-g9ce0bd6/source
mkdir -p /lib/modules/4.8.17-ARCH 4.1.1-RC1-g9ce0bd6/kernel
ln -s `cd . && /bin/pwd` /lib/modules/4.8.17-ARCH 4.1.1-RC1-g9ce0bd6/source
ln: target ‘4.1.1-RC1-g9ce0bd6/source’ is not a directory
make: *** [Makefile:1205: _modinst_] Error 1
据我所知,发生这种情况是因为我的工作目录的路径包含无效字符,但对我来说似乎没有错:
/home/student/ws_student/kernel/linux-4.8.17
这是我在 Makefile 中查找时得到的:
_modinst_:
@rm -rf $(MODLIB)/kernel
@rm -f $(MODLIB)/source
@mkdir -p $(MODLIB)/kernel
@ln -s `cd (srctree) && /bin/pwd` $(MODLIB)/source
p/s: 抱歉我的英语不好:P
最佳答案
这不是您的工作目录,而是包含“无效”字符(空格)的内核版本后缀:
ARCH 4.1.1-RC1-g9ce0bd6
正如您从 make --trace
输出中看到的那样,这会混淆 _modinst_
收据中的 shell 命令。
关于linux - 使用 make modules_install 并导致错误 target ' ' is not a directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42970756/