Put this in the helper so that we can (later) have it show the correct
error when the virtiofs daemon fails.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the OS disk conflicts with the boot disk used to hold the
app (or payload). Number the OS disk after that.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the root disk conflicts with the boot disk used to hold the
app (or payload). Use virtio for this disk and number the others after
that.
Signed-off-by: Simon Glass <sjg@chromium.org>
There is no harm in always having this device enabled, thus reducing the
number of script arguments. Enable RNG always.
Series-to: concept
Series-version: 2
Series-changes: 2
- Use /dev/urandom instead, dropping the now-unnecessary arguments
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
The current mechanism uses a completely separate build rule for each
file which must be built with system headers.
Before adding any more files, adjust the scheme so that the flags are
handled in the common Makefile, with sandbox simply listing the files
affected.
Signed-off-by: Simon Glass <sjg@chromium.org>
Q35 is newer and has a native PCI Express bus. Move to using this by
default.
Update the QEMU script to select the correct machine.
Signed-off-by: Simon Glass <sjg@chromium.org>
EFI has a Boot Graphics Record Table which can be used to show a logo
when booting up and shutting down.
Add support for adding this to the image, using a U-Boot logo which
includes the name, since many people will be unfamiliar with the logo.
Signed-off-by: Simon Glass <sjg@chromium.org>
This rule assumes that any .bmp file relates to the logo. We want to be
able to add a second BMP in some cases, so update the rule to match
a filename ending in '_logo.bmp'
Signed-off-by: Simon Glass <sjg@chromium.org>
Sometimes it is useful to provide several disks to QEMU. Update the -d
flag to support this. It can be used like this:
scripts/build-qemu -d root.img mmc6.img -r
Signed-off-by: Simon Glass <sjg@chromium.org>
Sometimes it is useful to use SCSI instead of the plain virtio. Add a
-S option to connect the root disk via SCSI.
Drop the -S for --sct-seq since it is a less common option.
Signed-off-by: Simon Glass <sjg@chromium.org>
The build-efi and build-qemu scripts have common code to set up the root
disk. Move it to build_helper to avoid duplication.
Signed-off-by: Simon Glass <sjg@chromium.org>
Providing a kernel, initrd and related options are useful in the EFI app
too, so move them into the common code.
Signed-off-by: Simon Glass <sjg@chromium.org>
We want to use the -K option for providing a kernel via QEMU's QFW
interface. Perhaps we could use the same option and require that the
file be provided always, but that is less convenient.
For now, rename the option.
Signed-off-by: Simon Glass <sjg@chromium.org>
It seems better to specify the arch rather than using somewhat cryptic
flags. The build-qemu scripts uses -a (for Architecture) so do the same
for build-efi
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This is not really needed, since it is the default and we have -p to
select the payload. It also conflicts with -a in build-qemu
Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
The two main QEMU scripts (build-efi and build-qemu) share some common
arguments, so put them in the common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
If linker lists have inconsistent alignment it can cause strange
runtime errors. Add a script that can detect and report these problems.
Signed-off-by: Simon Glass <sjg@chromium.org>
Qboot is a good demonstration of the fastest possible boot on x86. Add
a way to run Qboot instead of U-Boot, for easy comparison.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a -C flag to enable the serial console when booting Linux. This is
only supported on x86, but a future -c flag might perhaps support other
archs.
Signed-off-by: Simon Glass <sjg@chromium.org>
QEMU provides a special way to pass a kernel and a devicetree via the
QFW interface. Add -K and -I options to provide these.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the -bios option is used to specify the firmware, but this does
not allow settings to be adjusted.
Use the pflash method instead, with a separate variables file, so that
settings can be changed.
Add a -g option to tell QEMU to stop and wait for gdb to connect.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a -v option for verbose output. For now this just shows the QEMU
cmdline before starting it. This allows the user to start it separately,
perhaps tweaking the args.
Signed-off-by: Simon Glass <sjg@chromium.org>
Bring this script into line with build-qemu so an OS and release can be
specified. As with that script, only Ubuntu is supported for now.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is a useful feature when booting the EFI app, so add this option to
the build-efi script too, matching the same option in build-qemu
Signed-off-by: Simon Glass <sjg@chromium.org>
This provides a few clean-ups:
- sort the imports correctly
- sort the arguments (-v is in the wrong place)
- use os_arch for the OS architecture, to match build-efi
Signed-off-by: Simon Glass <sjg@chromium.org>
Ilias Apalodimas <ilias.apalodimas@linaro.org> says:
Last time the kbuild scripts were synced with the Linux kernel was on the
4.20 release. Updating directly to 6.x makes the diff difficult to read, so
let's do the changes incrementally and bump to 5.1 first.
Since the number of commits is big, I am splitting this in multiple series.
This one includes most of the commits for Makefile.build,
Makefile.lib and some from Makefile.
commit eeb5687a7139649e ("kbuild: add -Werror=strict-prototypes flag unconditionally")
commit 3812b8c5c5d5 ("kbuild: make -r/-R effective in top Makefile for old Make versions")
commit b421b8a6cb87 ("kbuild: remove unused archmrproper")
commit 1a49b2fd8f58 ("kbuild: strip whitespace in cmd_record_mcount findstring")
commit 88110713ca9dfb ("kbuild: hardcode genksyms path and remove GENKSYMS variable")
commit 1d8001ef358 ("kbuild: generate modules.order only when CONFIG_MODULES=y")
commit 45c4372d00 ("kbuild: refactor quiet_modtag")
commit b39a691617e4 commit ("kbuild: remove redundant quiet_modtag for $(obj-m)")
commit 5439f09f488f ("kbuild: remove redundant 'set -e' from cmd_* defines")
commit e5d289100d3a ("kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule")
commit 3a2429e1faf4 ("kbuild: change if_changed_rule for multi-line recipe")
commit ee3e46b7efd2 ("kbuild: refactor modversions build rules")
commit 4317ee3b6a5e ("kbuild: remove redundant 'set -e' from sub_cmd_record_mcount")
commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files")
commit 898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib")
commit b79c6aa6a1f1 ("kbuild: remove unnecessary in-subshell execution")
commit afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)")
commit ecbd10d90e94 ("kbuild: simplify rules of data compression with size appending")
commit 58156ba4468f ("kbuild: skip 'addtree' and 'flags' magic for external module build")
commit 172caf1993b7 ("kbuild: remove redundant target cleaning on failure")
commit f3fd4a3f3a38 ("kbuild: remove redundant 'set -e' from filechk_offsets")
commit a2237fec1e06 ("kbuild: Enable dtc graph_port warning by default")
commit 70523a3ce5ff ("kbuild: disable dtc simple_bus_reg warnings by default")
commit e4aca4595005 ("kbuild: de-duplicate fixdep usage")
Link: https://lore.kernel.org/r/20250520052153.307194-1-ilias.apalodimas@linaro.org
Plumb in the ability for U-Boot proper to accept an incoming standard
passage from a previous phase, such as SPL or TF-A. This allows data to
be passed from binary to binary when firmware is booting.
Series-changes: 2
- Rebase to master
- Rework global_data for new stdpass convention
Series-changes: 3
- Move passage.h into this patch
- Add passage_valid() to decide if stdpass was provided
- Move arch_passage_entry() into this patch
- Make the global_data fields present only when needed
Signed-off-by: Simon Glass <sjg@chromium.org>
commit ddf67daac3 ("efi_capsule: Move signature from DTB to .rodata")
was reverted in
commit 47a25e81d3 ("Revert "efi_capsule: Move signature from DTB to .rodata"")
because that's what U-Boot was usually doing -- using the DT to store
configuration and data. Some of the discussions can be found here [0].
(Ab)using the device tree to store random data isn't ideal though.
On top of that with new features introduced over the years, keeping
the certificates in the DT has proven to be problematic.
One of the reasons is that platforms might send U-Boot a DTB
from the previous stage loader using a transfer list which won't contain
the signatures since other loaders are not aware of internal
U-Boot ABIs. On top of that QEMU creates the DTB on the fly, so adding
the capsule certificate there does not work and requires users to dump
it and re-create it injecting the public keys.
Now that we have proper memory permissions for arm64, move the certificate
to .rodata and read it from there.
[0] https://lore.kernel.org/u-boot/CAPnjgZ2uM=n8Qo-a=DUkx5VW5Bzp5Xy8=Wgmrw8ESqUBK00YJQ@mail.gmail.com/
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Jonathan Humphreys <j-humphreys@ti.com> # on TI sk-am62p-lp
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on AML-A311D-CC
Tested-by: Raymond Mao <raymond.mao@linaro.org>
Convert this to Python and make use of the build_helpers module. Update
that module to remove old options and improve the ordering of options.
The script doubles in size, part of which is being a lot more friendly
with virtiofsd problems, as well as adding a verbose mode.
Update the documentation as well.
Signed-off-by: Simon Glass <sjg@chromium.org>
Make use of the mk_fs() function to avoid needing to use sudo to mount
the loopback partition. This makes the script a little more friendly for
those nervous about sudo in their tools.
Signed-off-by: Simon Glass <sjg@chromium.org>
The .py extension isn't very useful. Drop it and update the shebang to
specify Python 3
Update the docs for this and also drop the old reference to 2021 images.
Signed-off-by: Simon Glass <sjg@chromium.org>
Recent Ubuntu versions (24.04+) disallow pip by default when
installing packages. The recommended approach is to use a virtual
environment (venv) instead.
Because of this, "make pip" is failing on such versions.
To prepare CI container migration to Ubuntu 24.04, use a venv in the
make_pip script.
Note: This has been reported on [1]
[1] https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/37
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
(cherry picked from commit 9d3f1ebaf8)
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
Makefiles as part of the macros to determine when to do something in our
Makefiles based on what phase of the build we are in. For consistency,
bring this down to a single macro and use "$(PHASE_)" only.
Signed-off-by: Tom Rini <trini@konsulko.com>
Provide a -A flag to select ARM instead of x86. For now, only the app
is supported and only for 64-bit ARM.
Signed-off-by: Simon Glass <sjg@chromium.org>