Provide some helper functions which can set the string value of a field
in struct bootm_info from an address.
Signed-off-by: Simon Glass <sjg@chromium.org>
In some cases we don't have a particular address to read into so would
like one reserved. Adjust the read_file() method to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Use programmatic boot so that it is possible to boot without
CONFIG_CMDLINE enabled.
Series-to: u-boot
Cover-letter:
emulation: Improve support for booting from QFW
U-Boot supports booting Linux from QFW which means that the kernel and
any initrd are provided on the QEMU command line instead of being found
in boot media.
This series improves this support in several ways:
- Enhances bootstd to implement 'bootflow read', thus allowing the
files to be loaded and inspected (with potential cmdline changes)
before booting
- Updates bootstd to use programmatic boot, so that it works even when
CONFIG_CMDLINE is disabled
- Expands build-qemu script to allow providing cmdline and root disk
It also includes a rough script to time U-Boot when running QEMU with
kvm, making use of the qemu-boot-time repo:
https://github.com/stefano-garzarella/qemu-boot-time.git
END
Signed-off-by: Simon Glass <sjg@chromium.org>
The zboot option is used on x86, so add support for it. Use the
programmatic boot API rather than building a command to run, so that it
can work without CONFIG_CMDLINE
For now the other boot options still use the cmdline.
Signed-off-by: Simon Glass <sjg@chromium.org>
It is useful to be able to read the images into memory without actually
booting the kernel. This allows the cmdline to be changed using
'bootflow cmd', for example. Implement this for the QFW bootmeth.
Signed-off-by: Simon Glass <sjg@chromium.org>
We want to record the type of each file which is loaded. Add an new
parameter for this, to the read_file() method. Update all users.
Make bootmeth_common_read_file() store information about the image that
is read.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Add documentation for the qfw bootmeth.
Fix up the compatible string to drop the 'extlinux' part, which is not
relevant to this bootmeth.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.
Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.
This reverts commit c8ffd1356d, reversing
changes made to 2ee6f3a5f7.
Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
We use the terms 'distro' to mean extlinux but they are not really the
same. 'Distro' could refer to any method of booting a distribution,
whereas extlinux is a particular method.
Also we sometimes use syslinux, but it is better to use the same term in
all cases.
Rename distro to syslinux and also update bootstd uses of syslinux to use
extlinux instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
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>