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>
Build U-Boot by default, so we can select the correct board and make the
process of trying different boards less error-prone.
Signed-off-by: Simon Glass <sjg@chromium.org>
Some configuration is now in variables with a CFG_ prefix. Add these to
the .cfg file so that we can see everything in one place. Sort the
options so they are easier to find and compare.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is a feeble attempt to update the qemu script to run a selection of
UEFI tests. It copies a .seq file into the disk so it can be read by
SCT.
It doesn't seem to work and I am not sure why. I am posting it in case
someone else has ideas or wants to pic it up.
Once Ilias' CI solution is in place, I can perhaps come back to this.
Signed-off-by: Simon Glass <sjg@chromium.org>
It is handy to be able to quickly build and boot a QEMU image for a
particular architecture and distro.
Add a script for this purpose. It supports only arm and x86 at present.
For distros it only supports Ubuntu. Both 32- and 64-bit builds are
supported.
Signed-off-by: Simon Glass <sjg@chromium.org>
Swig has changed language specific AppendOutput functions. The helper
macro SWIG_AppendOutput remains unchanged. Use that instead
of SWIG_Python_AppendOutput, which would require an extra parameter
since swig 4.3.0.
/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
| scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
| 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
| | ^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
Link: https://github.com/dgibson/dtc/pull/154
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22796
- Switch to using upstream DT on DH i.MX8MP DHCOM PDK2/PDK3.
- Add ability to build fallback DTBOs from arch/$(ARCH)/dts.
- Remove fdt_high and initrd_high env variables from imx6-dhcom.
- Add dummy clk for imx8.
- Fix DT corruption in imx8_cpu.
- Improve DDR stability on pico-imx7d.
Currently the enablement of OF_UPSTREAM results on the build system
searching for DTs only in dts/upstream/ . There are platforms which
use U-Boot specific DTBOs applied on top of U-Boot control DT during
SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.
Add dedicated 'dtbos' target which builds only .dtbos and not .dtbs and
in case CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS is enabled, build
this target for arch/$(ARCH)/dtb to generate local U-Boot specific DTBOs.
Adjust top level Makefile so binman would search for .dtb and .dtbo in
both OF_UPSTREAM specific paths and arch/$(ARCH)/dtb for the .dtbo case
in case CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS is enabled.
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Marek Vasut <marex@denx.de>