我正在攻击linux-4.13.4。我找到了一些关于如何编译和创建内核的帖子,比如this one。
我不确定我们需要做什么
sudo update-initramfs -c -k 4.13.4
sudo update-grub
后
sudo make -j 32 && sudo make modules_install -j 32 && sudo make install -j 32
因为我发现当我在日志结束时运行sudo make -j 32 && sudo make modules_install -j 32 && sudo make install -j 32
时
...
...
INSTALL sound/usb/snd-usbmidi-lib.ko
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
INSTALL virt/lib/irqbypass.ko
INSTALL sound/usb/usx2y/snd-usb-us122l.ko
DEPMOD 4.13.4
sh ./arch/x86/boot/install.sh 4.13.4 arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.4 /boot/vmlinuz-4.13.4
update-initramfs: Generating /boot/initrd.img-4.13.4 <----
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/vboxadd 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.4 /boot/vmlinuz-4.13.4
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.4 <----
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.13.4.old
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-28-generic
Found initrd image: /boot/initrd.img-4.10.0-28-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
如果我再次运行sudo update-initramfs -c -k 4.13.4
和sudo update-grub
,日志似乎与上一个的最后一部分相同
wxf@wxfvbox:~/kernelSources/linux-4.13.4$ sudo update-initramfs -c -k 4.13.4
update-initramfs: Generating /boot/initrd.img-4.13.4
wxf@wxfvbox:~/kernelSources/linux-4.13.4$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.4
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.13.4.old
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-28-generic
Found initrd image: /boot/initrd.img-4.10.0-28-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
update-initramfs
之后运行update-grub
和sudo make && sudo make modules_install && sudo make install
吗?