Znalostní Báze

Informace o sdružení vpsFree.cz, návody a nejčastější dotazy.

Uživatelské nástroje

Nástroje pro tento web


Kernel hacking

Fire up your NixOS workhose and let's get to work:

# Fetch all the goodies
git clone -b devel https://github.com/vpsfreecz/vpsadminos
cd vpsadminos && git clone -b vpsadminos_dev https://github.com/vpsfreecz/nixpkgs

# set $NIX_PATH so that we have <nixpkgs/..> and <vpsadminos/...> both working:
export NIX_PATH="nixpkgs=`pwd`/nixpkgs:vpsadminos=`pwd`"

# Create temporary unpack path and jump to it
mkdir -p ~/tmp/kernel-dev; cd ~/tmp/kernel-dev

# Enter nix-shell with the package environment
nix-shell -E "with import <nixpkgs> {}; (callPackage <vpsadminos/os/packages/linux/default.nix> {}).overrideAttrs(old:  {nativeBuildInputs=old.nativeBuildInputs ++ [ pkgconfig ncurses ];})"

# unpack the sources

# go to the unpacked dir
cd linux-*

# to apply currently defined patches

# now you can generate new .config with
make menuconfig

# and run build

To be able to generate patches easily cloning the Linux kernel repository and checking out the correct tag might work better for you - you can still use nix-shell command from the previous section to create build environment.

navody/vps/vpsadminos/hacking.txt · Poslední úprava: 2018/09/06 15:09 autor: rmarko