kernel-builder

Crates.iokernel-builder
lib.rskernel-builder
version0.4.0
sourcesrc
created_at2023-03-25 12:05:29.98161
updated_at2024-11-04 21:10:11.85037
descriptionselect kernel version from available sources, build and install
homepage
repositoryhttps://github.com/koopa1338/kernel-builder
max_upload_size
id820168
size39,955
koopa (koopa1338)

documentation

README

Kernel Builder

The Kernel Builder is a application written in rust that scans for available kernel sources in a configured directory and allows you to select which kernel to build, as well as install the modules, copy the compiled kernel to the boot partition, as well as generating the necessary initramfs.

Prerequisites

  • Basic knowledge of kernel configuration and compilation
  • to use the initramfs generation you have to enable the dracut feature and dracut has to be installed on your system

Installation

git clone https://github.com/koopa1338/kernel-builder
cd kernel-builder
cargo install --path .

or install it with cargo install from crates.io

cargo install kernel-builder

You also need a config.toml with the needed paths configured in $HOME/.config/kernel-builder/config.toml:

kernel = "/boot/vmlinuz-linux"
initramfs = "/boot/initramfs-linux" # Optional, only needed if `dracut` feature is enabled
kernel-config = "/usr/src/.config"
kernel-src = "/usr/src"

Usage

If correctly setup you should just run kernel-builder, it should ask for root permission if not alread run as root. You can override options by setting environment variables prefixed with KB_. For example to override the kernel path:

KB_KERNEL=/boot/efi/vmlinuz-linux-lts kernel-builder

Contributing

There is still room for improvements, so if you would like to contribute to the project, please feel free to submit a pull request or open an issue.

License

This script is released under the EUPL License. See the LICENSE file for more information.

Commit count: 71

cargo fmt