configure: make --with-kernel-dir optional

Currently it is mandatory to specify the kernel directory via
--with-kernel-dir, and this is used to generate default paths for the
kernel image, dtb, and dtc.

All of these paths can all be provided by the user, e.g. the kernel
image path can be provided by --with-kernel-image, and an alternative
dtc can be added to $PATH. When all of these are provided by the user,
there's no real need for the kernel directory.

Drop the requirement for --with-kernel-dir when other paths are provided
explicitly. This makes it easier to use the boot-wrapper with prebuilt
kernels, where we do not control the directory structure of the kernel
artifacts.

Signed-off-by: Akos Denke <akos.denke@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[Mark: simplify commit message, rework option parsing, always log kernel dir]
Link: https://lore.kernel.org/r/20240523114931.2093222-1-akos.denke@arm.com
1 file changed