feat: download alpine linux-virt kernel for single --kernel

This commit is contained in:
2026-06-19 16:46:23 +02:00
parent 1d2031b3ca
commit 3188566b6e
6 changed files with 413 additions and 26 deletions
+7 -3
View File
@@ -33,9 +33,13 @@ pub struct Args {
#[arg(short = 'v', long)]
pub verbose: bool,
/// Boot with QEMU system emulation using specified kernel (extracts rootfs as disk image)
#[arg(long, value_name = "KERNEL_PATH")]
pub kernel: Option<PathBuf>,
/// Boot with QEMU system emulation (optionally specify kernel path, or omit to download default)
///
/// Examples:
/// --kernel Download and use the default Alpine linux-virt kernel
/// --kernel ./vmlinuz Use a specific kernel file
#[arg(long, value_name = "KERNEL_PATH", num_args = 0..=1)]
pub kernel: Option<Option<PathBuf>>,
/// Memory size for QEMU VM (only used with --kernel, e.g., 512M, 2G)
#[arg(short = 'm', long, default_value = "2G", value_name = "SIZE")]