Hikari X86 64 Save Abandoned

:bridge_at_night: Personal Linux kernel configuration (based on Xanmod patchset)

Project README

5.19.10-hikari-x86_64

optimized for multitask under extreme loads, see cfs-zen-tweaks(-openrc)

Featured configuration/tweaks
  • Use LRNG framework to provide sufficient entropy during boot as well as in virtual environments and SSDs
  • Use balanced 500Hz timer frequency for fast desktop interactivity and smoothness with energy-efficients
  • Use Clang/LLVM toolchain with O3 optimization for processor family x86-64-v3 and ThinLTO by default
  • Majority use LZ4 compression algorithm for fastest de/compression speeds with low-compression ratio
  • Use BFQ I/O scheduler which guarantees high-system, applications responsiveness, and low-latency
  • Use performance governor by default for max CPU speed, change if too high energy consumptions
  • Disabled unused features like 5-level page tables, debugging, kexec, kprobes, NUMA, Xen, etc.
  • Enabled F2FS (SSD) and EXT4 (HDD) as built-in which optimized, and BTRFS as module
  • Enabled AMD-specific or Intel-specific features, other SoCs are all disabled
  • Enabled AMD-pstate driver for schedutil and ondemand governor
  • Enabled zstd module compression support by default (KMOD)
  • Enabled Google's BBRv2 TCP congestion control by default
  • Enabled New Paragon's Software NTFS3 driver
  • Full-support EFI stub w/o initramfs
  • Many more as in xanmod.org

This configuration based on Linux sources with Xanmod patchset + Gentoo patches from src_prepare-overlay.

GENERAL LINUX KERNEL COMPILATION WITH GCC TOOLCHAIN

# Copy my hikari configuration as default config.
cp -v .config_hikari .config

# Configure via beautiful curses interface.
ionice -c2 -n0 make -j$(nproc) nconfig

# Build Linux kernel.
ionice -c2 -n0 make -j$(nproc)

# Install kernel modules.
ionice -c2 -n0 make -j$(nproc) modules_install

# Install bzImage, known as vmlinuz.
ionice -c2 -n0 make -j$(nproc) install

GENERAL LINUX KERNEL COMPILATION WITH LLVM TOOLCHAIN

# Copy my hikari configuration as default config.
cp -v .config_hikari .config

# Configure via beautiful curses interface.
ionice -c2 -n0 make -j$(nproc) LLVM=1 LLVM_IAS=1 nconfig

# Build Linux kernel.
ionice -c2 -n0 make -j$(nproc) LLVM=1 LLVM_IAS=1

# Install kernel modules.
ionice -c2 -n0 make -j$(nproc) LLVM=1 LLVM_IAS=1 modules_install

# Install bzImage, known as vmlinuz.
ionice -c2 -n0 make -j$(nproc) LLVM=1 LLVM_IAS=1 install

Estimated may be longer than the GCC toolchain, but significally improving performance by using ThinLTO.

Read more at Linux Kernel documentation. See also Gentoo Wiki.

HOW TO CONVERT MY OWN FRAMEBUFFER LOGO?

Simply install netpbm then convert your own logo, an example .png file into 224 24-bit colors ASCII pixmap.

Generally, the Linux kernel framebuffer logo size is 80x80 pixels, but if you want to adjust the full screen size, you have to set up your logo with size that matches your screen resolution like 1366x768.

Below will replace the default Tux logo with our custom logo. Initially I made a patch, but I think it's impractical because it's enough to replace then build the kernel. Created linucc224 for auto-patching. :tada:

pngtopnm /path/to/your_logo.png | ppmquant -fs 223 | pnmtoplainpnm > logo_linux_clut224.ppm

doas cp -fv logo_linux_clut224.ppm /usr/src/linux/drivers/video/logo/logo_linux_clut224.ppm

To make the framebuffer logo appears on boot, ensure to use loglevel=4 in the kernel parameters.

NOTE

If you're using custom framebuffer logo like mine.

The framebuffer logo must be cleared before init runs, you can modify your init. I've only ever tried on runit and sysvinit+openrc, other than that I don't know. For example sysvinit+openrc on Gentoo/Linux, I created wrapper script to run curses clear command before executing openrc sysinit. See my inittab.

Below is an example of my trick ...
Run the following commands as root.

install -m755 /dev/stdin /sbin/localh3art-init << "SYSINIT"
#!/bin/sh

G='\033[1;32m' W='\033[1;37m' R='\033[1;31m' NC='\033[0m'

printf ' %b ' "${G}* ${W}Booting with ${R}$(uname -r)"

for S in 1 2 3 4; do
    [ "$S" -gt 1 ] || continue
    printf '%b' "${W}.${NC}"
    sleep .1s
done

clear

exec /sbin/openrc sysinit
SYSINIT
sed -e '/si::sysinit:/s|openrc sysinit|localh3art-init|' -i /etc/inittab

Or, if you're actually don't care about framebuffer logo ...
Simply enable this to disable the framebuffer logo that appears on boot.

CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y

Device Drivers 🡲 Graphics support 🡲 Console display driver support

GENERATING INITRAMFS (OPTIONAL)

DRACUT

Adjust version of the kernel that you build. Below is an example, run the following commands as root.

dracut --kver 5.19.10-hikari-x86_64 /boot/initramfs-5.19.10-hikari-x86_64.img --force

See also my dracut.conf. Read more at Gentoo Wiki.

EFI STUB EXAMPLES

You must have separate /boot volume, type vfat (12/16/32), run one of the two commands below as root.

WITH INITRAMFS

efibootmgr --create \
           --part 1 \
           --disk /dev/sda \
           --label 'GENTOO.hikari-x86_64' \
           --loader '\vmlinuz-5.19.10-hikari-x86_64' \
           -u 'loglevel=4 initrd=\initramfs-5.19.10-hikari-x86_64.img'

WITHOUT INITRAMFS

efibootmgr --create \
           --part 1 \
           --disk /dev/sda \
           --label 'GENTOO.hikari-x86_64' \
           --loader '\vmlinuz-5.19.10-hikari-x86_64' \
           -u 'root=PARTUUID=13992175-d060-1948-b042-ade29f8af571 rootfstype=f2fs rootflags=gc_merge,flush_merge,data_flush,checkpoint_merge,compress_algorithm=lz4,compress_extension=*,compress_chksum,compress_cache,atgc loglevel=4'

SHOW DETAILED ENTRY

efibootmgr -v

DELETING ENTRY

efibootmgr -BbXXXX

ACKNOWLEDGEMENTS

Open Source Agenda is not affiliated with "Hikari X86 64" Project. README Source: owl4ce/hikari-x86_64

Open Source Agenda Badge

Open Source Agenda Rating