oweals/u-boot.git
4 years agotravis: add packages for UEFI secure boot test
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:53 +0000 (11:51 +0900)]
travis: add packages for UEFI secure boot test

Pytest for UEFI secure boot will use several host commands.
In particular, Test setup relies on efitools, whose version must be v1.5.2
or later. So fetch a new version of deb package directly.
Please note it has a dependency on mtools, which must also be installed
along wih efitools.

In addition, the path, '/sbin', is added to PATH for use of sgdisk and
mkfs.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agosandbox: add extra configurations for UEFI and related tests
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:52 +0000 (11:51 +0900)]
sandbox: add extra configurations for UEFI and related tests

Adding those extra configurations allows us to successfully run UEFI
secure boot pytest on Travis CI.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader, pytest: add UEFI secure boot tests (image)
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:51 +0000 (11:51 +0900)]
efi_loader, pytest: add UEFI secure boot tests (image)

Provide test cases for
 * image authentication for signed images
   (test_efi_secboot/test_signed.py)
 * image authentication for unsigned images
   (test_efi_secboot/test_unsigned.py)

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader, pytest: add UEFI secure boot tests (authenticated variables)
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:50 +0000 (11:51 +0900)]
efi_loader, pytest: add UEFI secure boot tests (authenticated variables)

Provide a couple of test cases for variable authentication.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader, pytest: set up secure boot environment
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:49 +0000 (11:51 +0900)]
efi_loader, pytest: set up secure boot environment

A fixture for UEFI secure boot tests (image authentication and variable
authentication) is defined. A small file system with test data in a single
partition formatted in fat is created.

This test requires efitools v1.5.2 or later. If the system's efitools
is older, you have to build it on your own and define EFITOOLS_PATH.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agocmd: efidebug: add "test bootmgr" sub-command
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:48 +0000 (11:51 +0900)]
cmd: efidebug: add "test bootmgr" sub-command

This sub-command will be used to test image authentication,
in particular, a case where efi_load_image() failed with
EFI_SECURITY_VIOLATION but we still want to try efi_start_image().
We won't run such a case under normal bootmgr because it simply
refuses to call efi_start_image() if anything but EFI_SUCCESS
is returned when loading an image.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agocmd: env: add "-at" option to "env set -e" command
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:47 +0000 (11:51 +0900)]
cmd: env: add "-at" option to "env set -e" command

With "-at" option, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS
will be passed to SetVariable() to authenticate the variable.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agocmd: env: use appropriate guid for authenticated UEFI variable
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:46 +0000 (11:51 +0900)]
cmd: env: use appropriate guid for authenticated UEFI variable

A signature database variable is associated with a specific guid.
For convenience, if user doesn't supply any guid info, "env set|print -e"
should complement it.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: set up secure boot
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:45 +0000 (11:51 +0900)]
efi_loader: set up secure boot

The following variable is exported as UEFI specification defines:
SignatureSupport: array of GUIDs representing the type of signatures
                      supported by the platform firmware

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: image_loader: support image authentication
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:44 +0000 (11:51 +0900)]
efi_loader: image_loader: support image authentication

With this commit, image validation can be enforced, as UEFI specification
section 32.5 describes, if CONFIG_EFI_SECURE_BOOT is enabled.

Currently we support
* authentication based on db and dbx,
  so dbx-validated image will always be rejected.
* following signature types:
    EFI_CERT_SHA256_GUID (SHA256 digest for unsigned images)
    EFI_CERT_X509_GUID (x509 certificate for signed images)
Timestamp-based certificate revocation is not supported here.

Internally, authentication data is stored in one of certificates tables
of PE image (See efi_image_parse()) and will be verified by
efi_image_authenticate() before loading a given image.

It seems that UEFI specification defines the verification process
in a bit ambiguous way. I tried to implement it as closely to as
EDK2 does.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: variable: add VendorKeys variable
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:43 +0000 (11:51 +0900)]
efi_loader: variable: add VendorKeys variable

The following variable is exported as UEFI specification defines:
VendorKeys: whether the system is configured to use only vendor-provided
    keys or not
The value will have to be modified if a platform has its own way of
initializing signature database, in particular, PK.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: variable: add secure boot state transition
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:42 +0000 (11:51 +0900)]
efi_loader: variable: add secure boot state transition

UEFI specification defines several global variables which are related to
the current secure boot state. In this commit, those values will be
maintained according to operations. Currently, AuditMode and DeployedMode
are defined but not implemented.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: variable: support variable authentication
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:41 +0000 (11:51 +0900)]
efi_loader: variable: support variable authentication

With this commit, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS
is supported for authenticated variables and the system secure state
will transfer between setup mode and user mode as UEFI specification
section 32.3 describes.

Internally, authentication data is stored as part of authenticated
variable's value. It is nothing but a pkcs7 message (but we need some
wrapper, see efi_variable_parse_signature()) and will be validated by
efi_variable_authenticate(), hence efi_signature_verify_with_db().

Associated time value will be encoded in "{...,time=...}" along with
other UEFI variable's attributes.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: add signature database parser
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:40 +0000 (11:51 +0900)]
efi_loader: add signature database parser

efi_signature_parse_sigdb() is a helper function will be used to parse
signature database variable and instantiate a signature store structure
in later patches.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: add signature verification functions
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:39 +0000 (11:51 +0900)]
efi_loader: add signature verification functions

In this commit, implemented are a couple of helper functions which will be
used to materialize variable authentication as well as image authentication
in later patches.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoefi_loader: add CONFIG_EFI_SECURE_BOOT config option
AKASHI Takahiro [Tue, 14 Apr 2020 02:51:38 +0000 (11:51 +0900)]
efi_loader: add CONFIG_EFI_SECURE_BOOT config option

Under this configuration, UEFI secure boot support will be added
in later patches.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agodrivers: crypto: rsa_mod_exp: avoid DM_FLAG_PRE_RELOC
Heinrich Schuchardt [Wed, 15 Apr 2020 18:31:53 +0000 (18:31 +0000)]
drivers: crypto: rsa_mod_exp: avoid DM_FLAG_PRE_RELOC

Function rsa_verify_key() is not called before relocation. So there is no
need to load the UCLASS_MOD_EXP drivers before relocation.

This avoid a failure to boot for pine64-lts_defconfig with CONFIG_RSA=y.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: function descriptions efi_watchdog.c
Heinrich Schuchardt [Fri, 10 Apr 2020 15:51:56 +0000 (17:51 +0200)]
efi_loader: function descriptions efi_watchdog.c

Correct function descriptions in efi_watchdog.c.
Add the descriptions to the generated HTML documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: add missing doc comments in efi_disk.c
Heinrich Schuchardt [Fri, 10 Apr 2020 15:10:34 +0000 (17:10 +0200)]
efi_loader: add missing doc comments in efi_disk.c

Add missing descriptions for functions in efi_disk.c.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: function descriptions efi_unicode_collation.c
Heinrich Schuchardt [Fri, 10 Apr 2020 15:39:23 +0000 (17:39 +0200)]
efi_loader: function descriptions efi_unicode_collation.c

Correct function descriptions in efi_unicode_collation.c
Add the Unicode collation protocol to the generated HTML documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: enable RNG if DM_RNG is enabled
Peter Robinson [Wed, 1 Apr 2020 10:15:01 +0000 (11:15 +0100)]
efi_loader: enable RNG if DM_RNG is enabled

Enable EFI_RNG_PROTOCOL by default if DM_RNG is set.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Remove superfluous 'if DM_RNG'
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-marvell
Tom Rini [Wed, 15 Apr 2020 12:30:16 +0000 (08:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-marvell

- Common: honour hw_margin_ms property (Rasmus)
- sp805_wdt: get platform clock from dt (Rayagonda)

4 years agowatchdog: sp805_wdt: get platform clock from dt file
Rayagonda Kokatanur [Mon, 6 Apr 2020 07:59:52 +0000 (13:29 +0530)]
watchdog: sp805_wdt: get platform clock from dt file

Get the watchdog platform clock from the DTS file
using clk subsystem and use the same for calculating
ticks in msec.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agowatchdog: honour hw_margin_ms DT property
Rasmus Villemoes [Fri, 13 Mar 2020 16:04:58 +0000 (17:04 +0100)]
watchdog: honour hw_margin_ms DT property

Some watchdog devices, e.g. external gpio-triggered ones, must be
reset more often than once per second, which means that the current
rate-limiting logic in watchdog_reset() fails to keep the board alive.

gpio-wdt.txt in the linux source tree defines a "hw_margin_ms"
property used to specifiy the maximum time allowed between resetting
the device. Allow any watchdog device to specify such a property, and
then use a reset period of one quarter of that. We keep the current
default of resetting once every 1000ms.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agowatchdog: move initr_watchdog() to wdt-uclass.c
Rasmus Villemoes [Fri, 13 Mar 2020 16:04:57 +0000 (17:04 +0100)]
watchdog: move initr_watchdog() to wdt-uclass.c

This function is a bit large for an inline function, and for U-Boot
proper, it is called via a function pointer anyway (in board_r.c), so
cannot be inlined.

It will shortly set a global variable to be used by the
watchdog_reset() function in wdt-uclass.c, so this also allows making
that variable local to wdt-uclass.c.

The WATCHDOG_TIMEOUT_SECS define is not used elsewhere.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agowatchdog: remove stale ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS from wdt.h
Rasmus Villemoes [Fri, 13 Mar 2020 16:04:56 +0000 (17:04 +0100)]
watchdog: remove stale ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS from wdt.h

Since WATCHDOG_TIMEOUT_MSECS was converted to Kconfig (commit
ca51ef7c0c), CONFIG_WATCHDOG_TIMEOUT_MSECS has been guaranteed to be
defined. So remove the dead fallback ifdeffery.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 14 Apr 2020 12:47:07 +0000 (08:47 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-marvell

- Misc enhancements to Clearfog, including board variant detection
  (Joel)
- Misc enhancements to Turris Mox, including generalization of the
  ARMADA37xx DDR size detection (Marek)

4 years agoarm: mvebu: turris_mox: fix PCIe ranges in device tree
Marek Behún [Wed, 8 Apr 2020 17:25:22 +0000 (19:25 +0200)]
arm: mvebu: turris_mox: fix PCIe ranges in device tree

Use the new a3700_fdt_fix_pcie_regions function in turris_mox.c so that
MOX boards with 4 GB RAM are fully supported.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm64: mvebu: a37xx: add device-tree fixer for PCIe regions
Marek Behún [Wed, 8 Apr 2020 17:25:21 +0000 (19:25 +0200)]
arm64: mvebu: a37xx: add device-tree fixer for PCIe regions

In case when ARM Trusted Firmware changes the default address of PCIe
regions (which can be done for devices with 4 GB RAM to maximize the
amount of RAM the device can use) we add code that looks at how ATF
changed the PCIe windows in the CPU Address Decoder and changes given
device-tree blob accordingly.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: turris_mox: support devices with RAM > 1 GB
Marek Behún [Wed, 8 Apr 2020 17:25:20 +0000 (19:25 +0200)]
arm: mvebu: turris_mox: support devices with RAM > 1 GB

In order to support MOX boards with 2 GB or 4 GB RAM, we use the new
Armada-3700 generic code for memory information structures. This is done
by removing dram_init and dram_init_banksize from turris_mox.c, in order
for the generic, weak definitions to be used.

Also for boards with 4 GB RAM it is needed to increase
CONFIG_NR_DRAM_BANKS to 2 in turris_mox_defconfig.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm64: mvebu: a37xx: improve code determining memory info structures
Marek Behún [Wed, 8 Apr 2020 17:25:19 +0000 (19:25 +0200)]
arm64: mvebu: a37xx: improve code determining memory info structures

Currently on Armada-37xx the mem_map structure is statically defined to
map first 2 GB of memory as RAM region, and system registers and PCIe
region device region.

This is insufficient for when there is more RAM or when for example the
PCIe windows is mapped to another address by the CPU Address Decoder.
In the case when the board has 4 GB RAM, on some boards the ARM Trusted
Firmware can move the PCIe window to another address, in order to
maximize possible usable RAM.

Also the dram_init and dram_init_banksize looks for information in
device-tree, and therefore different device trees are needed for boards
with different RAM sizes.

Therefore we add code that looks at how the ARM Trusted Firmware has
configured the CPU Address Decoder windows, and then we update the
mem_map structure and compute gd->ram_size and gd->bd->bi_dram bank
base addresses and sizes accordingly.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm64: mvebu: armada-8k: move dram init code
Marek Behún [Wed, 8 Apr 2020 17:25:18 +0000 (19:25 +0200)]
arm64: mvebu: armada-8k: move dram init code

Move Armada-8k specific DRAM init code into armada-8k specific
directory.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: turris_mox: sort headers alphabetically
Marek Behún [Wed, 8 Apr 2020 10:02:08 +0000 (12:02 +0200)]
arm: mvebu: turris_mox: sort headers alphabetically

Sort #includes alphabetically, the only exception is common.h, which is
included first in most parts of U-Boot.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: turris_mox: don't use hardcoded addresses
Marek Behún [Wed, 8 Apr 2020 10:02:07 +0000 (12:02 +0200)]
arm: mvebu: turris_mox: don't use hardcoded addresses

Use macro MVEBU_REGISTER to access register addresses instead of
hardcoded addresses.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: dts: turris_mox: fix USB3 regulator
Marek Behún [Wed, 8 Apr 2020 10:02:06 +0000 (12:02 +0200)]
arm: mvebu: dts: turris_mox: fix USB3 regulator

Commit e8e9715df2d4 requires the USB3 regulator node to have the
enable-active-high property for the regulator to work properly. The
GPIO_ACTIVE_HIGH constant is not enough anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Fixes: e8e9715df2d4 ("regulator: fixed: Modify enable-active-high...")
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: turris_mox: Setup Linux's device tree before boot
Marek Behún [Wed, 8 Apr 2020 10:02:05 +0000 (12:02 +0200)]
arm: mvebu: turris_mox: Setup Linux's device tree before boot

Patch Linux's device tree according to which Mox modules are connected.
Linux's device tree has all possible Mox module nodes preprogrammed, but
in disabled state.

If MOX B, MOX F or MOX G module is present, this code enables the PCI
node.

For the network modules (MOX C, MOX D and MOX E) are present, the code
enables corresponding ethernet and swtich nodes and DSA connections.
For the SFP cage the SFP GPIO controller node and SFP node are also
enabled.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: dts: turris_mox: update sdhci properties
Marek Behún [Wed, 8 Apr 2020 10:02:04 +0000 (12:02 +0200)]
arm: mvebu: dts: turris_mox: update sdhci properties

With recent changes to the mmc subsystem (chip detect code etc) update
the sdhci node of the Turris Mox device tree.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: turris_mox: Fix early SPI communication
Marek Behún [Wed, 8 Apr 2020 10:02:03 +0000 (12:02 +0200)]
arm: mvebu: turris_mox: Fix early SPI communication

The SPI clock signal changes value when the SPI configuration register
is configured. This can sometimes lead to the device misinterpreting
the enablement of the SPI controller as actual clock tick.
This can be solved by first setting the SPI CS1 pin from GPIO to SPI mode,
and only after that writing the SPI configuration register.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: Use Pro DT by default
Joel Johnson [Mon, 23 Mar 2020 20:21:40 +0000 (14:21 -0600)]
arm: mvebu: clearfog: Use Pro DT by default

Switch to explicitly using the Pro variant DT, which has been
available since Linux 4.11.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: move ENV params to Kconfig
Joel Johnson [Mon, 23 Mar 2020 20:21:38 +0000 (14:21 -0600)]
arm: mvebu: clearfog: move ENV params to Kconfig

Migrate the values for ENV_SIZE and ENV_OFFSET into board specific
Kconfig defaults so they're more accessible for configuration.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: add SPI offsets
Joel Johnson [Mon, 23 Mar 2020 20:21:36 +0000 (14:21 -0600)]
arm: mvebu: clearfog: add SPI offsets

Add reasonable default SPI offsets and ENV size when configured to
boot from SPI flash.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: Unify DT selection paths
Joel Johnson [Mon, 23 Mar 2020 20:21:35 +0000 (14:21 -0600)]
arm: mvebu: clearfog: Unify DT selection paths

Unify the location of DT selection into board_late_init instead of
split between detection and static configuration paths.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: Add SATA mode flags
Joel Johnson [Mon, 23 Mar 2020 20:21:34 +0000 (14:21 -0600)]
arm: mvebu: clearfog: Add SATA mode flags

The mPCIe slots on ClearFog Pro and ClearFog Base may be alternately
configured for SATA usage.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: Add option for 2.5 Gbps SFP
Joel Johnson [Mon, 23 Mar 2020 20:21:33 +0000 (14:21 -0600)]
arm: mvebu: clearfog: Add option for 2.5 Gbps SFP

While newer Linux kernels provide autoconfiguration of SFP, provide
an option for setting in U-Boot Kconfig for use prior to booting.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: initial ClearFog Base variant
Joel Johnson [Mon, 23 Mar 2020 20:21:32 +0000 (14:21 -0600)]
arm: mvebu: clearfog: initial ClearFog Base variant

Add a unique entry for ClearFog Base variant, reflected in the board
name and adjusted SerDes topology.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: use Pro name by default
Joel Johnson [Mon, 23 Mar 2020 20:21:31 +0000 (14:21 -0600)]
arm: mvebu: clearfog: use Pro name by default

Make the board version printed indicate the Pro variant default.
Also adjust static name casing to match what is expected for
EEPROM product name to share string constants.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: solidrun: remove hardcoded DTS MAC address
Joel Johnson [Mon, 23 Mar 2020 20:21:30 +0000 (14:21 -0600)]
arm: mvebu: solidrun: remove hardcoded DTS MAC address

Using a consistent hardcoded MAC address from the DTS file causes
issues when using multiple devices on the same network segment.
Instead rely on environment configuration or random generation.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: fix SerDes table alignment
Joel Johnson [Mon, 23 Mar 2020 20:21:29 +0000 (14:21 -0600)]
arm: mvebu: fix SerDes table alignment

Tested on Solidrun ClearFog Base. Table alignment was:
 | Lane #  | Speed |  Type       |
 --------------------------------
 |   0    |  3   |  SATA0       |
 |   1    |  0   |  SGMII1      |
 |   2    |  3   |  SATA1       |
 |   3    |  5   |  USB3 HOST1  |
 |   4    |  5   |  USB3 HOST0  |
 |   5    |  4   |  SGMII2      |
 --------------------------------

After the change, it's correctly aligned as:
 | Lane # | Speed |  Type       |
 --------------------------------
 |   0    |   3   | SATA0       |
 |   1    |   0   | SGMII1      |
 |   2    |   5   | PCIe1       |
 |   3    |   5   | USB3 HOST1  |
 |   4    |   5   | PCIe2       |
 |   5    |   0   | SGMII2      |
 --------------------------------

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: support multiple SATA boot
Joel Johnson [Mon, 23 Mar 2020 17:26:32 +0000 (11:26 -0600)]
arm: mvebu: clearfog: support multiple SATA boot

Enable distro bootcmd support for additional SATA ports if enabled.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: add SCSI to distro bootcmd
Joel Johnson [Mon, 23 Mar 2020 17:26:31 +0000 (11:26 -0600)]
arm: mvebu: clearfog: add SCSI to distro bootcmd

Include attempting to boot from SCSI (SATA) devices within generated
board distro bootcmd environment. The reasoning for boot ordering is
that MMC and USB are external and removable, while when a case is in
use, replacing M.2 or mSATA drives requires disassembly. Therefore,
to boot SCSI, [bootable] external media must be removed. If SCSI were
placed before MMC or USB, then removing a bootable SCSI drive to
enable MMC or USB booting would be more difficult.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: update RTC values for PCIe memory wrappers
Chris Packham [Wed, 26 Feb 2020 06:53:50 +0000 (19:53 +1300)]
arm: mvebu: update RTC values for PCIe memory wrappers

Update the RTC (Read Timing Control) values for PCIe memory wrappers
following an ERRATA (ERRATA# TDB). This means the PCIe accesses will
used slower memory Read Timing, to allow more efficient energy
consumption, in order to lower the minimum VDD of the memory.  Will lead
to more robust memory when voltage drop occurs (VDDSEG)

The code is based on changes from Marvell's U-Boot, specifically:

https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/commit/20cd2704072512de176e048970f2883db901674b
https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/commit/eb608a7c8dd0d42b87601a61b9c0cc5615ab94b2
https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/commit/c4af19ae2bf08cf6e450e741ce4f04d402a5cb6b

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: clearfog: add scsi target to distro-boot
Josua Mayer [Mon, 17 Feb 2020 18:37:28 +0000 (19:37 +0100)]
arm: mvebu: clearfog: add scsi target to distro-boot

Support for sata devices via the scsi command is available and already
enabled by default for the Clearfog Base and Pro. This change adds scsi
to the list of boot targets used by distro-boot.

Signed-off-by: Josua Mayer <josua@solid-run.com>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: drivers/ddr: remove redundant assignment
Heinrich Schuchardt [Sat, 15 Feb 2020 20:58:31 +0000 (21:58 +0100)]
arm: mvebu: drivers/ddr: remove redundant assignment

The value of local variable ecc is immediately overwritten. So we can
remove the first assignment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: dts: Sort Armada series dts alphabetically
Josip Kelecic [Thu, 13 Feb 2020 13:38:49 +0000 (14:38 +0100)]
arm: mvebu: dts: Sort Armada series dts alphabetically

Sort the Armada series dts in the Makefile alphabetically
prior to adding new board support.

Signed-off-by: Josip Kelečić <josip.kelecic@sartura.hr>
Reviewed-by: Luka Kovacic <luka.kovacic@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoddr: marvell: a38x: Allow boards to specify CK_DELAY parameter
Chris Packham [Wed, 29 Jan 2020 23:50:44 +0000 (12:50 +1300)]
ddr: marvell: a38x: Allow boards to specify CK_DELAY parameter

For some layouts it is necessary to adjust the CK_DELAY parameter to
successfully complete DDR training. Add the ability to specify the
CK_DELAY in the mv_ddr_topology_map.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Mon, 13 Apr 2020 20:06:51 +0000 (16:06 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Mon, 13 Apr 2020 20:06:36 +0000 (16:06 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

4 years agoMerge branch 'next'
Tom Rini [Mon, 13 Apr 2020 15:27:00 +0000 (11:27 -0400)]
Merge branch 'next'

Pull in changes that have been pending in our 'next' branch.  This
includes:
- A large number of CI improvements including moving to gcc-9.2 for all
  platforms.
- amlogic, xilinx, stm32, TI SoC updates
- USB and i2c subsystem updtaes
- Re-sync Kbuild/etc logic with v4.19 of the Linux kernel.
- RSA key handling improvements

4 years agoPrepare v2020.04 v2020.04
Tom Rini [Mon, 13 Apr 2020 15:02:18 +0000 (11:02 -0400)]
Prepare v2020.04

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoarm: socfpga: arria10: Enable cache driver in SPL
Ley Foon Tan [Tue, 7 Apr 2020 07:43:14 +0000 (15:43 +0800)]
arm: socfpga: arria10: Enable cache driver in SPL

Adding "u-boot,dm-pre-reloc" and enable CONFIG_SPL_CACHE
to enable cache driver in SPL.

This fixed error below in SPL:
cache controller driver NOT found!

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
4 years agoarm: dts: arria10: Update dtsi/dts from Linux
Ley Foon Tan [Tue, 7 Apr 2020 07:43:13 +0000 (15:43 +0800)]
arm: dts: arria10: Update dtsi/dts from Linux

Update these 3 files from Linux:.
- socfpga_arria10.dtsi (Commit ID c1459a9d7e92)
- socfpga_arria10_socdk.dtsi (Commit ID d9b9f805ee2b)
- socfpga_arria10_socdk_sdmmc.dts (Commit ID 17808d445b6f)

Change in socfpga_arria10.dtsi:
- Add clkmgr label, so that can reference to it in u-boot.dtsi.

Change in socfpga_arria10-u-boot.dtsi:
- Add compatible and altr,sysmgr-syscon for uboot.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
4 years agoarm: dts: arria10: Move uboot specific properties to u-boot.dtsi
Ley Foon Tan [Tue, 7 Apr 2020 07:43:12 +0000 (15:43 +0800)]
arm: dts: arria10: Move uboot specific properties to u-boot.dtsi

Move Uboot specific properties to *u-boot.dtsi files.
Preparation to sync Arria 10 device tree from Linux.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
4 years agoARM: socfpga: Enable DM RTC bootcount on ABB SECU1
Marek Vasut [Fri, 6 Mar 2020 20:52:21 +0000 (21:52 +0100)]
ARM: socfpga: Enable DM RTC bootcount on ABB SECU1

Add and enable RTC-backed boot counter on ABB SECU1 platform.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
4 years agodrivers: usb: host: Add BRCM xHCI driver
Rayagonda Kokatanur [Thu, 9 Apr 2020 03:53:15 +0000 (09:23 +0530)]
drivers: usb: host: Add BRCM xHCI driver

Base driver for Broadcom xHCI controllers

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
4 years agousb: Migrate to support live DT for some driver
Kever Yang [Wed, 4 Mar 2020 00:59:50 +0000 (08:59 +0800)]
usb: Migrate to support live DT for some driver

Use ofnode_ instead of fdt_ APIs so that the drivers can support live DT.
This patch updates usb_get_dr_mode() and usb_get_maximum_speed() to use
ofnode as parameter instead of fdt offset. And all the drivers who use
these APIs update to use live dt APIs at the same time.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agousb: ehci-msm: Use dev interface to get device address
Kever Yang [Wed, 4 Mar 2020 00:59:49 +0000 (08:59 +0800)]
usb: ehci-msm: Use dev interface to get device address

Use dev_read_addr_ptr() instead of devfdt_get_addr() so that we can support
live DT.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
4 years agousb: dwc3-of-simple: Drop redundant inclding header file
Kever Yang [Wed, 4 Mar 2020 00:59:48 +0000 (08:59 +0800)]
usb: dwc3-of-simple: Drop redundant inclding header file

The fdtdec.h is no use in this file, remove the include code.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
Tom Rini [Sun, 12 Apr 2020 12:10:13 +0000 (08:10 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx

- Fixes DDR initialization failure on PowerPC boards like P3041DS,
  P4080DS

4 years agoMerge branch '2020-04-11-CI-further-improvements' into next
Tom Rini [Sat, 11 Apr 2020 15:18:14 +0000 (11:18 -0400)]
Merge branch '2020-04-11-CI-further-improvements' into next

- Further clean up and improve our Azure/GitLab/Travis CI loops

4 years agotravis/gitlab/azure: Run cppcheck in parallel
Simon Glass [Sun, 5 Apr 2020 20:35:43 +0000 (14:35 -0600)]
travis/gitlab/azure: Run cppcheck in parallel

This takes ages to run single-threaded. Adjust it to use all available
processors.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agotest/py: Allow using buildman to build U-Boot
Simon Glass [Wed, 18 Mar 2020 15:43:01 +0000 (09:43 -0600)]
test/py: Allow using buildman to build U-Boot

It is a pain to have to set the CROSS_COMPILE environment variable when
using test.py's --build option. It is possible to get this using the -A
option from buildman. But it seems better to just use buildman to do the
build when it is available.

However using buildman adds a new dependency to the test system which we
want to avoid. So leave the default as is and add a flag to make it use
buildman.

Note that most of these changes relate to test.py and the parts of the
travis/gitlab/azure scripts which relate to running test and building a
suitable U-Boot to run the tests on.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Drop repeated buildman call with test.py
Simon Glass [Wed, 18 Mar 2020 15:43:00 +0000 (09:43 -0600)]
travis/gitlab/azure: Drop repeated buildman call with test.py

It does not seem to be necessary to run buildman again to show errors,
since any errors can be shown by the first invocation and there is only
a single board being built. Update this to simplify the code, using the
-e flag to make sure errors are shown.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Simplify the exit code for test.py
Simon Glass [Wed, 18 Mar 2020 15:42:59 +0000 (09:42 -0600)]
travis/gitlab/azure: Simplify the exit code for test.py

It seems unnecessary to read the exit code and then check it again. Drop
this and just let the test.py provide the exit code directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Enable test_handoff
Simon Glass [Wed, 18 Mar 2020 15:42:58 +0000 (09:42 -0600)]
travis/gitlab/azure: Enable test_handoff

Ensure that this SPL test runs on gitlab.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Use -W to avoid warnings check
Simon Glass [Wed, 18 Mar 2020 15:42:57 +0000 (09:42 -0600)]
travis/gitlab/azure: Use -W to avoid warnings check

We can use the -W flag to tell buildman to ignore warnings. Since we also
have -E defined, compiler warnings are promoted to errors, so they will
still cause a failure. But migration warnings of the form:

    ===================== WARNING ======================
    This board does not use CONFIG_DM. CONFIG_DM will be
    compulsory starting with the v2020.01 release.
    Failure to update may result in board removal.
    See doc/driver-model/migration.rst for more info.

will now be ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 329f5ef51d2 (travis.yml: run buildman with option -E)
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Use bash to avoid a_test_which_does_not_exist
Simon Glass [Wed, 18 Mar 2020 15:42:56 +0000 (09:42 -0600)]
travis/gitlab/azure: Use bash to avoid a_test_which_does_not_exist

Bash allows for variables to expand only if non-empty:

$ var=test
$ echo ${var:+"$var"}
test
$ echo ${var:+"-k $var"}
-k test
$ var=
$ echo ${var:+"-k $var"}

Use this feature to avoid the workaround.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agogitlab/azure: Use -w flag for all test.py builds
Simon Glass [Wed, 18 Mar 2020 15:42:55 +0000 (09:42 -0600)]
gitlab/azure: Use -w flag for all test.py builds

Avoid needing to know about the internal .bm-work directory, by passing
the -w flag to buildman.

This is not needed on travis since the -w flag is already used (from a
previous patch).

Drop the -P flag since this has no effect if -w is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agogitlab/azure: Drop unnecessary if..fi when using test.py
Simon Glass [Wed, 18 Mar 2020 15:42:54 +0000 (09:42 -0600)]
gitlab/azure: Drop unnecessary if..fi when using test.py

Since TEST_PY_BD is always defined we can drop this check.

This does not affect travis since it has a single, unified script.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Drop the buildman -d flag
Simon Glass [Wed, 18 Mar 2020 15:42:53 +0000 (09:42 -0600)]
travis/gitlab/azure: Drop the buildman -d flag

This has no effect since -S is not given also. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Drop BUILDMAN variable with test.py
Simon Glass [Wed, 18 Mar 2020 15:42:52 +0000 (09:42 -0600)]
travis/gitlab/azure: Drop BUILDMAN variable with test.py

This is not needed in the test.py part of the config, now since we use the
same name as the pytests.

Drop BUILDMAN, retaining it only for the 'build' parts of the config, i.e.
where we build multiple boards and don't run any tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis/gitlab/azure: Use --board buildman flag with test.py
Simon Glass [Wed, 18 Mar 2020 15:42:51 +0000 (09:42 -0600)]
travis/gitlab/azure: Use --board buildman flag with test.py

The current method of selecting the board to build with test.py is a bit
error-prone, e.g. with "^sandbox$" it actually builds 5 boards (all of
those in the sandbox architecture).

Use the (newish) --board flag instead, to get the same result.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agogitlab/azure: Use the -w option for sandbox_spl
Simon Glass [Wed, 18 Mar 2020 15:42:50 +0000 (09:42 -0600)]
gitlab/azure: Use the -w option for sandbox_spl

Avoid needing to know about the internal .bm-work directory, by passing
the -w flag to buildman.

This does not affect travis since the previous commit already used the -w
flag.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis: Split the building into two parts
Simon Glass [Wed, 18 Mar 2020 15:42:49 +0000 (09:42 -0600)]
travis: Split the building into two parts

Buildman is used in two ways:

- to build a selection of boards (with no testing)
- to build a single board (and run pytest)

The gitlab and azure scrips do this in separate places, but travis does
not. To aid the refactoring process and keep the following patches in sync
across all three environments, split the code out in travis as well.

Use the buildman -w option for the single board. It is easier to
understand since it specifies the output directory directly. Also it
avoids needing to look at the internal .bm-work directory.

This initially creates some duplicate code, but by the end of the series
we have two completely different build paths with different arguments.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotravis: Don't copy files into .bm-work/
Simon Glass [Wed, 18 Mar 2020 15:42:48 +0000 (09:42 -0600)]
travis: Don't copy files into .bm-work/

At present if TEST_PY_BD is empty the script copies various files into a
directory, to no purpose. This happens because UBOOT_TRAVIS_BUILD_DIR is
set before TEST_PY_BD is tested.

Move the 'if' to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agobuildman: Drop the -a option
Simon Glass [Wed, 18 Mar 2020 15:42:47 +0000 (09:42 -0600)]
buildman: Drop the -a option

There is no point in setting the ARCH environment variable since the
U-Boot build system no-longer uses it.

It seems safe to drop this feature since it was only recently added.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agobuildman: Allow building within a subdir of the current dir
Simon Glass [Wed, 18 Mar 2020 15:42:46 +0000 (09:42 -0600)]
buildman: Allow building within a subdir of the current dir

This is useful in some situations, in particular with -w and when building
in-tree. Now that we are more careful about what we remove in
_PrepareOutputSpace(), it should be safe to relax this restriction.

Update the progress information also so it is clear what buildman is
doing. Remove files can take a long time.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Be more selective about which directories to remove
Simon Glass [Wed, 18 Mar 2020 15:42:45 +0000 (09:42 -0600)]
buildman: Be more selective about which directories to remove

At present buildman removes any directory it doesn't intend to write
output into. This is overly expansive since if the output directory
happens to be somewhere with existing files, they may be removed. Using
an existing directory for buildman is not a good practice, but since the
result might be catastrophic, it is best to guard against it.

A previous commit[1] fixed this by refusing to write to a subdirectory
of the current directory, assumed to have U-Boot source code. But we can
do better by only removing directories that look like the ones buildman
creates.

Update the code to do this and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
[1] 409fc029c40 tools: buildman: Don't use the working dir as build dir

4 years agobuildman: Allow ignoring warnings in the return code
Simon Glass [Wed, 18 Mar 2020 15:42:44 +0000 (09:42 -0600)]
buildman: Allow ignoring warnings in the return code

Sometimes we don't want buildman to return failure if it seems warnings.
Add a -W option to support this. If buildman detects warnings (and no
errors) it will return an exit code of 0 (success).

Note that the definition of 'warnings' includes the migration warnings
produced by U-Boot, such as:

    ===================== WARNING ======================
    This board does not use CONFIG_DM_MMC. Please update
    ...
    ====================================================

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agobuildman: Update help for -d
Simon Glass [Wed, 18 Mar 2020 15:42:43 +0000 (09:42 -0600)]
buildman: Update help for -d

This help is a bit ambiguous. It only does anything if asked to show size
changes with -S. Update the help and the function comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobulidman: Add support for a simple build
Simon Glass [Wed, 18 Mar 2020 15:42:42 +0000 (09:42 -0600)]
bulidman: Add support for a simple build

It is useful to run a simple build and put all the output in a single
directory. Add a -w option to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agobuildman: Document the members of BuilderJob
Simon Glass [Wed, 18 Mar 2020 15:42:41 +0000 (09:42 -0600)]
buildman: Document the members of BuilderJob

This class has a few more members now. Add documentation for them and fix
a nit in the 'commits' comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agomain: Drop show_boot_progress() prototype
Simon Glass [Wed, 18 Mar 2020 15:42:40 +0000 (09:42 -0600)]
main: Drop show_boot_progress() prototype

This is defined in bootstage.h and is not called in this file anyway. Drop
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agosandbox: Add documentation about required/useful packages
Simon Glass [Wed, 18 Mar 2020 15:42:39 +0000 (09:42 -0600)]
sandbox: Add documentation about required/useful packages

Quite a few packages are used by sandbox or tools. Add a list of these to
help people setting up for the first time.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch '2020-04-10-gitlab-travis-gcc9' into next
Tom Rini [Fri, 10 Apr 2020 22:28:20 +0000 (18:28 -0400)]
Merge branch '2020-04-10-gitlab-travis-gcc9' into next

- Switch over to using GCC-9.2.0 in our Azure, GitLab and Travis-CI
  instances

4 years agotravis: Switch to gcc 9.2.0
Bin Meng [Mon, 6 Apr 2020 13:07:00 +0000 (06:07 -0700)]
travis: Switch to gcc 9.2.0

Use gcc 9.2.0 to do the build testing.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agobuildman: Support fetching gcc 9.2.0
Bin Meng [Mon, 6 Apr 2020 13:06:59 +0000 (06:06 -0700)]
buildman: Support fetching gcc 9.2.0

This adds support to fetch gcc 9.2.0 toolchains.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agovideo: sunxi: Change sunxi_get_mon_desc() to not return NULL for the default case
Bin Meng [Mon, 6 Apr 2020 13:06:58 +0000 (06:06 -0700)]
video: sunxi: Change sunxi_get_mon_desc() to not return NULL for the default case

When building with gcc 9.2.0, the following build warning was seen:

  drivers/video/sunxi/sunxi_display.c: In function 'video_hw_init':
  drivers/video/sunxi/sunxi_display.c:1217:2:
    error: '%s' directive argument is null [-Werror=format-overflow=]

Change sunxi_get_mon_desc() to not return NULL for the default case,
to fix the compiler warning.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoazure/gitlab/travis: Add RISC-V SPL testing
Bin Meng [Sat, 28 Mar 2020 14:25:29 +0000 (07:25 -0700)]
azure/gitlab/travis: Add RISC-V SPL testing

This adds QEMU RISC-V 32/64 SPL testing. Unlike QEMU RISC-V 32/64,
we test SPL running in M-mode and U-Boot proper running in S-mode,
with a 4-core SMP configuration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agotest/py: Update u_boot_utils.find_ram_base to bypass the low 2MiB memory
Bin Meng [Sat, 28 Mar 2020 14:25:28 +0000 (07:25 -0700)]
test/py: Update u_boot_utils.find_ram_base to bypass the low 2MiB memory

On some RISC-V targets the low memory is protected that prevents
S-mode U-Boot from access.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoazure/gitlab/travis: Add qemu-riscv32 testing
Bin Meng [Sat, 28 Mar 2020 14:25:27 +0000 (07:25 -0700)]
azure/gitlab/travis: Add qemu-riscv32 testing

This adds the qemu-riscv32_defconfig test configuration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>