Linux Environment

April 1, 2026 ยท View on GitHub

This folder provides a helper script to download and prepare a local Linux source tree for module builds.

Script

download-and-prepare.sh

Default behavior prepares Linux 6.12.66 using linux-env/config-6.12.66.

Usage

From repo root:

./linux-env/download-and-prepare.sh --version 6.12.66 --force-config

Optional URL override:

./linux-env/download-and-prepare.sh --version 6.12.66 --url https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.12.66.tar.xz

What It Does

  1. Downloads linux-<version>.tar.xz into linux-env/downloads/ (if missing)
  2. Extracts into ./linux-<version>
  3. Applies linux-env/config-<version>
  4. Runs olddefconfig
  5. Runs modules_prepare

Prepared tree is then usable as module build directory.