qemu: Add a bootmeth for qfw

This supports reading a kernel and ramdisk from qfw, then loading it with
either the booti or bootz commands.

For now this uses the existing booti and bootz commands, rather than
trying to call that functionality directly (e.g. do_bootm_states()). It
does not require the HUSH parser though, which helps a little with size.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2023-01-28 15:00:25 -07:00 committed by Tom Rini
parent dd4bd9ad86
commit 9c6d57dc7e
3 changed files with 104 additions and 1 deletions

View file

@ -508,7 +508,7 @@ int bootflow_iter_check_blk(const struct bootflow_iter *iter)
enum uclass_id id = device_get_uclass_id(media);
log_debug("uclass %d: %s\n", id, uclass_get_name(id));
if (id != UCLASS_ETH && id != UCLASS_BOOTSTD)
if (id != UCLASS_ETH && id != UCLASS_BOOTSTD && id != UCLASS_QFW)
return 0;
return -ENOTSUPP;