Compare commits

..

11 Commits

Author SHA1 Message Date
Simon Glass
93e2b3cae6 gitlab: Resurrect the samus in the sjg lab
This ancient Chromebook that nobody cares about is working again, so
add it back.
2024-12-17 19:54:03 -07:00
Simon Glass
55b8a13ed8 gitlab: Resurrect the Beaglebone Black in the sjg lab
This is working again, so add it back.
2024-12-17 19:44:17 -07:00
Simon Glass
c978118f05 gitlab: Resurrect the Pine64+ in the sjg lab
This is working again, so add it back.

Series-to: u-boot
Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-17 19:44:13 -07:00
Simon Glass
e2c8c04eef gitlab: Add a Colibri iMX8 board to the sjg lab
I have one of these boards loaded with Linux 6.6.2 and a video demo. Add
an entry for it so that it can be used for testing.

Unfortunately quite a lot of work-arounds are needed to make this board
work, but I am working with the supplier on this.

Series-to: u-boot
Series-cc: Francesco Dolcini <francesco@dolcini.it>

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-17 06:43:48 -07:00
Simon Glass
edf0d45e6e buildman: Add a way to build a particular target
At present buildman only supports building the default target. Generally
this is what is wanted, but in some cases boards erroneously have a
different target for product extra files.

Add a --target option to help. Also add a comment indicating which
letters are free for new options.

Series-to: u-boot

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-17 06:26:03 -07:00
Simon Glass
fe93ca8cfa gitlab: Add a StarFive VisionFive2 to the sjg lab
I have one of these boards loaded with Ubuntu 24.10 (64-bit). Add an
entry for it so that it can be used for testing.

Series-to: u-boot
Series-cc: trini, heinrich
Series-version: 2
Series-changes: 2
- Rename the board to vf2
- Add a comment about what the board is

Cover-letter:
gitlab: Fixes to get StarFive VisionFive2 into the sjg lab
This board fought valiantly against attempts to add it to my lab. After
several hours of debugging, I found problems in the Labgrid integration
(not included here), test.py and buildman

This series fixes these and the board now seems to be reliable enough.

Note that the board fails test_dm_compat

Link: https://github.com/labgrid-project/labgrid/pull/1411
END

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-17 05:26:39 -07:00
Simon Glass
50aed486ba buildman: Record an error if a toolchain is missing
Buildman has always treated the lack of a toolchain as an infrastructure
problem rather than a build failure.

However the logic for this is not correct, since it does not write a
'done' file in this case.

As a result, one of two things can happen.

1. If a previous build ran in the same (output) directory, the outcome
   of *that* build is recorded as the outcome of this one
2. Otherwise, no outcome is recorded

Obviously this inconsistency is not ideal. While (2) is rare, it can be
very confusing as the build sort-of fails but does not produce any
summary output with 'buildman -s'

Overall it seems better to attribute a toolchain issue to the boards
that it affects. This results in clear failures which can be examined,
no matter what happened in the .bm-work directory previously.

So write a 'done' file for each build when a toolchain is missing.

The end result of this patch is to make missing toolchains much more
obvious. It should be things a bit easier for novice users.
2024-12-17 05:26:39 -07:00
Simon Glass
91ef837e8d buildman: Drop unused OUTPUT_FILE constant
This is not actually used but its presence suggests that it is the
filename for the board database. Drop it to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-17 05:26:39 -07:00
Simon Glass
99b5414df6 test/py: Handle u-boot-test-getrole failure
This script can fail if there is no toolchain available for the board.
At present this is not handled very nicely, in that only the error
output is reported. It is much more useful to see everything, so
combine stdout and stderr and report them both.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-17 05:26:38 -07:00
Simon Glass
370cb45fb6 test/py: Provide the correct U_BOOT_SOURCE_DIR to getrole
The u-boot-test-getrole script runs before the normal environment
variables have been set up. This is unavoidable since the script is
providing necessary information to test.py

This means that U_BOOT_SOURCE_DIR is not set in the environment.

As a result, Labgrid uses its default source path, configured in its
environment variable. While this may happen to work, it is not correct.
Also, it causes problems when running from Gitlab, where the runner may
not have access to that source path.

Provide the required source path in U_BOOT_SOURCE_DIR so that Labgrid
does the right thing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: bf89a8f1fc ("test: Introduce the concept of a role")

[1] https://patchwork.ozlabs.org/project/uboot/patch/20241211131858.520639-1-sjg@chromium.org/

Commit-notes:
This patch is intended to be applied on top of [1], which fixes a
similar issue, but only within pytest itself. It should be possible to
drop that patch and just use this one, but it is a bit nonsensical to
ask Labgrid for something which test.py already knows, so both patches
are valuable.
END
2024-12-17 05:26:38 -07:00
Simon Glass
9377811177 gitlab: Add an rpi to the sjg lab
I have an original rpi installed now, loaded with OS Lite (32-bit)
Add an entry for it so that it can be used for testing.

Series-to: u-boot
Series-cc: trini

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-17 05:26:28 -07:00
7 changed files with 52 additions and 19 deletions

View File

@@ -588,11 +588,10 @@ pcduino3_nano:
ROLE: pcduino3_nano
<<: *lab_dfn
# samus has a hardware failure 30-Nov-24
#samus:
# variables:
# ROLE: samus
# <<: *lab_dfn
samus:
variables:
ROLE: samus
<<: *lab_dfn
link:
variables:
@@ -644,22 +643,21 @@ rpi3z:
ROLE: rpi3z
<<: *lab_dfn
# bbb has a hardware failure 30-Nov-24
#bbb:
# variables:
# ROLE: bbb
# <<: *lab_dfn
bbb:
variables:
ROLE: bbb
<<: *lab_dfn
kevin:
variables:
ROLE: kevin
<<: *lab_dfn
# pine64 has a hardware failure 30-Nov-24
#pine64:
# variables:
# ROLE: pine64
# <<: *lab_dfn
# pine64+
pine64:
variables:
ROLE: pine64
<<: *lab_dfn
# c4 needs binman supported added, so signing works
#c4:
@@ -692,7 +690,18 @@ nyan-big:
ROLE: nyan-big
<<: *lab_dfn
vision5:
rpi:
variables:
ROLE: vision5
ROLE: rpi
<<: *lab_dfn
# StarFive VisionFive 2
vf2:
variables:
ROLE: vf2
<<: *lab_dfn
colibrimx8:
variables:
ROLE: colibrimx8
<<: *lab_dfn

View File

@@ -265,7 +265,7 @@ class Builder:
reproducible_builds=False, force_build=False,
force_build_failures=False, force_reconfig=False,
in_tree=False, force_config_on_failure=False, make_func=None,
dtc_skip=False):
dtc_skip=False, build_target=None):
"""Create a new Builder object
Args:
@@ -315,6 +315,7 @@ class Builder:
retrying a failed build
make_func (function): Function to call to run 'make'
dtc_skip (bool): True to skip building dtc and use the system one
build_target (str): Build target to use (None to use the default)
"""
self.toolchains = toolchains
self.base_dir = base_dir
@@ -363,6 +364,7 @@ class Builder:
raise ValueError('Cannot find dtc')
else:
self.dtc = None
self.build_target = build_target
if not self.squash_config_y:
self.config_filenames += EXTRA_CONFIG_FILENAMES

View File

@@ -286,6 +286,8 @@ class BuilderThread(threading.Thread):
"""
if config_only:
args.append('cfg')
elif self.builder.build_target:
args.append(self.builder.build_target)
result = self.make(commit, brd, 'build', cwd, *args, env=env)
cmd_list.append([self.builder.gnu_make] + args)
if (result.return_code == 2 and

View File

@@ -1329,6 +1329,10 @@ sometimes useful to have buildman wait until the others have finished. Use the
--process-limit option for this: --process-limit 1 will allow only one buildman
to process jobs at a time.
To build a particular target, rather than the default U-Boot target, use the
`--target` option. This is unlikely to be useful unless you are building a
single board.
Build summary
-------------

View File

@@ -22,6 +22,7 @@ def add_upto_m(parser):
This is split out to avoid having too many statements in one function
"""
# Available JqzZ
parser.add_argument('-a', '--adjust-cfg', type=str, action='append',
help='Adjust the Kconfig settings in .config before building')
parser.add_argument('-A', '--print-prefix', action='store_true',
@@ -153,6 +154,8 @@ def add_after_m(parser):
parser.add_argument('-T', '--threads', type=int,
default=None,
help='Number of builder threads to use (0=single-thread)')
parser.add_argument('--target', type=str,
default=None, help='Build target to use')
parser.add_argument('-u', '--show_unknown', action='store_true',
default=False, help='Show boards with unknown build result')
parser.add_argument('-U', '--show-environment', action='store_true',

View File

@@ -785,6 +785,9 @@ def do_buildman(args, toolchains=None, make_func=None, brds=None,
args.verbose)
return 0
if args.config_only and args.target:
raise ValueError('Cannot use --config-only with --target')
# Create a new builder with the selected args
builder = Builder(toolchains, output_dir, git_dir,
args.threads, args.jobs, checkout=True,
@@ -810,7 +813,7 @@ def do_buildman(args, toolchains=None, make_func=None, brds=None,
force_build_failures = args.force_build_failures,
force_reconfig = args.force_reconfig, in_tree = args.in_tree,
force_config_on_failure=not args.quick, make_func=make_func,
dtc_skip=args.dtc_skip)
dtc_skip=args.dtc_skip, build_target=args.target)
TEST_BUILDER = builder

View File

@@ -1152,3 +1152,13 @@ CONFIG_SOC="fred"
'board': 'ARM Board 0',
'config': 'config0',
'target': 'board0'}, []), res)
def testTarget(self):
"""Test that the --target flag works"""
lines = self.check_command('--target', 'u-boot.dtb')[0]
# It should not affect the defconfig line
self.assertNotIn(b'u-boot.dtb', lines[0])
# It should appear at the end of the build line
self.assertEqual(b'u-boot.dtb', lines[1].split()[-1])