13 Commits

Author SHA1 Message Date
Simon Glass
3f94b241cd boot: Provide functions to set the bootm string-fields
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>
2025-08-09 12:04:30 -06:00
Simon Glass
c545f0762b boot: Update bootmeth read_file() to support reservation
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>
2025-08-09 12:04:29 -06:00
Simon Glass
3cac4dd7a4 emulation: Allow booting without CMDLINE
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>
2025-06-12 19:43:54 +00:00
Simon Glass
28548b43b6 emulation: Support zboot in the qfw bootmeth
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>
2025-06-12 19:43:54 +00:00
Simon Glass
90aa800f03 emulation: Support read_all() in qfw bootmeth
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>
2025-06-12 19:43:54 +00:00
Simon Glass
114dd14e38 bootmeth: Update the read_file() method to include a type
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>
2024-12-05 11:00:22 -07:00
Simon Glass
70a4982d4f doc: Add a description for bootmeth_qfw
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>
2024-07-19 13:54:54 +02:00
Tom Rini
03de305ec4 Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"
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>
2024-05-20 13:35:03 -06:00
Tom Rini
d678a59d2d Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
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>
2024-05-19 08:16:36 -06:00
Tom Rini
c4b646d436 boot: Remove <common.h> and add needed includes
Remove <common.h> from all "boot/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-06 15:05:04 -06:00
Simon Glass
3c2e531cb8 bootstd: Correct the name of the QEMU bootmeth
This does not relate to sandbox. Correct the name.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-07-16 23:13:17 +08:00
Simon Glass
79f663515a bootstd: Rename distro and syslinux to extlinux
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>
2023-05-13 09:52:32 -04:00
Simon Glass
9c6d57dc7e 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>
2023-02-06 13:04:53 -05:00