📦 vmlinux-builder is a lightweight TypeScript/Deno-based tool to fetch, configure, and build the Linux kernel vmlinux image for a given version — ideal for use with Firecracker microVMs or other kernel-related debugging/testing tasks.
- Builds any stable Linux kernel version (e.g.,
6.1,6.1.12,6.1.y) - Uses a custom
.configfor reproducible builds - Outputs a ready-to-use
vmlinux-X.Yfile - Written in TypeScript with Deno for better type safety and cross-platform compatibility
- Colored output using Chalk for improved readability
- Easily integrated into CI pipelines (e.g., GitHub Actions)
Ensure you have the following dependencies installed:
sudo apt-get install -y git build-essential flex bison libncurses5-dev \
libssl-dev gcc bc libelf-dev paholeInstall Deno if you haven't already:
curl -fsSL https://deno.land/install.sh | shOr follow the official Deno installation guide.
Clone the repo and provide a kernel version:
# Make the script executable
chmod +x build.ts
# Run with a kernel version
./build.ts 6.16.y
# Or run directly with Deno
deno run --allow-run --allow-read --allow-write --allow-env --allow-net build.ts 6.16.yNote: Ensure a valid .config file is present in the root directory before running.
6.1- Major.Minor version6.1.12- Specific patch version6.1.y- Latest from maintenance branchv6.1.12- Version with 'v' prefix (automatically normalized)
Building vmlinux for Linux kernel 6.16
vmlinux built successfully!
You can find the vmlinux file in /path/to/linux-stable/vmlinux-6.16.x86_64
This repo includes a GitHub Actions workflow (.github/workflows/ci.yml) that:
- Triggers on tag push (e.g.
git tag 6.16.y && git push origin 6.16.y) - Builds the vmlinux for that version
- Publishes the resulting
vmlinux-X.Yas a GitHub Release asset
The script is written in TypeScript and runs on Deno. Key features:
- Type-safe: Full TypeScript support with type checking
- Cross-platform: Works on Linux, macOS, and Windows (WSL)
- Modern: Uses Deno's native APIs for file operations and process management
- Colored output: Enhanced user experience with Chalk
This project is licensed under the MIT License. See the LICENSE file for details.