Skip to content

About

So tiny linux for testing virtualization (Virtual I/O aka VIRTIO) purpose

Resources

Stars

32 stars

Watchers

1 watching

Forks

Latest commit

 

History

62 Commits

Folders and files

Repository files navigation

PUI PUI Linux

puipui

This is the minimum linux for testing the apple virtualization framework (https://github.com/Code-Hex/vz). So I assumed to support architectures are only x86_64 and aarch64 (arm64).

This vmlinux is actually very very small other than linux distributions.

Since file size is very small in totally, I can do testing on the any CI with download them.

Kernel

The kernel is pinned to Linux 7.2.9 (stable). Both architectures use minimal configs in kconfig/; new kernel options take their upstream defaults.

What's supported:

  • IPv4 and IPv6 networking
    • IPv4 DHCP
    • IPv6 stateless address autoconfiguration (SLAAC)
  • VIRTIO (Virt device I/O)
    • virtio blk device
    • virtio console (via hvc drivers. e.g. console=hvc0)
    • virtio filesystem (virtfs)
    • af_vsock

Initramfs

BusyBox includes IPv6 support and ping6 for checking guest connectivity.

Our initramfs has a very simple init system controlled by fs/init script on this repository root. this script will do:

  • Mount any file systems (proc, sysfs and devfs).
  • Setup console which is an user specified by a console kernel parameter.
    • Find devices and add them to /etc/inittab and /etc/securetty.

You can use it with other linux distributions.

Usage

Build all

Build on Linux with GCC/binutils, make, flex, bison, bc, Perl, pkg-config, libelf development headers, curl, tar, xz, bzip2, gzip and cpio installed. The script downloads the target musl toolchains separately from the host tools.

$ ./puipui-linux-tool

Update Kernel config

Set kernver in puipui-linux-tool, then run:

$ ./puipui-linux-tool -u

This downloads the kernel source and missing toolchains, runs olddefconfig and savedefconfig for both architectures, and saves the minimal configs. An existing build-{arch}/linux-kernel/.config is preserved as the input; otherwise the checked-in config is used. Errors stop the command. Review the config diff, then build and boot both architectures.

Hack

This tool is used musl cross compiler. On arm64 environment the tool will be downloaded those pre build toolchains from https://github.com/Code-Hex/musl-cross-make-arm64

About

So tiny linux for testing virtualization (Virtual I/O aka VIRTIO) purpose

Resources

Stars

32 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages