From 361fd7cd5a23d5a6fbe2c3f3297f3d90d19e5149 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Wed, 10 Nov 2021 18:29:31 +0000 Subject: [PATCH] linux refinements --- _posts/2021-11-06-linux-contribution.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/_posts/2021-11-06-linux-contribution.md b/_posts/2021-11-06-linux-contribution.md index 47612cd..1d905c6 100644 --- a/_posts/2021-11-06-linux-contribution.md +++ b/_posts/2021-11-06-linux-contribution.md @@ -35,11 +35,23 @@ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git {% highlight bash %} pacman -S flex base-devel xmlto kmod inetutils bc libelf git cpio perl tar xz {% endhighlight %} -- Generate a configuration file +- Copy configuration of archlinux (optional: also [use modprobed-db to remove unnecessary modules](https://wiki.archlinux.org/title/Kernel/Traditional_compilation#Default_Arch_configuration)) {% highlight bash %} -make nconfig +zcat /proc/config.gz > .config {% endhighlight %} - Make! {% highlight bash %} make {% endhighlight %} +- Install the newly built Kernel +{% highlight bash %} +make install_modules +VERSION=5.10 +cp -v arch/x86_64/boot/bzImage /boot/vmlinuz-linux${VERSION} +mkinitcpio -k linux-${VERSION} -g /boot/initramfs-linux${VERSION}.img +{% endhighlight %} +- Run grub-mkconfig to add a menu option for this new kernel +{% highlight bash %} +grub-mkconfig -o /boot/grub/grub.cfg +{% endhighlight %} +- Reboot and choose the new kernel (might be under "Advanced" in the bootloader)