Commit Graph

164 Commits

Author SHA1 Message Date
Pali Rohár
6cfd09d4ed Nokia RX-51: Add automated test for running RX-51 build in qemu
This patch contains test/nokia_rx51_test.sh script which automatically
download and compile all needed tools in local temporary directory to
generate a simple MTD images for booting Maemo kernel image by U-Boot from
RAM, eMMC and OneNAND. MTD images are then run in virtual n900 machine
provided by qemu-linaro project.

This script does not need any special privileges, so it can be run as
non-root nobody user.

It can be used to check that U-Boot for Nokia N900 is not broken and can be
successfully booted in emulator.

Script is registered to .azure-pipelines.yml, .gitlab-ci.yml and
.travis.yml so it would be automatically run on those CI services.

Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-19 14:41:04 +05:30
Tom Rini
98178bdcdd travis: Switch over to using LLVM-10
At this point LLVM-7 is rather old.  Switch over to LLVM-10 to enable
some amount of CI coverage with newer compilers.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-27 17:48:40 -04:00
Tom Rini
7b8a43e713 travis: Update ARC toolchain to 2019.09
Per Alexey Brodkin, this is the current toolchain we should use when
building for ARC, update.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-27 16:41:11 -04:00
Simon Glass
08140dba0f travis: Correct error checking when building boards
At present if buildman reports an error, the travis build still succeeds.

This is because the travis script does not stop when it sees errors; nor
does it automatically return the exit code. Also the current error
checking never triggers since 'ret' is not set.

Fix this by setting 'ret' correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2020-04-24 10:51:56 -04:00
AKASHI Takahiro
5bf1ea63b1 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>
2020-04-16 08:12:47 +02:00
Simon Glass
4ee7f52781 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>
2020-04-10 21:36:37 -04:00
Simon Glass
7ec1255cea 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>
2020-04-10 21:36:36 -04:00
Simon Glass
cec1e856d3 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>
2020-04-10 21:33:09 -04:00
Simon Glass
e28e9db69c 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>
2020-04-10 21:33:09 -04:00
Simon Glass
dd5c954e91 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: 329f5ef51d (travis.yml: run buildman with option -E)
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10 21:33:09 -04:00
Simon Glass
4080d0970d 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>
2020-04-10 21:32:53 -04:00
Simon Glass
b52f5a1958 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>
2020-04-10 21:32:09 -04:00
Simon Glass
573605d441 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>
2020-04-10 21:32:09 -04:00
Simon Glass
38806650fe 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>
2020-04-10 21:28:57 -04:00
Simon Glass
e7c05b1fda 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>
2020-04-10 21:24:01 -04:00
Simon Glass
f08c8ef9b7 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>
2020-04-10 21:22:45 -04:00
Bin Meng
ddd4d99247 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>
2020-04-10 15:54:16 -04:00
Bin Meng
49fb28a4b2 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>
2020-04-10 15:54:16 -04:00
Bin Meng
a379d330a9 azure/gitlab/travis: Add qemu-riscv32 testing
This adds the qemu-riscv32_defconfig test configuration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-04-10 15:54:15 -04:00
Bin Meng
9eed8cdd3d travis: Build GRUB image for RISC-V 32-bit and 64-bit
This adds the GRUB image build for RISC-V 32-bit and 64-bit.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-04-10 15:54:15 -04:00
Bin Meng
091b48e07a travis: Replace pre-built ARM/ARM64 GRUB images with the one built from source
As of today travis uses the pre-built GRUB ARM/ARM64 images from
opensuse. But azure/gitlab are using images built from GRUB 2.04
source. This updates travis to build GRUB ARM/ARM64 UEFI targets
from source, to keep in sync with azure/gitlab.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-04-10 15:54:15 -04:00
Tom Rini
1f47e2aca4 Xilinx changes for v2020.07
common:
 - Align ENV_FAT_INTERFACE
 - Fix MAC address source print log
 - Improve based autodetection code
 
 xilinx:
 - Enable netconsole
 
 Microblaze:
 - Setup default ENV_OFFSET/ENV_SECT_SIZE
 
 Zynq:
 - Multiple DT updates/fixes
 - Use DEVICE_TREE environment variable for DTB selection
 - Switch to single zynq configuration
 - Enable NOR flash via DM
 - Minor SPL print removal
 - Enable i2c mux driver
 
 ZynqMP:
 - Print multiboot register
 - Enable cache commands in mini mtest
 - Multiple DT updates/fixes
 - Fix firmware probing when driver is not enabled
 - Specify 3rd backup RAM boot mode in SPL
 - Add SPL support for zcu102 v1.1 and zcu111 revA
 - Redesign debug uart enabling and psu_init delay
 - Enable full u-boot run from EL3
 - Enable u-boot.itb generation without ATF with U-Boot in EL3
 
 Versal:
 - Enable distro default
 - Enable others SPI flashes
 - Enable systems without DDR
 
 Drivers:
 - Gem:
   - Flush memory after freeing
   - Handle mdio bus separately
 - Watchdog:
   - Get rid of unused global data pointer
   - Enable window watchdog timer
 - Serial:
   - Change reinitialization logic in zynq serial driver
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCXoxw9wAKCRDKSWXLKUoM
 IbQxAKCK23yTy4FoN8oTGTYsbmLOA9kVUQCbBx8lg4nBeA8ihSaAnY+HMDF37YI=
 =Lg54
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2020.07

common:
- Align ENV_FAT_INTERFACE
- Fix MAC address source print log
- Improve based autodetection code

xilinx:
- Enable netconsole

Microblaze:
- Setup default ENV_OFFSET/ENV_SECT_SIZE

Zynq:
- Multiple DT updates/fixes
- Use DEVICE_TREE environment variable for DTB selection
- Switch to single zynq configuration
- Enable NOR flash via DM
- Minor SPL print removal
- Enable i2c mux driver

ZynqMP:
- Print multiboot register
- Enable cache commands in mini mtest
- Multiple DT updates/fixes
- Fix firmware probing when driver is not enabled
- Specify 3rd backup RAM boot mode in SPL
- Add SPL support for zcu102 v1.1 and zcu111 revA
- Redesign debug uart enabling and psu_init delay
- Enable full u-boot run from EL3
- Enable u-boot.itb generation without ATF with U-Boot in EL3

Versal:
- Enable distro default
- Enable others SPI flashes
- Enable systems without DDR

Drivers:
- Gem:
  - Flush memory after freeing
  - Handle mdio bus separately
- Watchdog:
  - Get rid of unused global data pointer
  - Enable window watchdog timer
- Serial:
  - Change reinitialization logic in zynq serial driver

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-07 17:13:35 -04:00
Michal Simek
f7c6ee7fe7 ARM: zynq: Switch to single zynq configurations
There are a lot of zynq configurations which can be merged together and use
only one for all. The similar change has been done for ZynqMP by commit
be1b6c32d9 ("arm64: zynqmp: Use zynqmp_virt platform")

Build SPL with u-boot.img for zc706 like this.
export DEVICE_TREE=zynq-zc706 && make xilinx_zynq_virt_defconfig && make -j8
u-boot.img is generic for all boards.

Tested on Zybo, zc702, zc706, zc770-xm011-x16, cc108 and microzed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06 12:51:31 +02:00
Tom Rini
7261833f36 Azure / GitLab / Travis: Add Kconfig unit tests to a job
The Kconfig language provides a unit test that can be run.  As these
require pytest to be installed and run very quickly, bundle them in to
an existing CI job.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-16 18:54:18 -04:00
Tom Rini
2d4cd12dc2 Azure/Travis: Re-sync jobs and clarify exclusions
We keep both of these jobs in sync as much as possible even when the
primary motivation is to keep Travis from exceeding the build time limit
there.  With that in mind:
- Use "rk" not "rockchip" to get all Rockchip SoC platforms in one job,
  rather than just all Rockchip vendor platforms.
- The NXP LX216* SoCs have their own job, exclude them from the AArch64
  generic job.
- SoCFPGA SoCs have their own job, exclude them from the AArch64 generic
  job.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-09 13:01:57 -04:00
Heinrich Schuchardt
bb9a76ea67 travis: build HTML docs
Several patches delivered incorrect restructured text as documentation.
We should be able to discover this in Travis CI.

Provide a build step for 'make htmldocs'.

Add required package graphviz.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-25 09:06:40 -05:00
Tom Rini
f36f15b64b travis: Add python3-sphinx to the package list
In order to build htmldocs we need sphinx-build which comes from
python3-sphinx.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-25 09:06:40 -05:00
Tom Rini
26a426a100 travis/gitlab/azure: Ensure we use python3 always
When running our tests there are some cases where as part of the Python
2.7 to Python 3.6 migration we didn't force Python 3.6 to be used as
everything wasn't yet migrated.  Now that everything is, make sure to
tell virtualenv to use python3.  In the case of Travis this is best done
by making the tools test happen after the main tests so that it will
already have been run in all cases, TEST_PY_TOOLS is a subset of
TEST_PY_BD.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-02-13 10:10:50 -05:00
Simon Glass
96d0cd4604 sandbox: sdl: Move to use SDL2
Sandbox currently uses SDL1.2. SDL2 has been around for quite a while and
is widely supported. It has a number of useful features. It seems
appropriate to move sandbox over.

Update the code to use SDL2 instead of SDL1.2.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Tom Rini
88366b96ee travis: Switch to QEMU v4.2.0 globally
Given our tests in GitLab / Azure we can use QEMU v4.2.0 for all
platforms now.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-01-11 08:07:03 -05:00
Heiko Schocher
af77162504 travis: rework NXP layerscape jobs
remove from NXP arm32 all layerscape boards and
build them instead in already existing layerscape
jobs (which now not only build aarch64 boards)

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-11-23 10:28:56 -05:00
Heiko Schocher
56d35f2ed4 travis: move orangepi to vendor job
move orangepi builds into a new job, and exclude
orangepi builds from sunxi and rockchip jobs.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-23 10:28:56 -05:00
Tom Rini
626b0389ec travis: Fix the clang-7 test
When using the OVERRIDE variable we need to pass -O to buildman as well
to use the "override" option to buildman.

Fixed: e9500f49ea ("travis: Use buildman for building with clang")
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-11-06 22:54:28 -05:00
Tom Rini
14d39c9e1d travis: Rework how we write the ~/.buildman file
With python3 we're now tripping over a long-standing problem with how we
add to the buildman file with some toolchains.  We cannot have multiple
toolchain-alias sections as that leads to a parse error.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-11-05 10:44:16 -05:00
Tom Rini
085b8978b9 gitlab/travis: Rework how and when we use virtualenv in order to use python3
As things stand today, we have tools that CI requires where "python"
must be "python2".  We need to use a virtualenv and pip in order to
ensure that our pytest tests can be run.  Rework things slightly so
that:
- On Travis-CI, we install python-pyelftools for the platforms that
  require pyelftools to be installed.
- On GitLab-CI, we move to a newer base image that includes python3-pip
  and continue to use a virtualenv per job that needs it, for the
  correct set of packages.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org> [on sandbox]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30 17:48:47 -04:00
Marek Vasut
3c941e048c test/py: Fix pytest4 deprecation warnings
Fix the following spit from pytest:

u-boot/test/py/conftest.py:438: RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly.
  Please use node.get_closest_marker(name) or node.iter_markers(name).
  Docs: https://docs.pytest.org/en/latest/mark.html#updating-code
    for board in mark.args:

In both cases, the later suggestion is applicable.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Igor Opaniuk <igor.opaniuk@gmail.com>
[trini: Update for current file with a few more cases, un-pin pytest in CI]
Tested-by: Simon Glass <sjg@chromium.org> [on sandbox]
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30 17:48:47 -04:00
Bin Meng
d3c369d196 .travis.yml: Remove the unneeded '&' for ls20xx buildman
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-10-29 16:17:36 -04:00
Tom Rini
568356d8d6 travis: Split and rename xilinx ARM in to two jobs
Split the ARMv7 and AArch64 platforms into separate jobs, to avoid them
taking too long to build overall.  Also rename them from "Xilinx" to
"Zynq*" to reflect slightly better what is being built and to pull in a
few more board matches.

Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-16 18:09:55 -04:00
Tom Rini
95b2215434 travis: Split sun8i in to two jobs
Split the 32bit and 64bit platforms into separate jobs, to avoid them
taking too long to build overall.

Cc: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-16 18:09:26 -04:00
Tom Rini
984c0051a5 travis: Split i.MX jobs a bit more
- Split "tqc" and "technexion" out into their own jobs and exclude
  them from the catch-all jobs
- Clarify the job labels a little more.

Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2019-10-16 18:09:26 -04:00
Heinrich Schuchardt
cb578f0a87 arm: remove the H2200 board
U-Boot cannot be built for h2200_defconfig with CONFIG_DM=y.

The maintainer Lukasz Dalek suggested to remove the board.
https://lists.denx.de/pipermail/u-boot/2019-August/380685.html

Cc: Lukasz Dalek <luk0104@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[trini: As this is the last non-toradex PXA board, update travis too]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-16 18:09:08 -04:00
Tom Rini
7a779ed175 travis: Exclude MIPS from the bcm job
We don't need to pull in anything from the MIPS job so exclude that from
the new bcm job and make it clear it's building only ARM.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-13 11:21:56 -04:00
Tom Rini
548aefa5b9 travis: Move keystone 3 (k3) boards into the k2 job
Build the keystone 3 platforms with the keystone 2 platforms, in order
to get back more room in the "catch-all" build jobs.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-09 11:44:59 -04:00
Tom Rini
50aeb3aecf travis: Split bcm SoCs into their own build job
As both "catch-all" ARM jobs are nearing their time limit, move all of
the bcm SoC boards into a single job.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-09 11:44:59 -04:00
Tom Rini
8b13e9bf1d travis.yml: Switch to bionic for the host distribution
To match what we're doing in GitLab, move to 'bionic' for these builds
as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-08 12:10:38 -04:00
Pierre-Jean Texier
1f3910da6e ci: add envtools support
This commit add envtools suppport to CI to verify if there
is no build issues.

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-09-24 17:46:13 -04:00
Ramon Fried
e327768c3a travis.yml: change Ubuntu version to xenial
trusty is getting old, move to xenial (16.04)
to get updated gcc and other tools.

Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
2019-09-19 12:18:53 -04:00
Heinrich Schuchardt
22c7b7d63b travis.yml: run Python tests on qemu-riscv64_defconfig
Run the Python tests on the RISC-V architecture too.

https://github.com/swarren/uboot-test-hooks has already been updated.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-08-02 11:29:38 -04:00
Simon Glass
53cd5d921d binman: Convert to use ArgumentParser
This class is the new way to handle arguments in Python. Convert binman
over to use it. At the same time, introduce commands so that we can
separate out the different parts of binman functionality.

Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24 12:54:07 -07:00
Simon Glass
4997a7ed05 binman: Add a utility library for coreboot CBFS
Coreboot uses a simple flash-based filesystem called Coreboot Filesystem
(CBFS) to organise files used during boot. This allows files to be named
and their position in the flash to be set. It has special features for
dealing with x86 devices which typically memory-map their SPI flash to the
top of 32-bit address space and need a 'boot block' ending there.

Create a library to help create and read CBFS files. This includes a
writer class, a reader class and associated other helpers. Only a subset
of features are currently supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-24 12:53:46 -07:00