fix(kernel): fall back to linux-lts where linux-virt is absent
Alpine does not build the linux-virt flavor for riscv64, so --kernel without a path failed there with 'linux-virt package not found'. Scan the APKINDEX once for both flavors and prefer linux-virt, taking linux-lts when the virt flavor is missing. Also store the cached kernel decompressed: riscv64 and aarch64 ship their image gzipped (Image.gz), and QEMU's riscv -kernel loader understands only ELF, uImage and raw images, so the gzipped image hung at boot after the OpenSBI banner.
This commit is contained in:
@@ -36,7 +36,8 @@ pub struct Args {
|
||||
/// Boot with QEMU system emulation (optionally specify kernel path with =PATH, or omit to download default)
|
||||
///
|
||||
/// Examples:
|
||||
/// --kernel Download and use the default Alpine linux-virt kernel
|
||||
/// --kernel Download and use the default Alpine kernel
|
||||
/// (linux-virt, or linux-lts on riscv64)
|
||||
/// --kernel=./vmlinuz Use a specific kernel file
|
||||
///
|
||||
/// The kernel path must use `=` syntax: with `--kernel ./vmlinuz` the
|
||||
|
||||
Reference in New Issue
Block a user