/vlinux

linux patch for vorteil.io

GNU General Public License v2.0GPL-2.0

vlinux

This repository contains the changes to linux kernel. It contains patches for the different Linux versions for vorteil.io.

These patches are applied during the build phase of vbundler and are based on a simple naming convention: 0001-vorteil-vX.X.X.patch

To use a different Linux version for a vorteil.io bundle change the following line in the Makefile of the vbundler project:

LINUX     := 'v5.8.8'

For more information read the documentation for vbundler.

Changes

The majority of changes are on module level and can be found in drivers/vorteil:

bootdev.c: Creates the file /proc/bootdev which stores the name of the root device (e.g. /dev/sda) which can be different for different cloud environments. It is consumed by vinitd during startup.

disk.c: Finds the root device based on a static PARTUUID used by vorteil.io tools and stores it for /proc/bootdev.

vlogfsfs.c, vlogfs_ops.c: Used for redirects of log files. It is based on the simple ram filesystem. Every write is redirected in a circular buffer. This data is read and redirected by fluentbit included in vorteil.io virtual machines if logging is configured.

vorteilfs.c: Simple tar filesystem serving all files in the bundle for that vorteil.io virtual machine. Contains at least Linux and vinitd.

vtty.c: Manages the stdout of vorteil.io virtual machines. It can write to tty, ttyS and fluentbit in parallel. Configuration is via ioctls with valid values 0 (stdout, serial), 1 (stdout), 2 (serial), 3 (no output). The ioctl value 4 is independent from the default output and enables fluentbit redirects of stdout.

Two additional changes have been made:

init/main.c (function kernel_init): Mounts the vorteil filesystem under /vorteil.

init/do_mounts.c (function mount_root): Changes the root mount from /dev/root to the name of the actual root device, e.g. /dev/sda2.