Commit Graph

1282 Commits

Author SHA1 Message Date
Takumi Sueda a3f03b81eb video: add 6x11 font copied from Linux 2022-01-21 21:47:58 +09:00
Yangbo Lu 34f39ce882 armv8: layerscape: drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
Drop CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
is used instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Acked-by: Michael Walle <michael@walle.cc> [for kontron-sl28]
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-06-17 11:46:11 +05:30
Tom Rini f4b2786b80 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-05-25 12:40:16 -04:00
Daniel Schwierzeck 5308a71db8 MIPS: remove deprecated qemu_mips board
Remove qemu_mips boards because DM migration doesn't make sense.
The board support for qemu_mips is already marked as deprecated
in Qemu in favour of the Malta board. Also qemu_mips support
has been removed from Linux a long time ago.

The official replacement is the Malta board. The same Malta U-Boot
image can be used with Qemu and on physical hardware.
All combinations of Big Endian and Little Endian as well as 32 bit
and 64 bit are supported.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2021-05-25 15:35:06 +02:00
Marek Behún da48bd9ee5 build: link with --build-id=none
Some toolchains are compiled so that they pass a --build-id=something
parameter to the linker implicitly.

This causes U-Boot LTO linking to fail with something like:
  ld: section .note.gnu.build-id LMA ... overlaps section .text LMA ...
because U-Boot's link scripts do not currently handle .note.gnu.build-id
section.

Fix this by explicitly disabling build-id.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-05-24 14:21:30 -04:00
Marek Behún c1094987d1 build: support building with Link Time Optimizations
Add plumbing for building U-Boot with Link Time Optimizations.

When building with LTO, $(PLATFORM_LIBS) has to be in --whole-archive /
--no-whole-archive group, otherwise some functions declared in assembly
may not be resolved and linking may fail.

Note: clang may throw away linker list symbols it thinks are unused when
compiling with LTO. To force these symbols to be included, we refer to
them via the __ADDRESSABLE macro in a C file generated from compiled
built-in.o files before linking.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-05-24 14:21:30 -04:00
Marek Behún 958f2e57ef build: use thin archives instead of incremental linking
Currently we use incremental linking (ld -r) to link several object
files from one directory into one built-in.o object file containing the
linked code from that directory (and its subdirectories).

Linux has, some time ago, moved to thin archives instead.

Thin archives are archives (.a) that do not really contain the object
files, only references to them.

Using thin archives instead of incremental linking
- saves disk space
- apparently works better with dead code elimination
- makes things easier for LTO

The third point is the important one for us. With incremental linking
there are several options how to do LTO, and that would unnecessarily
complicate things.

We have to use the --whole-archive/--no-whole-archive linking option
instead of --start-group/--end-group, otherwise linking may fail because
of unresolved symbols, or the resulting binary will be unusable.

We also need to use the P flag for ar, otherwise final linking may fail.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-05-24 14:21:30 -04:00
Marek Behún 1445836ca7 Makefile, Makefile.spl: cosmetic change
Indent the linking commands so that they look cosmetically better.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2021-05-24 14:21:30 -04:00
Marek Behún 9ce799aaba checkpatch: require quotes around section name in the __section() macro
This is how Linux does this now, see Linux commit 339f29d91acf.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-05-24 14:21:30 -04:00
Tom Rini a2cfad8ecc pylibfdt: Rework "avoid unused variable warning" lines
Clang has -Wself-assign enabled by default under -Wall and so when
building with -Werror we would get an error here.  Inspired by Linux
kernel git commit a21151b9d81a ("tools/build: tweak unused value
workaround") make use of the fact that both Clang and GCC support
casting to `void` as the method to note that something is intentionally
unused.

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-05-24 11:47:44 -04:00
Tom Rini e644dfbb17 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-05-15 08:10:13 -04:00
Evan Benn ec6db6c297 patman: Parse checkpatch by message instead of by line
Parse each empty-line-delimited message separately. This saves having to
deal with all the different line content styles, we only care about the
header ERROR | WARNING | NOTE...

Also make checkpatch print line information for a uboot specific
warning.

Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-04-29 03:23:39 -07:00
Tom Rini 79b0f08d6a configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-27 08:28:38 -04:00
Patrick Delaunay 77b8cfef53 lmb: move CONFIG_LMB in Kconfig
Migrate CONFIG_LMB in Kconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-04-22 14:09:45 -04:00
Joel Peshkin 4e9bce1243 Add support for stack-protector
Add support for stack protector for UBOOT, SPL, and TPL
as well as new pytest for stackprotector

Signed-off-by: Joel Peshkin <joel.peshkin@broadcom.com>

Adjust UEFI build flags.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-04-20 07:31:12 -04:00
Andre Przywara debb07bf10 net: calxedagmac: Convert to DM_ETH
To squash that nasty warning message and make better use of the newly
gained OF_CONTROL feature, let's convert the calxedagmac driver to the
"new" driver model.
The conversion is pretty straight forward, mostly just adjusting the
use of the involved data structures.
The only actual change is the required split of the receive routine into
a receive and free_pkt part.
Also this allows us to get rid of the hardcoded platform information and
explicit init calls.

This also uses the opportunity to wrap the code decoding the MMIO
register base address, to make it safe for using PHYS_64BIT later.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-04-20 07:31:12 -04:00
Simon Glass 8ff123a685 freescale: ls1021atwr: Drop use of CONFIG_RESET
It is not recommended to use CONFIG_xxx defines for things which are not
Kconfig options. Rename this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-04-15 14:22:17 +05:30
Sean Anderson d9c3050710 checkpatch: Add warnings for using strn(cat|cpy)
strn(cat|cpy) has a bad habit of not nul-terminating the destination,
resulting in constructions like

	strncpy(foo, bar, sizeof(foo) - 1);
	foo[sizeof(foo) - 1] = '\0';

However, it is very easy to forget about this behavior and accidentally
leave a string unterminated. This has shown up in some recent coverity
scans [1, 2] (including code recently touched by yours truly).

Fortunately, the guys at OpenBSD came up with strl(cat|cpy), which always
nul-terminate strings. These functions are already in U-Boot, so we should
encourage new code to use them instead of strn(cat|cpy).

[1] https://lists.denx.de/pipermail/u-boot/2021-March/442888.html
[2] https://lists.denx.de/pipermail/u-boot/2021-January/438073.html

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-04-12 17:44:55 -04:00
Tom Rini 3b676a1662 Merge branch '2021-04-11-remove-non-migrated-boards'
- Remove a large number of boards that have not migrated to DM_MMC, for
  which the migration deadline with 2 years ago at v2019.04.
2021-04-11 14:11:05 -04:00
Trevor Woerner ff4e1e277f finish removing mb862xx video driver
drivers/video/mb862xx.c was removed in commit
9c1e098fb9 from December 2020, however, this
last little remnant in drivers/video/cfb_console.c remained.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-04-10 16:51:04 +02:00
Tom Rini a80e03683b drivers: ata: Remove mvsata_ide driver
The mvsata_ide driver was due for DM conversion by v2019.07.  As that
has long passed, remove the driver and disable it in the boards which
had enabled it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-10 07:59:30 -04:00
Harm Berntsen 4a8eac6245 configs: remove obsolete CONFIG_MVEBU_MMC
All usages of this have been removed

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
CC: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-08 08:50:52 +02:00
Harm Berntsen 594412c79e configs: remove obsolete CONFIG_SYS_MMC_BASE
All usages of this have been removed

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
CC: Simon Glass <sjg@chromium.org>
2021-04-08 08:50:52 +02:00
Simon Glass 48f45455bf Convert CONFIG_MISC_INIT_F to Kconfig
This converts the following to Kconfig:
   CONFIG_MISC_INIT_F

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-06 16:33:19 +12:00
Simon Glass 4b5019e3e5 dtc: Update the build rule for pylibfdt
Some versions of make complain about using a grouped target without a
recipe:

.../pylibfdt/Makefile:36: *** grouped targets must provide a recipe.  Stop.

Fix this by adding a dummy recipe.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-06 16:33:10 +12:00
Simon Glass 354d232463 Makefile: Remove old of-platdata files before regenerating
Which files we generate depends on the setting of OF_PLATDATA_INST in the
build. This might change between builds, but the build directory may be
reused.

Leaving old files around is confusing and switching the OF_PLATDATA_INST
setting does not necessarily regenerate the files, e.g. if the devicetree
has not changed.

Remove all the files before regenerating new ones.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26 17:03:08 +13:00
Simon Glass 56b313d1b6 Makefile: Use a variable for generated of-platdata headers
There are actually two generated files but only one is currently mentioned
in the Makefile as a dependency. Put them both in a Makefile variable and
use that instead, to avoid inconsistency.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26 17:03:08 +13:00
Simon Glass 13d71152f1 Makefile: Depend only on required of-platdata files
When OF_PLATDATA_INST is enabled, we need dt-uclass.c and dt-device.c for
the build to work. When OF_PLATDATA_INST is not enabled, we only need
dt-plat.c

Update the Makefile rules to indicate this.

At present all files are generated and compiled regardless of which are
actually needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26 17:03:08 +13:00
Simon Glass 6519da4741 Makefile: Avoid running dtoc every time
Since the dst_dir rule always runs, it causes a rebuild of the of-platdata
files even if not needed.

Create the directory inside the rule instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26 17:03:08 +13:00
Simon Glass 91f414b3a8 libfdt: Tidy up pylibfdt build rule
At present the build rule for pylibfdt depends on _libfdt.so but modern
Python versions add a different suffix to the output file, resulting in
something like _libfdt.cpython-38-x86_64-linux-gnu.so

The result is that pylibfdt is rebuilt every time.

Rename the file the standard name so that the rule works correctly. Also
add libfdt.py to the dependencies, so that file is always created if
missing.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-26 17:03:04 +13:00
Simon Glass 4c6f65074e dm: Add the new dtoc-generated files to the build
Now that dtoc generates some new C files, add these to the build so that
the instantiated devices and uclasses can be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-22 19:23:28 +13:00
Simon Glass 5a1b25c201 dm: of-platadata: Add option for device instantiation
Add Kconfig options to support build-time device instantiation. When
fully implemented, this will allow dtoc to create U-Boot devices (i.e.
struct udevice records) at build time, thus reducing code space in
SPL.

For now this defaults to off, but will be enabled when the rest of
the implementation is in place.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-22 19:23:27 +13:00
Simon Glass 67c053341f Makefile: Pass the U-Boot phase to dtoc
Pass the U-Boot phase as a parameter so dtoc can use it. At present it is
ether "spl" or "tpl".

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-22 19:23:27 +13:00
Tom Rini 22fc991daf Prepare v2021.04-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmBPhiUACgkQFHw5/5Y0
 tywChgv/RYpdSKrD5s4kCJnImfOwDznESj/CqAQK3Au5zviq7qXRrgxyTKv2e1wM
 W51vUBd0cE1YTACXqbr92wSSyqoTthLqd57KQgVele5uC2dvkqVTSvjPOUwtyIbQ
 BTPkoQnHPn30AILRdPjpEdBGfZhJDDtJFdQopn6h4GjEjPKVH8Wx1Dd+V6SD5f20
 WiksUjgdjMr1AmORY+LdwwJO8FZrGGPYgs8CDtiqxmCSwh3d7kUFFTT+G23BZdo7
 M+81+1uIUaW2Bolds7ZTPrrjr8bPwkWoTqNYhUB4bNPLp72gwnjM1rtU1X3hyiJM
 MdxSBimLHUOYPihfeSYCHSUrJaQFAAEFkuzWfZN1fgoswKEZQIVVVTzT/TomTyqf
 1DIXD+0HpXGKgVLW/Nkpl4D+UFjR865XI4kiuDxddjKI7bGbvDlbZ/k3PNelD7op
 umUswHnC3OTSw/g+A9VH/zf1rMFNLfu++vD7XJtdoWlcsl6x6/6Fh75tuC6K/X0K
 caPmehD3
 =ENym
 -----END PGP SIGNATURE-----

Merge tag 'v2021.04-rc4' into next

Prepare v2021.04-rc4
2021-03-15 12:15:38 -04:00
Tom Rini 6ad0769c8e configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-03-15 10:50:47 -04:00
Pali Rohár 15942805b7 arm: mvebu: a38x: Remove dead code ARMADA_39X
Config option ARMADA_39X is never set so remove all dead code hidden under
ifdef CONFIG_ARMADA_39X blocks.

Also remove useless checks for CONFIG_ARMADA_38X define as this macro is
always defined for a38x code path.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-03-12 07:44:21 +01:00
Dalon Westergreen 9773ebcfbc Makefile: socfpga: Add target to generate hex output for combined spl and dtb
Add target to Makefile to generate "u-boot-spl-dtb.hex" for Intel
SOCFPGA SOC64 devices (Stratix 10 and Agilex). "u-boot-spl-dtb.hex"
is hex formatted spl with and offset of CONFIG_SPL_TEXT_BASE. It
combines the spl image and dtb. "u-boot-spl-dtb.hex" is needed to
generate the final configuration bitstream for Intel SOCFPGA SOC64
devices.

Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
2021-03-08 10:59:12 +08:00
Rajesh Bhagat c8c0170f19 configs: fsl: move via specific defines to Kconfig
Moves below via specific defines to Kconfig:

	CONFIG_FSL_VIA

Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-03-05 10:25:41 +05:30
Rajesh Bhagat 504debcd8c configs: fsl: move bootrom specific defines to Kconfig
Moves below bootrom specific defines to Kconfig:

    CONFIG_SYS_FSL_BOOTROM_BASE
    CONFIG_SYS_FSL_BOOTROM_SIZE

Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-03-05 10:25:41 +05:30
Jagan Teki 5d235324ae video: sunxi_display: Convert to DM_VIDEO
DM_VIDEO migration deadline is already expired, but around
80 Allwinner boards are still using video in a legacy way:

===================== WARNING ======================
This board does not use CONFIG_DM_VIDEO Please update
the board to use CONFIG_DM_VIDEO before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/migration.rst for more info.
====================================================

Convert the legacy video driver over to the DM_VIDEO framework. This is
a minimal conversion: it doesn't use the DT for finding its resources,
nor does it use DM clocks or DM devices for the outputs (LCD, HDMI, CVBS).

Tested in Bananapi M1+ Plus 1920x1200 HDMI out. (Jagan)

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
[Andre: rebase and smaller fixes]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-03 10:03:15 +01:00
Tom Rini 20ecfbe931 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-03-02 09:36:23 -05:00
Roger Pau Monne e420a38fa6 build/DTC: fix sed usage in DTC command
Current sed usage in the DTC command relies on GNU sed specific -i
option which has a slightly different syntax for BSD sed and always
expects an extension to be provided in order to create a backup file.

Instead drop the cat concatenation done before the sed call and use
sed itself to edit and concatenate the files.

No functional change intended.

Signed-off-by: Roger Pau Monné <royger@FreeBSD.org>
2021-02-24 16:51:48 -05:00
Roger Pau Monne 9907847245 scripts/check-config.sh: fix to be compatible with BSD sed
Fist use extended regexp in order to drop the '\' around the
parentheses which is not supported by BSD sed in regular mode.

Secondly use [[:blank:]] instead of \s, as the later is a GNU
extension.

No functional change intended.

Signed-off-by: Roger Pau Monné <royger@FreeBSD.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-24 16:51:48 -05:00
Wasim Khan 402558b1fe cmd: fdt: skip board specific fixup using env variable
Sometimes it is useful to boot OS with already fixed-up
device tree. Check for env variable 'skip_board_fixup'
before calling ft_board_setup().
Current behaviour is unchanged, additionally user can
set skip_board_fixup to 1 to skip the fixup.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
2021-02-24 16:51:48 -05:00
Tom Rini a3ddc776fa - splash_source warning fix when building with 64-bit toolchains
- lq123p1jx31 and nv101wxmn51 compatible in simple panel driver
  - remove not used mb862xx driver
  - add Himax HX8238D panel driver
  - s/video_uc_platdata/video_uc_plat/
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCYDOevA4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXNaAAJ0RUysoiZFAddxyrW7otwe+xxmdTACbBcVXCPuX
 W41gJtQyftU4rMGbMoo=
 =iAX1
 -----END PGP SIGNATURE-----

Merge tag 'video-for-v2021.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

 - splash_source warning fix when building with 64-bit toolchains
 - lq123p1jx31 and nv101wxmn51 compatible in simple panel driver
 - remove not used mb862xx driver
 - add Himax HX8238D panel driver
 - s/video_uc_platdata/video_uc_plat/
2021-02-22 09:11:27 -05:00
Andre Przywara e036a1d227 fdt/sunxi: Remove OF_STDOUT_PATH
OF_STDOUT_PATH was meant to hold the devicetree path to the serial
console, to be put into the linux,stdout-path property of the chosen node.

The only user of that was sunxi, and it was actually wrong for years
there: the paths hardcoded in sunxi_common.h were not matching the DTs,
evident by the leading 0's in nodenames, which have been removed years
ago.

On top of that, "linux,stdout-path" is now deprecated for a while (Linux
commit 2a9d832cc9aae from November 2014), and also all modern DTs
(including those included in U-Boot) carry a "stdout-path" property
already.

So remove the stanza from sunxi_common.h, and, since this was the last
user, also remove the associated bits from the rest of U-Boot.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-19 23:29:47 +00:00
Heinrich Schuchardt 9c1e098fb9 video: eliminate unused drivers/video/mb862xx.c
The mb862xx driver does not conform to the driver model and is unused.
Eliminate it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-19 22:35:49 +01:00
Simon Glass 124c255731 libfdt: Check for multiple/invalid root nodes
It is possible to construct a devicetree blob with multiple root nodes.
Update fdt_check_full() to check for this, along with a root node with an
invalid name.

CVE-2021-27097

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Bruce Monroe <bruce.monroe@intel.com>
Reported-by: Arie Haenel <arie.haenel@intel.com>
Reported-by: Julien Lenoir <julien.lenoir@intel.com>
2021-02-15 22:31:53 -05:00
Tom Rini 6144438fb5 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-15 13:34:30 -05:00
Tom Rini 472a716b8f configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-29 13:56:04 -05:00