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

Signed-off-by: Akos Denke <>
Reviewed-by: Andre Przywara <>
Signed-off-by: Mark Rutland <>
[Mark: simplify commit message, rework option parsing, always log kernel dir]
1 file changed