Hi I am Rupesh from India and I have brought a new system with AMD Ryzen zen3 5500GT and Asus prime b450 motherboard. I installed Arch Linux Operating System five months back updating, and using it without any problem. I thought to compile vanilla kernel source code optimized for my hardware but failed.
Actually yesterday I have updated my system and installed base-devel meta package and other packages like xmlto, kmod, inetutils, bc, libelf, git, cpio, perl, tar, xz.
I studied Arch Linux traditional kernel compilation and other guidelines to compile kernel. I tried to follow those steps.
At first I have downloaded kernel source code and from kernel.org
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.13.3.tar.xz
After that I have downloaded sign file from kernel.org
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.13.3.tar.sign
I tried to verify integrity of the kernel through the following commands.
unxz linux-6.13.3.tar.xz
gpg --verify linux-6.13.3.tar.sign linux-6.13.3.tar
I received error as public key not found.
I unpacked kernel source code
tar -xvf linux-6.13.3.tar.xz
After that I changed ownership of the directory recursively through the following command.
chown -R $USER:$USER linux-6.13.3
Then I have entered into the extracted directory.
cd linux-6.13.3
Before configuration I have updated cflags as follows
export KCPFLAGS=" -march=znver3 -O2 pipe"
export KCLAGS=" -march=znver3 -O2 pipe"
export CFLAGS=" -march=znver3 -O2 pipe"
export CPFLAGS=" -march=znver3 -O2 pipe"
After that I have created a configuration file which consists of only the modules loaded by old kernel through the following command.
make localmodconfig
I received some questions related to kernel configuration and I have selected default values by entering ENTER key.
After that I entered the following command.
make xconfig
In this gui configuration I done the following changes.
-
I selected amdgpu option to compile as module
-
I have selected the option DISABLE_DEBUG_INFO to Yes
-
I have added the string _Rupesh to Local_Version
-
I have selected append Local_Version to version to yes
-
I have disabled support for other processors like intel etc except AMD.
-
I have selected powersave in frequency scaling rather than performance.
I have saved and exited the configuration.
After that I issued the following command to make the kernel and modules.
make bzImage modules
After that I issued the following command to install modules
make modules_install
After that I have tried to install kernel to /boot through the following command.
make install.
Unfortunately I got the error as
Lilo not found.
So I have copied the bzImage to /boot directory manually through the following command.
cp arch/x86/boot/bzImage /boot/vmlinuz-linux-6.13.2_Rupesh
After that I have created initramfs image through the following command.
mkinitcpio -k 6.13.2 -g /boot/initramfs-linux-6.13.2_Rupesh.img
I have even copied the System.map file to the boot directory manually through the following commands.
cp System.map /boot/System.map-linux-6.13.2_Rupesh
ln -sf /boot/System.map-6.13.2_Rupesh /boot/System.map
After that I have updated my grub configuration through the following command.
grub-mkconfig -o /boot/grub/grub.cfg
After that I have installed the grub boot loader through the following command.
grub install /dev/nvmen101
I thought everything was done properly but when I tried to boot into the latest kernel I got kernel panic with blue screen.
I am using other Linux Operating Systems like Fedora 41, Debian Linux, Gentoo Linux. I made same things to configure and install the vanilla kernel and succeeded but in Arch Linux I failed.
In other Linux Operating Systems when I issue the command "make install" another tool like dracut is invoked and it takes the responsibility of installation of kernel compiled but in Arch Linux there's no way.
Kindly try to suggest what's wrong I have done and how to compile and install the vanilla kernel.
Regards,
Rupesh.