Commit graph

2342 commits

Author SHA1 Message Date
Tom Rini
b6d46d951f Prepare v2022.07-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-05-23 15:40:41 -04:00
Pali Rohár
827a232623 powerpc: mpc85xx: Fix CONFIG_OF_EMBED support for NOR booting
mpc85xx NOR binary contains also reset vector and therefore option
CONFIG_MPC85XX_HAVE_RESET_VECTOR must be defined.

When build system uses binman, it takes care of constructing final image
which consist of u-boot-without-reset-vector, DTB and reset-vector.

CONFIG_OF_EMBED does not use binman, there is no external DTB and Makefile
produce directly final u-boot.bin binary.

So in this case mpc85xx reset vector must not be stripped from the final
u-boot.bin binary. Fix it.

Signed-off-by: Pali Rohár <pali@kernel.org>
2022-05-23 09:33:10 -04:00
Ralph Siemsen
db26c507c9 Makefile: update warning about CONFIG_OF_EMBED
Update the diagnostic message with revised location of document, which
changed in 3e9fddfc4f ("doc: Move devicetree control doc to rST")

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
2022-05-11 09:22:24 -04:00
Tom Rini
f08ed34371 Prepare v2022.07-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-05-09 12:49:31 -04:00
Heinrich Schuchardt
ecd4e5cf18 Makefile: support CROSS_COMPILE=armv7a-*
Gentoo uses armv7a-hardfloat-linux-gnueabi- as cross compiler prefix.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-07 23:17:25 +02:00
Mark Kettenis
1a16e66e65 Makefile: Avoid non-portable GNU sed extension
Use [:space:] instead of \s and \S in regular expression that
determines the sandbox target architecture.  Fixes the build
failure on OpenBSD introduced with commit 4e65ca00f3
("efi_loader: bootmgr: add booting from removable media").

Fixes: f7691a6d73 ("sandbox: allow cross-compiling sandbox")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-05-07 23:17:25 +02:00
Simon Glass
f86ca5ad8f Introduce Verifying Program Loader (VPL)
Add support for VPL, a new phase of U-Boot. This runs after TPL. It is
responsible for selecting which SPL binary to run, based on a
verified-boot process.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-02 09:58:13 -04:00
Simon Glass
d3eba95a7e Makefile: Tidy up the TPL build rules
These should follow the same pattern as SPL, for consistency. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-02 09:58:13 -04:00
Simon Glass
70bed2f659 Makefile: Simplify devicetree rules for SPL/TPL
The current logic checks several options to decide whether SPL/TPL need
the U-Boot devicetree to be built. In fact we can check OF_CONTROL, which
is enabled in all cases that matter.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-02 09:58:13 -04:00
Simon Glass
b550853b7d test: Tidy up test building with SPL
We can in principle add tests to any SPL build, e.g. TPL or VPL. Update
the build rules to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-02 09:58:13 -04:00
Tom Rini
eb3393310b Prepare v2022.07-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-25 19:26:07 -04:00
Simon Glass
55cbf5ad50 Makefile: Drop a stale comment about linking
The bug mentioned here is fixed, so drop the comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-18 17:53:56 -04:00
Christoph Niedermaier
cc5a490cf4 Makefile: Sort u-boot-initial-env output
This will sort the default environment file generated by
"make u-boot-initial-env", but won't sort the default
environment in the compiled u-boot binary. The file
u-boot-initial-env is considered to use for the userpace
environment access tools [1] in case of that the
environments is written the first time into its location.
This is done on the one hand for a better overview and
comparison of the generated environment file. On the other
hand it is to synchronize the output with the script
get_default_env.sh, which generated a sorted default
environment file. The sorting preserves the order of equal
variable names by sorting only the variable name, and
disable the last-resort comparison. After sorting,
unnoticed blank lines at the end move to the top. Avoid
that by removing it before sorting.

[1] https://github.com/sbabic/libubootenv

Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Behún <marek.behun@nic.cz>
To: u-boot@lists.denx.de
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-04-07 16:50:53 -04:00
Du Huanpeng
21d3e3d107 Makefile: add endian link flag to u-boot-elf.o
fix compile error when using a little-endian to build with configs:
	sfr_nb4-ser_ram_defconfig
	comtrend_wap5813n_ram_defconfig
	comtrend_ar5387un_ram_defconfig
	comtrend_ct5361_ram_defconfig
	comtrend_vr3032u_ram_defconfig
	comtrend_ar5315u_ram_defconfig
	huawei_hg556a_ram_defconfig
	netgear_dgnd3700v2_ram_defconfig

Signed-off-by: Du Huanpeng <dhu@hodcarrier.org>
2022-04-06 09:21:49 -04:00
Tom Rini
01f1ab67f3 Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-04 10:48:44 -04:00
Tom Rini
e4b6ebd3de Prepare v2022.04
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-04 10:31:32 -04:00
Andrey Zhizhikin
e75c5b9386 env: do not fail on non-existing env.in file
If include/generated/env.in does not exist, which is a typical case for
clean build, quiet_cmd_gen_envp command tries to delete this file
unconditionally.

This produces following warning during the build:
  ENVP    include/generated/env.in
rm: cannot remove 'include/generated/env.in': No such file or directory

Add '-f' option to the `rm` command to not complain if file does not
exist.

Fixes: f432eb6d8a ("env: Avoid using a leftover text-environment file")
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2022-04-04 08:25:41 -04:00
Simon Glass
f432eb6d8a env: Avoid using a leftover text-environment file
If include/generated/environment.h exists (perhaps leftover from a build
of another board) it is used, even if the board currently being built does
not have a text environment.

This causes a build error. Fix it by emptying the file if it should not be
there.

Fixes: https://source.denx.de/u-boot/u-boot/-/issues/9
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Sean Anderson <seanga2@gmail.com>
2022-03-31 21:18:51 -04:00
Philippe Reynes
d12c1be903 Makefile: provide sah-key to binman
Set the variable pre-load-key-path with the shell variable
PRE_LOAD_KEY_PATH that contain the keys path (used for signature).
This variable pre-load-key-path is provided to binman.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Heinrich Schuchardt
6a56fc0ab4 Makefile: make clean should delete include/generated/env.in
'make sifive_unamtched_defconfig; make clean; make' fails if file
include/generated/env.in exists. 'make clean' should remove all files that
stop building.

Add file include/generated/env.in to the clean target.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
2022-03-31 08:27:51 -04:00
Tom Rini
34d2b7f203 Prepare v2022.04-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJBxXQACgkQFHw5/5Y0
 tywKKAv+L+sCmqfJ4Zy2cdzWkGZI3NZMWi8yzUUU37RH5I+3Blht+z6dMslm9gCB
 7/PwS5y7WH3l3wEdeXcw4FUCgNh3D8YyfCcVCsQ0Qxig49xwWz8Jn6t+haOWD6eW
 uXim+gSG+ceWTBrKf3InzXN5fHPIcF66r+k3opwAwIYKpT8p8CgM4ewshBCAsc6t
 6qSLf+A64JNv/y2DTS+sPDY68tnplbyRvrNb6YEazOF6b6SnSE2j+EH8RkIZ+2yT
 cTUhQ2o9JJIKnaG9MTqHB+XVe80oPB7bTWInFo2JxGn98XeS7CTCcnDZhLqWrvHF
 gBfcpEcVE2blVbg/Vo2x4rnU1dop44ch6pE9k5SPFJcPdlzdwFHHgGyfGi9LtD4K
 JAvaIQdz6ZEOQqShpCxcbL/g2/uoRaXFqC7E8IE+WdFMXGBQoZpqaoBMoefnyplk
 xrzqaQye38JgZDX0ku4cm4SMArAfr4sVHcdDlSlzY3y2KQ8Ead25irRvq7GoQ2Ad
 Odo9taQF
 =9g2Y
 -----END PGP SIGNATURE-----

Merge tag 'v2022.04-rc5' into next

Prepare v2022.04-rc5
2022-03-28 12:36:49 -04:00
Tom Rini
e893e8ea6a Prepare v2022.04-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-28 10:14:51 -04:00
Heinrich Schuchardt
0652d44bec Makefile: add drivers/video/u_boot_logo.S to clean
make sandbox_defconfig
make mrproper
make tests

fails with

../drivers/video/u_boot_logo.S: Assembler messages:
../drivers/video/u_boot_logo.S:5: Error: file not found: drivers/video/u_boot_logo.bmp

We have to delete the generated file.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-28 08:22:17 -04:00
Sean Anderson
e976504374 Add option to use -Og
This adds support for using -Og when building U-Boot. According to the
gcc man page:

> -Og should be the optimization level of choice for the standard
> edit-compile-debug cycle, offering a reasonable level of optimization
> while maintaining fast compilation and a good debugging experience.

This optimization level is roughly -O1 minus a few additional
optimizations. It provides a noticably better debugging experience, with
many fewer variables <optimized out>.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-25 13:35:50 -04:00
Sean Anderson
f38cb2aca7 Split CONFIG_CC_OPTIMIZE_FOR_SIZE into two configs
This adds a separate CONFIG_CC_OPTIMIZE_FOR_SPEED option in a choice,
in preparation for adding another optimization option. Also convert SH's
makefile to use this new option.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-25 13:35:50 -04:00
Johannes Krottmayer
1840ce5f38 Makefile: Fix doc path in warning message
Fix documentation path in warning message about deprecated device driver.

Signed-off-by: Johannes Krottmayer <krjdev@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-20 11:03:05 +01:00
Tom Rini
2abf048ab7 Prepare v2022.04-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmIvp/8ACgkQFHw5/5Y0
 tyyI6wwApR++p9BBlWEZn1B5sivCXcs9oCX3Vs8vegpiiRbs/pGsyKV6pfEHHYV5
 lhw1YNZ0accKmqBmX19tdpQ2ZzHq3+g0eGJL8xioXU3hRoZZNsDewAF8KS+aHPpk
 qMuA+xbDi08I6z2qtrIpaDd//DO2jAkFF+/TKOzSgUSxBaomQiziZaB2x28bIBH2
 zsLMP4vzZ03uCSZVSd7HMBz0qiGhioJo5Ch2eU4TTJW19CXeMTAuav6SDq+6vJGi
 cIUe31YEe742jOVmtf2RuJQ+mDjsEfT11wvRajcbOlH/Ho7E5iFxQkmOEThpvybE
 YD5d5uLLpQj42PfBpSvx4nMJcvyOmqxdizUJxCgi/q5HrhdzcO6LwLLON0T4W4zG
 Vsue+iTjOKXgLdD8g/VogL38iHxhpfY7zsFB98vvHcoLwhEXvfvhO8Dj/lwLw4Ic
 88B6uz3TqAPNqSnTWphJPCwG8STwyqlvLXwTF+eICbtQW3uuHEtnmlsXQJeFmdUa
 fGK8dUfr
 =wyE5
 -----END PGP SIGNATURE-----

Merge tag 'v2022.04-rc4' into next

Prepare v2022.04-rc4
2022-03-14 17:40:36 -04:00
Tom Rini
c149bf4140 Prepare v2022.04-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-14 16:39:08 -04:00
Tom Rini
705b5840cd Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Update and fixes for sl28, lx2, pblimage generation for some powerpc
products
2022-03-03 08:24:13 -05:00
Simon Glass
f44a52af4d Makefile: Add a way to check for pylint errors
Add a new 'pylint_err' target which only reports errors, not warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-02 10:28:12 -05:00
Tom Rini
f9a719e295 Prepare v2022.04-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-28 18:02:33 -05:00
Hou Zhiqiang
2058967d2f tools: pblimage: fix image header verification function
The Layerscape platforms have different RCW header value from FSL
PowerPC platforms, the current image header verification callback
is only working on PowerPC, it will fail on Layerscape, this patch
is to fix this issue.

This is a historical problem and exposed by the following patch:
http://patchwork.ozlabs.org/project/uboot/patch/20220114173443.9877-1-pali@kernel.org

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2022-02-28 12:01:02 +05:30
Philippe Reynes
5d94cbd1dc scripts: Makefile.lib: generate dsdt_generated.c instead of dsdt.c
There is a conflict between the static file
lib/acpi/dsdt.c and the file dsdt.c generated
dynamicaly by scripts/Makefile.lib. When a
mrproper is done, the static file dsdt.c is
removed. If a build with acpi enabled is
launched after, the following error is raised:

  CC      lib/acpi/acpi_table.o
make[2]: *** No rule to make target 'lib/acpi/dsdt.asl', needed by 'lib/acpi/dsdt.c'.  Stop.
scripts/Makefile.build:394: recipe for target 'lib/acpi' failed

To avoid such error, the generated file is named
dsdt_generated.c instead of dstdt.c.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
2022-02-25 11:21:24 -05:00
Roger Quadros
47f420ae08 binman: Add support for TEE BL32
Add an entry for OP-TEE Trusted OS 'BL32' payload.
This is required by platforms using Cortex-A cores with TrustZone
technology.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Add missing-blob-help, renumber the test file, update entry-docs:
Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22 10:05:44 -07:00
Tom Rini
8a4ef8786f Prepare v2022.04-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-14 17:03:08 -05:00
qthedev
42db373806 Replace echo -n's used in environment processing with touch
echo -n does not give the intended effect when invoked in macOS through
/bin/sh, which is the shell make uses by default, see
"https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working"
for a detailed explanation. In this case, it resulted in "-n" being
written to env.txt and env.in even though they should be empty, which
caused compilation to fail with "Your board uses a text-file
environment, so must not define CONFIG_EXTRA_ENV_SETTINGS".

This patch prevents the error by replacing echo -n's with touch, as they
are used to create empty files in these cases.
2022-02-11 11:28:47 -05:00
Simon Glass
bc39e41818 dm: scsi: Add a migration deadline for scsi
Very few boards remain to be migrated:

   am57xx_hs_evm_usb
   controlcenterdc
   highbank
   ls1021atsn_qspi
   ls1021atsn_sdcard
   ls1021atwr_sdcard_ifc_SECURE_BOOT
   ls1046ardb_sdcard_SECURE_BOOT
   ls1088ardb_sdcard_qspi_SECURE_BOOT
   omap5_uevm
   pg_wcom_expu1
   pg_wcom_seli8
   sandbox
   sandbox64
   sandbox_flattree
   sandbox_noinst
   sandbox_spl
   tools-only

Addd a migration deadline for a year out.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-09 09:16:48 -05:00
Marek Vasut
0c5cc164a9 Makefile: imx: Do not call arch/arm/mach-imx flash.bin generation if BINMAN enabled
Skip running arch/arm/mach-imx flash.bin generation in case BINMAN is
enabled, otherwise the target in arch/arm/mach-imx/Makefile regenerates
the flash.bin again and produces corrupted result.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Peng Fan <peng.fan@oss.nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-05 13:38:39 +01:00
Tom Rini
df887a045a Prepare v2022.04-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-31 17:57:32 -05:00
Simon Glass
f8753f025f pylint: Adjust how the output is produced
The current Makefile rule requires there to be a 'Module' line in the
pylint output, like this:

   ************* Module binman.fip_util

This line only appears if pylint has some comments about the module. We
cannot rely on it for naming.

Update the code to instead use the filename as the identifier for each
score, so rather than:

   multiplexed_log 7.49

we output:

   test_multiplexed_log.py 7.20

It is still easy to see which file the score relates to. In fact the new
naming is nicer since the full subdirectories are shown.

The avoids the problem where a module name is not produced, and the output
gets out of sync.

Regenerate pylint.base so we can start from the current baseline.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-31 07:59:39 -05:00
Simon Glass
9053374648 dm: serial: Add a migration deadline for serial
This probably should have been done a while back since it is a core
system. Very few boards remain to be migrated.

Addd a migration deadline for a year out.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-28 17:58:41 -05:00
Simon Glass
8bbd8a3594 Makefile: Fake external blobs by default with binman
This behaviour is necessary with boards where the binman description
requires processing external blobs, since these may be missing.

Enable it by default, so that CI is happy. Warnings indicate that a valid
image is not produced, as with the --allow-missing option.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25 12:36:10 -07:00
Simon Glass
feafc61ea6 Makefile: Add a pylint checker to the build
At present the Python code in U-Boot is somewhat inconsistent, with some
files passing pylint quite cleanly and others not.

Add a way to track progress on this clean-up, by checking that no module
has got any worse as a result of changes.

This can be used with 'make pylint'.

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Re-generate pylint.base]
2022-01-24 17:36:15 -05:00
Simon Glass
ce2f09bcc2 efi: Build the 64-bit app properly
Now that the linker crash is resolved, build the 64-bit EFI app, including
all the required code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-15 10:57:22 +01:00
Simon Glass
6e4a7eaf7d timer: Add a migration message
Some boards still use the old timer mechanism. Set a deadline for them to
update to driver model. Point to some examples as well.

This needs a bit of a strange rule to avoid an error on some boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-12 21:26:59 -05:00
Adam Ford
824204e421 Makefile: Add more files to clean list
When building for i.mx8m boards with binman, a few more additional
files are created which should be removed when running 'make clean'

Signed-off-by: Adam Ford <aford173@gmail.com>
2022-01-12 20:56:21 -05:00
Tom Rini
fe04d885fb Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-10 14:01:57 -05:00
Tom Rini
d637294e26 Prepare v2022.01
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-10 13:46:34 -05:00
Heiko Thiery
a89c8f2111 binman: add support for creating dummy files for external blobs
While converting to binman for an imx8mq board, it has been found that
building in the u-boot CI fails. This is because an imx8mq requires an
external binary (signed_hdmi_imx8m.bin). If this file cannot be found
mkimage fails.
To be able to build this board in the u-boot CI a binman option
(--fake-ext-blobs) is introduced that can be switched on via the u-boot
makefile option BINMAN_FAKE_EXT_BLOBS. With that the needed dummy files are
created.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-07 12:10:55 -05:00
Simon Glass
b7d8e85b4c fdt: Avoid emitting an device tree when not needed
U-Boot always needs some sort of a device tree in the build. Some boards
never actually use this, at least in production systems, since a prior
firmware stage sets one up and passes it to U-Boot. At present the only
mechanism to do that is with custom function (OF_BOARD), but future work
will include a standard way of doing this ('standard passage').

It can be confusing to see a device tree emitted from the U-Boot build in
this situation. Add an option to drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23 11:19:41 -05:00