命令“make module”不构建所有模块
我运行的是 Fedora 14 64 位。
我从 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 克隆了内核源代码树
大约一周前,我编译并升级了内核,从 2.6.35 到 2.6 .39,一切进展顺利,我所做的一切都非常直接:
make menuconfig
make oldconfig
make -j8
make modules_install && install
然后我添加了一个虚拟系统调用(我在 Robert Love 的《Linux 内核开发》一书中遵循了这一点)并尝试再次编译,它编译了内核很好,但是当我发出:
[root@xps420 Kernel]# make modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
Building modules, stage 2.
MODPOST 4 modules
它只制作了4个模块,之前有超过2000个模块。
我认为是我的虚拟系统调用导致了问题,我撤消了所有更改并重试,结果相同。
同样,我采取的步骤是:
make menuconfig
make oldconfig
make -j8
make modules ----> suspicious
我不确定是什么原因造成的。
编辑: 更多信息,我在重新编译之前运行 make clean
,但它仍然只生成了 4 个模块。 有一次我确实做了modules_install
,并检查了/lib/modules/[ver]
,只有这4个模块被复制到那里。我应该停在那里,但我还是继续运行 make install
,它安装了内核,但无法启动。
编辑: 我刚刚从 kernel.org 下载了稳定版本(2.6.39.1),在执行上述步骤后,发生了同样的事情。这很奇怪。也许我的系统中的某些东西把这个搞砸了:(希望有人已经遇到这个问题并提供一些线索。
I'm running Fedora 14 64 bits.
I cloned the kernel source tree from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
About a week ago I compiled and upgraded the kernel from 2.6.35 to 2.6.39, it went pretty smoothly, all I did was very straight-forward:
make menuconfig
make oldconfig
make -j8
make modules_install && install
Then I added a dummy system call (I was following this with the Linux Kernel Development book by Robert Love) and tried to compile again, it compiled the kernel fine, but when I issued:
[root@xps420 Kernel]# make modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
Building modules, stage 2.
MODPOST 4 modules
it only made 4 modules, previously there were over 2000 modules.
I thought it was my dummy system call that was causing the problem, I undid all the changes and tried again, with the same result.
Again, the steps I took were:
make menuconfig
make oldconfig
make -j8
make modules ----> suspicious
I'm not sure what is causing this.
EDIT:
A little more info, I run make clean
before recompiling, but it still only made 4 modules.
At one point I did make modules_install
, and checked /lib/modules/[ver]
, only those 4 modules were copied there. I should have stopped there but I went ahead and run make install
anyway, it installed the kernel, but was unable to boot with it.
EDIT:
I just downloaded the stable release (2.6.39.1) from kernel.org, after going thru the steps above, the same thing happened. This is strange. Maybe something in my system is screwing this up :( Hopefully someone has run into this and shed some light.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
好吧,在喝了几杯咖啡并进行了大量谷歌搜索之后,我还不知道这一切是如何工作的,但是看起来当我第一次升级内核时,.config 基于正在运行的内核的配置,并且它包含所有需要的模块,因此运行良好?然后不知何故,在后续编译中,几乎所有模块都没有在 .config 中配置(除了上面提到的 4 个)。长话短说,我使用旧的 .config 并运行 menuconfig 进行其他更改,它似乎解决了我的问题。谢谢!
Ok, after several cups of coffee and lots of googling, I don't know how this all works yet, but looks like when I first upgraded the kernel, the .config was based on the running kernel's config and it includes all the needed modules, therefore it ran fine? Then somehow on the subsequent compilations almost all of the modules were not configured in the .config (except the 4 mentioned above). Long story short, I used the old .config and ran menuconfig to make additional changes, it seems to solve my problem. Thanks!
尝试
make V=1 ...
以获得详细输出。甚至
V=2
。Try
make V=1 ...
for verbose output.Or even
V=2
.如果不执行“make clean”,之前的编译结果仍然存在。只有受您更改的代码影响的模块才会被重建。
If you don't do a "make clean", the previous compilation results are still there. Only modules affected by the code you changed will be rebuilt.
也许只有这四个模块依赖于您接触的文件。如果您想确认这一点,请执行
make clean
然后再次尝试构建,看看是否没有再次编译所有模块。当然,时间会更长!Perhaps only those four modules have a dependency on the files you touched. If you'd like to confirm this, do a
make clean
and then try building again, and see if you don't get all the modules compiling again. Of course, it'll take a lot longer!我也遇到了同样的问题,按照wliao的建议解决了。
问题描述:
make distclean
进行了全面清理;make
、make module_install
和make install
之后,我尝试使用新内核重新启动;错误:/vmlinuz-5.3.0-rc6+ 签名无效。
解决步骤:
menuconfig
配置附加设置I encountered the same problem, and solved it by following wliao's advice.
Problem description:
make distclean
;make
,make modules_install
andmake install
, I tried to reboot with new kernel;error: /vmlinuz-5.3.0-rc6+ has invalid signature.
Solving steps:
menuconfig