Skip to content

abdul-royyaq/Shinobu-x86_64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shinobu-x86_64

Shinobu-x86_64 is a personal Linux kernel configuration based on the latest stable Linux kernel release. Customized for high performance stability and security with low latency. Offers high performance, stability, security, and responsiveness for desktop and gaming experiences.

Features Offered

  • Performance as default cpufreq governor.
  • Performance as default PCIe ASPM policy.
  • Pre-configure security kernel hardening.
  • SELinux & Apparmor isolation support.
  • Low latency desktop preemption model.
  • Build with fully ZSTD compression.
  • Non-core device driver as kernel module.
  • Compiler optimization level -O2.

Preparation Before Compilation

Install Tools for Build and Compilation

To build the Linux kernel, you need this following software installed on your system.

  • Debian/Ubuntu
sudo apt install git build-essential bc bison flex libncurses-dev libssl-dev libelf-dev zstd cpio
  • Arch/Manjaro
sudo pacman -S git base-devel bc ncurses openssl libelf zstd cpio
  • Fedora
sudo dnf install git @development-tools bc ncurses-devel zstd cpio

Set Environment Variable

Run this command every time you open a new shell session.

kver=6.11.0-shinobu

Fetch Linux Kernel Source

Fetch Linux 6.11 source code.

git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --depth 1 -b v6.11
sudo mv linux /usr/src/linux-$kver

Fetch kernel configuration

git clone https://github.com/abdul-royyaq/Shinobu-x86_64.git --depth 1
sudo mv Shinobu-x86_64 /usr/src/Shinobu-x86_64

Apply kernel configuration

Backup original linux logo & apply kernel configuration.

mv /usr/src/linux-$kver/drivers/video/logo/logo_linux_clut224.ppm /usr/src/linux-$kver/drivers/video/logo/logo_linux_clut224.backup.ppm
cp /usr/src/Shinobu-x86_64/.config /usr/src/linux-$kver/
cp /usr/src/Shinobu-x86_64/logo/shinobu_tired_1920x1051.ppm /usr/src/linux-$kver/drivers/video/logo/logo_linux_clut224.ppm

*For 1366x768p resolution can use shinobu_tired_1366x768.ppm.

cp /usr/src/Shinobu-x86_64/logo/shinobu_tired_1366x768.ppm /usr/src/linux-$kver/drivers/video/logo/logo_linux_clut224.ppm

**you can change the boot splash logo, see logo folder for other "kawaii" shinobu splash screen.

Entering kernel source directory

cd /usr/src/linux-$kver

Modify kernel configuration

Modify kernel configuration if you wish (optional).

make menuconfig

Kernel Compilation

Kernel compilation with all CPU cores.

make LOCALVERSION= -j$(nproc)

Kernel Installation

Installing Linux kernel.

sudo make -j$(nproc) modules_install 
sudo cp arch/x86/boot/bzImage /boot/vmlinuz-$kver-x86_64
sudo cp System.map /boot/System.map-$kver-x86_64

Kernel Documentation

Installing kernel documentations (optional).

sudo install -d /usr/share/doc/linux-$kver-x86_64
sudo cp -r Documentation/* /usr/share/doc/linux-$kver-x86_64

Generate Initramfs

Generate Initramfs Images.

sudo mkinitcpio -z zstd -k $kver-x86_64 -g /boot/initramfs-$kver-x86_64.img || sudo dracut --zstd --kver $kver-x86_64 /boot/initramfs-$kver-x86_64.img

Update Bootloader

Generate GRUB2 Configuration

GRUB2 bootloader is used in almost all modern Linux Distros, including Debian, ArchLinux, and Fedora.

  • Debian/Ubuntu
sudo update-grub
  • Arch/Manjaro
sudo grub-mkconfig -o /boot/grub/grub.cfg
  • Fedora
sudo grubby --title="$(cat /etc/os-release | grep 'NAME' | sed -e 's/NAME="\(.*\)"/\1/' | head -1) ($kver-x86_64) $(cat /etc/os-release | grep 'VERSION' | sed -e 's/VERSION="\(.*\)"/\1/' | head -1)"--add-kernel=/boot/vmlinuz-$kver-x86_64 --copy-default

Uninstall Kernel

If you want to uninstall this Linux kernel.

kver=6.11.0-shinobu
sudo rm -r /boot/*$kver-x86_64*
sudo rm -r /lib/modules/$kver-x86_64
sudo rm -r /usr/share/doc/linux-$kver-x86_64
sudo update-grub || sudo grub-mkconfig -o /boot/grub/grub.cfg || sudo grubby --remove-kernel=/boot/vmlinuz-$kver-x86_64

*Before uninstall this kernel, make sure there is another kernel installed.

License

This project is licensed under the GPL v2, material inside the logo folder is licensed under CC0, Shinobu is a character from Kimetsu no Yaiba written by Koyoharu Gotouge, The Linux Kernel is licensed under GPL v2, and Linux is a registered trademark of Linus Torvalds.