# supermachine-kernel-x86-64
Pre-built **x86_64** guest assets for [supermachine](https://crates.io/crates/supermachine)'s
KVM backend, bundled inside the crate so no network is needed at build time.
You normally **don't depend on this crate directly** — depend on the
[`supermachine-kernel`](https://crates.io/crates/supermachine-kernel) facade,
which re-exports the correct architecture's crate by `target_arch`. Cargo only
downloads the sub-crate matching the build target, so an x86_64 build pulls
only this crate, and an aarch64 build pulls only `supermachine-kernel-aarch64`.
## What's inside
| Kernel | `KERNEL_BYTES` | Minimal-config Linux 6.12 x86_64 `bzImage`. `MODULES=n`; virtio-MMIO (+`CMDLINE_DEVICES`), virtio-blk, virtio-vsock, squashfs, overlayfs, ext4, 8250 console all built in. |
| busybox | `BUSYBOX_BYTES` | Static x86_64 busybox; the bake stages it into the agent initramfs for the overlayfs + `switch_root` container setup. |
| Agent | `SUPERMACHINE_AGENT_BYTES` | Static x86_64-musl in-VM control agent; PID 1 inside the container, serves `exec`/control RPCs over vsock. |
There is **no `init-oci` or `smpark.ko`** here (those are aarch64/HVF-only): the
KVM backend builds the writable container rootfs (overlayfs + `switch_root`)
directly in the agent initramfs's generated init.
## Rebuilding the kernel
See `crates/supermachine-kernel/kvm-x86_64-build.sh` for the reproducible
minimal-config recipe. The x86_64 `bzImage` is self-compressed, so the config
is minimized at the source to fit under the crates.io ~10 MiB cap; `xz -k -9`
the outputs into this directory (`kernel.xz`, `busybox.xz`,
`supermachine-agent.xz`) to publish.
## License
`Apache-2.0 AND GPL-2.0-only AND MIT`. The kernel and busybox are
GPL-2.0-only; see `NOTICE` for the GPL §3(b) written offer for kernel source.