pub fn find_image(
kernel_dir: Option<&str>,
release: Option<&str>,
) -> Option<PathBuf>Expand description
Find a bootable kernel image on the host.
kernel_dir: explicit kernel directory (e.g. from KTSTR_KERNEL).
When set, only that directory is searched — no fallback to local
build trees or host paths.
release: kernel release string (e.g. from uname -r). When
None, falls back to reading /proc/sys/kernel/osrelease — the
same value the kernel exposes via the uname(2) syscall, without
the shell-out cost.
Without kernel_dir, searches local build trees (./linux,
../linux), /lib/modules/{release}/build, then host paths
(/lib/modules/{release}/vmlinuz, /boot/vmlinuz-{release},
/boot/vmlinuz).