Reputation: 159
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.
Upvotes: 3
Views: 7037
Reputation: 11
I encountered the same problem, and solved it by following wliao's advice.
Problem description:
make distclean
;make
, make modules_install
and make install
, I tried to reboot with new kernel;error: /vmlinuz-5.3.0-rc6+ has invalid signature.
Solving steps:
cp -p /boot/config-3.10.0-957.27.2.el7.x86_64 .config
menuconfig
make menuconfig
make -j $(nproc)
sudo make modules_install
sudo make install
sudo grep ^menuentry /boot/efi/EFI/centos/grub.cfg | cut -d "'" -f2
sudo grub2-set-default 'CentOS Linux (5.3.0-rc6+) 7 (Core)'
Upvotes: 0
Reputation: 159
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!
Upvotes: 2
Reputation: 81704
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!
Upvotes: 0
Reputation: 3666
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.
Upvotes: 0