Re: [PATCH 01/16] lib: fdtdec: Handle multiple memory nodes

2024-06-11 Thread Heinrich Schuchardt
Am 11. Juni 2024 20:51:55 MESZ schrieb Simon Glass : >Hi Jiaxun, > >On Tue, 11 Jun 2024 at 07:48, Jiaxun Yang wrote: >> >> >> >> 在2024年6月11日六月 下午1:26,Heinrich Schuchardt写道: >> Hi Heinrich, >> >> Thanks for your comments, will fix most of them in next reversion. >> >> [...] >> >> -

Re: [PATCH 17/42] google: Disable TPMv2 on most Chromebooks

2024-06-11 Thread Ilias Apalodimas
On Tue, 11 Jun 2024 at 23:02, Simon Glass wrote: > > This feature is not present on older Chromebooks, so disable the > setting. > > Signed-off-by: Simon Glass > --- > > configs/chromebook_link64_defconfig| 1 + > configs/chromebook_link_defconfig | 1 + >

Re: [RFC PATCH 15/31] efi_memory: add an event handler to update memory map

2024-06-11 Thread Ilias Apalodimas
[...] > > > > > > > > + struct event_lmb_map_update *lmb_map = >data.lmb_map; > > > > > > > > + > > > > > > > > + addr = (uintptr_t)map_sysmem(lmb_map->base, 0); > > > > > > > > + pages = efi_size_in_pages(lmb_map->size + (addr & > > > > > > > > EFI_PAGE_MASK)); > > > > > > > > + op =

Re: [RFC PATCH 04/31] lmb: remove local instances of the lmb structure variable

2024-06-11 Thread Ilias Apalodimas
On Wed, 12 Jun 2024 at 05:41, Simon Glass wrote: > > Hi Tom, > > On Tue, 11 Jun 2024 at 16:55, Tom Rini wrote: > > > > On Tue, Jun 11, 2024 at 04:08:56PM -0600, Simon Glass wrote: > > > Hi Tom, > > > > > > On Tue, 11 Jun 2024 at 15:01, Tom Rini wrote: > > > > > > > > On Tue, Jun 11, 2024 at

Re: [RFC PATCH 15/31] efi_memory: add an event handler to update memory map

2024-06-11 Thread Simon Glass
Hi Tom, On Tue, 11 Jun 2024 at 16:54, Tom Rini wrote: > > On Tue, Jun 11, 2024 at 04:22:25PM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Tue, 11 Jun 2024 at 15:01, Tom Rini wrote: > > > > > > On Tue, Jun 11, 2024 at 12:52:19PM -0600, Simon Glass wrote: > > > > Hi, > > > > > > > > On Tue,

Re: [RFC PATCH 04/31] lmb: remove local instances of the lmb structure variable

2024-06-11 Thread Simon Glass
Hi Tom, On Tue, 11 Jun 2024 at 16:55, Tom Rini wrote: > > On Tue, Jun 11, 2024 at 04:08:56PM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Tue, 11 Jun 2024 at 15:01, Tom Rini wrote: > > > > > > On Tue, Jun 11, 2024 at 12:52:22PM -0600, Simon Glass wrote: > > > > Hi Sughosh, > > > > > > > >

[PATCH v3 9/9] doc: convert README.LED to .rst documentation

2024-06-11 Thread Christian Marangi
Convert README.LED to .rst documentation and include all the relevant documentation in the status_led.h. Signed-off-by: Christian Marangi --- doc/README.LED | 77 -- doc/api/index.rst | 1 + doc/api/status_led.rst | 35 +++ include/status_led.h | 224

[PATCH v3 8/9] ubi: implement support for LED status activity

2024-06-11 Thread Christian Marangi
Implement support for LED status activity. If the feature is enabled, make the defined ACTIVITY LED to signal ubi write operation. Signed-off-by: Christian Marangi --- cmd/ubi.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cmd/ubi.c b/cmd/ubi.c index

[PATCH v3 7/9] mtd: implement support for LED status activity

2024-06-11 Thread Christian Marangi
Implement support for LED status activity. If the feature is enabled, make the defined ACTIVITY LED to signal mtd write or erase operations. Signed-off-by: Christian Marangi --- cmd/mtd.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/cmd/mtd.c b/cmd/mtd.c index

[PATCH v3 6/9] tftp: implement support for LED status activity

2024-06-11 Thread Christian Marangi
Implement support for LED status activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Signed-off-by: Christian Marangi --- net/tftp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/tftp.c b/net/tftp.c index 2e335413492..0515dc34d4b 100644 ---

[PATCH v3 5/9] led: status_led: add new activity LED config and functions

2024-06-11 Thread Christian Marangi
Add a new activity LED config and additional functions to implement a simple software blink feature to signal activity of any kind. Usual activity might be a file transfer with TFTP, a flash write... User of this API will call status_led_activity_start/stop() on each activity and LED will be

[PATCH v3 4/9] led: status_led: add warning when an invalid Status LED ID is used

2024-06-11 Thread Christian Marangi
Add a warning when an invalid Status LED ID is used to make the user aware of bad configurations. Signed-off-by: Christian Marangi --- drivers/misc/status_led.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c index

[PATCH v3 3/9] led: status_led: add function to toggle a status LED

2024-06-11 Thread Christian Marangi
Add function to toggle a status LED by using the status LED ID reference configs. Signed-off-by: Christian Marangi --- drivers/misc/status_led.c | 28 +++- include/status_led.h | 1 + 2 files changed, 24 insertions(+), 5 deletions(-) diff --git

[PATCH v3 2/9] led: status_led: add support for white LED colour

2024-06-11 Thread Christian Marangi
Add support for white LED colour present on many devices. Signed-off-by: Christian Marangi --- cmd/legacy_led.c| 6 ++ common/board_f.c| 2 ++ drivers/led/Kconfig | 14 ++ drivers/misc/gpio_led.c | 12 include/status_led.h| 4 5 files

[PATCH v3 1/9] misc: gpio_led: fix broken coloured LED status functions

2024-06-11 Thread Christian Marangi
The GPIO LED driver is a backend to provide LED status functions via the GPIO common functions. The coloured LED functions are currently broken and deviates from what is written in README.LED Quoting the README.LED: CONFIG_STATUS_LED_RED is the red LED. It is used to signal errors. This must be

[PATCH v3 0/9] misc: introduce STATUS LED activity function

2024-06-11 Thread Christian Marangi
This series expand the STATUS LED framework with a new color and a big new feature. One thing that many device need is a way to communicate to the user that the device is actually doing something. This is especially useful for recovery steps where an user (for example) insert an USB drive, keep a

Re: [RFC PATCH 04/31] lmb: remove local instances of the lmb structure variable

2024-06-11 Thread Tom Rini
On Tue, Jun 11, 2024 at 04:08:56PM -0600, Simon Glass wrote: > Hi Tom, > > On Tue, 11 Jun 2024 at 15:01, Tom Rini wrote: > > > > On Tue, Jun 11, 2024 at 12:52:22PM -0600, Simon Glass wrote: > > > Hi Sughosh, > > > > > > On Fri, 7 Jun 2024 at 12:53, Sughosh Ganu wrote: > > > > > > > > With the

Re: [RFC PATCH 15/31] efi_memory: add an event handler to update memory map

2024-06-11 Thread Tom Rini
On Tue, Jun 11, 2024 at 04:22:25PM -0600, Simon Glass wrote: > Hi Tom, > > On Tue, 11 Jun 2024 at 15:01, Tom Rini wrote: > > > > On Tue, Jun 11, 2024 at 12:52:19PM -0600, Simon Glass wrote: > > > Hi, > > > > > > On Tue, 11 Jun 2024 at 08:36, Tom Rini wrote: > > > > > > > > On Tue, Jun 11, 2024

Re: [u-boot-test-hooks PATCH 4/4] qemu-loongarch64: New board

2024-06-11 Thread Simon Glass
On Tue, 11 Jun 2024 at 15:01, Jiaxun Yang wrote: > > Signed-off-by: Jiaxun Yang > --- > bin/travis-ci/conf.qemu-loongarch64_na | 12 > py/travis-ci/u_boot_boardenv_qemu_loongarch64_na.py | 11 +++ > 2 files changed, 23 insertions(+) > create mode 100644

Re: [u-boot-test-hooks PATCH 3/4] qemu-xtensa-dc233c: New board

2024-06-11 Thread Simon Glass
On Tue, 11 Jun 2024 at 15:01, Jiaxun Yang wrote: > > Signed-off-by: Jiaxun Yang > --- > bin/travis-ci/conf.qemu-xtensa-dc233c_na | 12 > .../u_boot_boardenv_qemu_xtensa_dc233c_na.py | 6 ++ > 2 files changed, 18 insertions(+) > create mode 100644

Re: [u-boot-test-hooks PATCH 2/4] qemu-arm64be: New board

2024-06-11 Thread Simon Glass
On Tue, 11 Jun 2024 at 15:01, Jiaxun Yang wrote: > > Signed-off-by: Jiaxun Yang > --- > bin/travis-ci/conf.qemu_arm64be_na | 13 + > py/travis-ci/u_boot_boardenv_qemu_arm64be_na.py | 10 ++ > 2 files changed, 23 insertions(+) > create mode 100644

Re: [u-boot-test-hooks PATCH 1/4] qemu-vexpress*: Pass -audio none

2024-06-11 Thread Simon Glass
On Tue, 11 Jun 2024 at 15:01, Jiaxun Yang wrote: > > Those boards have build in sound card which cause > problems on CI runner. > > Pass -audio none to disable sound card backends. > > Signed-off-by: Jiaxun Yang > --- > bin/travis-ci/conf.vexpress_ca15_tc2_qemu | 2 +- >

Re: [RFC PATCH 15/31] efi_memory: add an event handler to update memory map

2024-06-11 Thread Simon Glass
Hi Tom, On Tue, 11 Jun 2024 at 15:01, Tom Rini wrote: > > On Tue, Jun 11, 2024 at 12:52:19PM -0600, Simon Glass wrote: > > Hi, > > > > On Tue, 11 Jun 2024 at 08:36, Tom Rini wrote: > > > > > > On Tue, Jun 11, 2024 at 12:17:16PM +0200, Heinrich Schuchardt wrote: > > > > On 07.06.24 20:52,

Re: [RFC PATCH 04/31] lmb: remove local instances of the lmb structure variable

2024-06-11 Thread Simon Glass
Hi Tom, On Tue, 11 Jun 2024 at 15:01, Tom Rini wrote: > > On Tue, Jun 11, 2024 at 12:52:22PM -0600, Simon Glass wrote: > > Hi Sughosh, > > > > On Fri, 7 Jun 2024 at 12:53, Sughosh Ganu wrote: > > > > > > With the move of the LMB structure to a persistent state, there is no > > > need to declare

Re: [PATCH] arm: dts: mvebu: Update DTS for Thecus N2350 board

2024-06-11 Thread Tony Dinh
Hi Dragan, On Sun, Jun 9, 2024 at 6:07 PM Dragan Simic wrote: > > Hello Tony, > > Please see a few comments below. > > On 2024-06-10 02:34, Tony Dinh wrote: > > - Change the spi-max-frequency to 5000 (50 Mhz). According to the > > data sheet[1], the MX25L3205D max frequency is 86 Mhz. Using

Re: [PATCH v2 1/1] drivers: bootcount: Add support for FAT filesystem

2024-06-11 Thread Vasileios Amoiridis
On Tue, Jun 11, 2024 at 06:29:34PM +0200, Quentin Schulz wrote: > Hi Vasileios, > > On 6/11/24 6:20 PM, Vasileios Amoiridis wrote: > > On Tue, Jun 11, 2024 at 10:06:59AM -0600, Tom Rini wrote: > > > On Tue, Jun 11, 2024 at 05:41:19PM +0200, Quentin Schulz wrote: > > > > Hi Vasileios, > > > > > >

[PATCH NFC 20/20] CI: Dockerfile: Replace some URL with mirror sites

2024-06-11 Thread Jiaxun Yang
Somehow when I'm trying to build dockerimage on 11 June 2024 multiple upstream sites are down. Arm site is returning 500 error, nasm.us domain expired, ftpmirror.gnu.org is down worldwide. I belive those problems are not permanent so made this change NFC. NOT FOR COMMIT! Signed-off-by: Jiaxun

[PATCH NFC 19/20] Use Jiaxun's CI Image

2024-06-11 Thread Jiaxun Yang
Use Jiaxun's CI Image for demonstration. NOT FOR COMMIT! Signed-off-by: Jiaxun Yang --- .azure-pipelines.yml| 4 ++-- .gitlab-ci.yml | 4 ++-- tools/docker/Dockerfile | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines.yml

[PATCH 18/20] doc: ci: Document how to run pipeline on gitlab.com

2024-06-11 Thread Jiaxun Yang
It's now possible to run CI job on gitlab.com. Document the process. Signed-off-by: Jiaxun Yang --- doc/develop/ci_testing.rst | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/develop/ci_testing.rst b/doc/develop/ci_testing.rst index

[PATCH 17/20] CI: Dockerfile: Add LoongArch64 support

2024-06-11 Thread Jiaxun Yang
Install LoongArch64 toolchains, build LoongArch64 QEMU, build LoongArch64 GRUB. Signed-off-by: Jiaxun Yang --- tools/docker/Dockerfile | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index

[PATCH 16/20] CI: Dockerfile: Bump various software version

2024-06-11 Thread Jiaxun Yang
Bump base OS to Ubuntu noble, grub to 2.12, QEMU to 9.0 (drop cherry-pick for m68k as it's already in 9.0) and other tools to latest version. Remove unsupported python2. Install some required python packages for buildman/binman. Signed-off-by: Jiaxun Yang --- tools/docker/Dockerfile | 35

[PATCH 15/20] CI: Dockerfile: Set global git name & email config

2024-06-11 Thread Jiaxun Yang
Set global git name & email config so we don't have to setup it for every project. Signed-off-by: Jiaxun Yang --- tools/docker/Dockerfile | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index

[PATCH 14/20] CI: GitLab: Split build_world tasks

2024-06-11 Thread Jiaxun Yang
Current build_world task runs for too long on public gitlab runner. Split the job as what we've done to azure pipeline. Signed-off-by: Jiaxun Yang --- .gitlab-ci.yml | 103 + 1 file changed, 59 insertions(+), 44 deletions(-) diff --git

[PATCH 13/20] CI: Ensure pip install is always performed in venv

2024-06-11 Thread Jiaxun Yang
Since Ubuntu focal it's nolonger permitted to perform global pip install. Ensure that pip install is always performed in venv. For buildman alone, all dependencies are already in docker so there is no need to perform pip install. Signed-off-by: Jiaxun Yang --- .azure-pipelines.yml | 16

[PATCH 12/20] cyclic: Rise default CYCLIC_MAX_CPU_TIME_US to 5000

2024-06-11 Thread Jiaxun Yang
The default value CYCLIC_MAX_CPU_TIME_US was 1000, which is a little bit too low for slower hardware and sandbox. On my MIPS Boston FPGA board with interaptiv CPU, wdt_cyclic can easily take 3200 us to run. On azure pipeline sandbox_clang, wdt_cyclic some times goes beyond 1300 us. Raise

[PATCH 11/20] lib/charset & efi: Fix possible unaligned accesses

2024-06-11 Thread Jiaxun Yang
As per armv7 arch spec, for A-profile CPU if translation is disabled, then the default memory type is Device(-nGnRnE) instead of Normal, which requires that alignment be enforced. This means in some cases we can't perform unaligned access even after allow_unaligned is called. We do have many

[PATCH 10/20] tests/test_event_dump: Relax match rule for output

2024-06-11 Thread Jiaxun Yang
event_dump.py relies on addr2line to obtain source location information, however newer addr2line is unable to determine line numbers for some functions. With addr2line from binutils 2.34 we got: Event typeId Source location

[PATCH 09/20] binman: Workaround lz4 cli padding in test cases

2024-06-11 Thread Jiaxun Yang
Newer lz4 util is not happy with any padding at end of file, it would abort with error message like: Stream followed by undecodable data at position 43. Workaround by skipping testCompUtilPadding test case and manually strip padding in testCompressSectionSize test case. Signed-off-by: Jiaxun

[PATCH 08/20] py: Bump pylint version and clear warnings

2024-06-11 Thread Jiaxun Yang
Bump pylint to 3.2.3 as old versions are not working with python 3.12. Clear warnings, mostly E0606: (possibly-used-before-assignment). Signed-off-by: Jiaxun Yang --- .azure-pipelines.yml | 2 +- .gitlab-ci.yml| 2 +- doc/develop/python_cq.rst

[PATCH 07/20] py: Bump requirements versions

2024-06-11 Thread Jiaxun Yang
Bump python packages to reasonable versions to fix build error with Python 3.12. Link: https://github.com/pytest-dev/pytest/pull/11094 Link: https://github.com/yaml/pyyaml/issues/736 Link: https://github.com/pypa/setuptools/issues/4002 Signed-off-by: Jiaxun Yang --- test/py/requirements.txt

[PATCH 06/20] py: Remove unused entries in requirements.txt

2024-06-11 Thread Jiaxun Yang
Many packages in requirements.txt are not actually imported/used by any test case, some of them was for python2 compatibility. Remove them to keep our environment clean. Signed-off-by: Jiaxun Yang --- doc/sphinx/requirements.txt | 1 - test/py/requirements.txt| 18 -- 2

[PATCH 05/20] doc/sphinx: Remove usage of six

2024-06-11 Thread Jiaxun Yang
We don't support python2 any more so there is no point to use six here. Signed-off-by: Jiaxun Yang --- doc/sphinx/kfigure.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/sphinx/kfigure.py b/doc/sphinx/kfigure.py index dea7f91ef5ab..9467e8d52ac0 100644 ---

[PATCH 04/20] py: Replace usage of configparser.read_fp

2024-06-11 Thread Jiaxun Yang
configparser.read_fp is deprecated long ago. Replace with relevant API. Signed-off-by: Jiaxun Yang --- tools/buildman/bsettings.py | 2 +- tools/patman/settings.py| 9 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/buildman/bsettings.py

[PATCH 03/20] py: Replace distutils.core with setuptools

2024-06-11 Thread Jiaxun Yang
distutils is deprecated long ago and being removed in python 3.12. Signed-off-by: Jiaxun Yang --- tools/binman/setup.py | 2 +- tools/buildman/requirements.txt | 1 + tools/dtoc/setup.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 02/20] binman: Replace pkg_resources with importlib.resources

2024-06-11 Thread Jiaxun Yang
pkg_resources is deprecated long ago and being removed in python 3.12. Reimplement functions with importlib.resources. Link: https://docs.python.org/3/library/importlib.resources.html Signed-off-by: Jiaxun Yang --- tools/binman/control.py | 18 +- 1 file changed, 9

[PATCH 01/20] py: Replace deprecated unittest APIs

2024-06-11 Thread Jiaxun Yang
assertEquals -> assertEqual assertRegexpMatches -> assertRegex Those APIs were deprecated long ago and being removed in latest python. Signed-off-by: Jiaxun Yang --- tools/binman/entry_test.py | 6 ++-- tools/binman/fdt_test.py| 48 ++--- tools/binman/ftest.py

[PATCH 00/20] New CI image and fixes

2024-06-11 Thread Jiaxun Yang
Hi all, This series build a new CI image based on Ubuntu focal with LoongArch64 support, fixed various python scripts for python 3.12, fixed various problems popped up when testing againt latest software. This change must be combined with test hook changes at [1]. Last two commits are for

Re: [RFC PATCH 04/31] lmb: remove local instances of the lmb structure variable

2024-06-11 Thread Tom Rini
On Tue, Jun 11, 2024 at 12:52:22PM -0600, Simon Glass wrote: > Hi Sughosh, > > On Fri, 7 Jun 2024 at 12:53, Sughosh Ganu wrote: > > > > With the move of the LMB structure to a persistent state, there is no > > need to declare the variable locally, and pass it as part of the LMB > > API's. Remove

Re: [RFC PATCH 15/31] efi_memory: add an event handler to update memory map

2024-06-11 Thread Tom Rini
On Tue, Jun 11, 2024 at 12:52:19PM -0600, Simon Glass wrote: > Hi, > > On Tue, 11 Jun 2024 at 08:36, Tom Rini wrote: > > > > On Tue, Jun 11, 2024 at 12:17:16PM +0200, Heinrich Schuchardt wrote: > > > On 07.06.24 20:52, Sughosh Ganu wrote: > > > > There are events that would be used to notify

[u-boot-test-hooks PATCH 4/4] qemu-loongarch64: New board

2024-06-11 Thread Jiaxun Yang
Signed-off-by: Jiaxun Yang --- bin/travis-ci/conf.qemu-loongarch64_na | 12 py/travis-ci/u_boot_boardenv_qemu_loongarch64_na.py | 11 +++ 2 files changed, 23 insertions(+) create mode 100644 bin/travis-ci/conf.qemu-loongarch64_na create mode 100644

[u-boot-test-hooks PATCH 3/4] qemu-xtensa-dc233c: New board

2024-06-11 Thread Jiaxun Yang
Signed-off-by: Jiaxun Yang --- bin/travis-ci/conf.qemu-xtensa-dc233c_na | 12 .../u_boot_boardenv_qemu_xtensa_dc233c_na.py | 6 ++ 2 files changed, 18 insertions(+) create mode 100644 bin/travis-ci/conf.qemu-xtensa-dc233c_na create mode 100644

[u-boot-test-hooks PATCH 2/4] qemu-arm64be: New board

2024-06-11 Thread Jiaxun Yang
Signed-off-by: Jiaxun Yang --- bin/travis-ci/conf.qemu_arm64be_na | 13 + py/travis-ci/u_boot_boardenv_qemu_arm64be_na.py | 10 ++ 2 files changed, 23 insertions(+) create mode 100644 bin/travis-ci/conf.qemu_arm64be_na create mode 100644

[u-boot-test-hooks PATCH 0/4] QEMU Updates

2024-06-11 Thread Jiaxun Yang
Hi all, This series updated u-boot-test-hooks to adopt QEMU 9.0. It also introduced 3 new boards: qemu-arm64be, qemu-xtensa-dc233c and qemu-loongarch64. This is required for CI changes. I'm going to respin other series later to utilise those new hooks. Thanks Jiaxun Yang (4):

[u-boot-test-hooks PATCH 1/4] qemu-vexpress*: Pass -audio none

2024-06-11 Thread Jiaxun Yang
Those boards have build in sound card which cause problems on CI runner. Pass -audio none to disable sound card backends. Signed-off-by: Jiaxun Yang --- bin/travis-ci/conf.vexpress_ca15_tc2_qemu | 2 +- bin/travis-ci/conf.vexpress_ca9x4_qemu| 2 +- 2 files changed, 2 insertions(+), 2

Re: [PATCH v5] cmd: move ELF load and boot to lib/elf.c

2024-06-11 Thread Maxim M. Moskalets
On 06.06.2024 17:21, Tom Rini wrote: On Thu, Jun 06, 2024 at 09:02:43AM +0200, Heinrich Schuchardt wrote: On 6/5/24 20:43, Maxim Moskalets wrote: From: Maxim Moskalets Loading and running the ELF image is the responsibility of the library and should not be associated with the command line

Re: [PATCH 00/42] labgrid: Provide an integration with Labgrid

2024-06-11 Thread Simon Glass
Hi, On Tue, 11 Jun 2024 at 14:02, Simon Glass wrote: > > Labgrid provides access to a hardware lab in an automated way. It is > possible to boot U-Boot on boards in the lab without physically touching > them. It relies on relays, USB UARTs and SD muxes, among other things. > > By way of

[PATCH 00/42] labgrid: Provide an integration with Labgrid

2024-06-11 Thread Simon Glass
Labgrid provides access to a hardware lab in an automated way. It is possible to boot U-Boot on boards in the lab without physically touching them. It relies on relays, USB UARTs and SD muxes, among other things. By way of background, about 4 years ago I wrong a thing called Labman[1] which

Re: [u-boot-test-hooks PATCH 1/2] Create a common file for test scripts

2024-06-11 Thread Simon Glass
Hi Tom, On Tue, 11 Jun 2024 at 10:07, Tom Rini wrote: > > On Mon, Jun 10, 2024 at 04:27:42PM -0600, Simon Glass wrote: > > > The top part of each of the u-boot-test-* files is common. Put it in > > a common script file to avoid duplication and to allow it to be > > replaced for the Labgrid

[PATCH 42/42] CI: Allow running tests on sjg lab

2024-06-11 Thread Simon Glass
Add a way to run tests on a real hardware lab. This is in the very early experimental stages. There are only 23 boards and 3 of those are broken! (bob, ff3399, samus). A fourth fails due to problems with the TPM tests. To try this, assuming you have gitlab access, set SJG_LAB=1, e.g.: git

[PATCH 41/42] test: Add a section for closing the connection

2024-06-11 Thread Simon Glass
This can take a while and involve multiple steps (e.g. turning the board back off). Add a section for it and show the output. Signed-off-by: Simon Glass --- test/py/u_boot_console_base.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/py/u_boot_console_base.py

[PATCH 40/42] test: Try to shut down the lab console gracefully

2024-06-11 Thread Simon Glass
Send the Labgrid quit characters to ask it to exit gracefully. This typically allows it to power off the board being used. If that doesn't work, try the less graceful approach. Signed-off-by: Simon Glass --- test/py/u_boot_spawn.py | 17 +++-- 1 file changed, 15 insertions(+), 2

[PATCH 39/42] test: Avoid double echo when starting up

2024-06-11 Thread Simon Glass
There is a very annoying bug at present where the terminal echos part of the first command sent to the board. This happens because the terminal is still set to echo for a period until Labgrid starts up and can change this. Fix this by disabling echo (and other terminal features) as soon as the

[PATCH 38/42] test: Fix mulptiplex_log typo

2024-06-11 Thread Simon Glass
Fix a typo in a comment. Signed-off-by: Simon Glass --- test/py/u_boot_console_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py index eda48cd35f7..1b00821c5e9 100644 --- a/test/py/u_boot_console_base.py

[PATCH 37/42] test: Improve handling of sending commands

2024-06-11 Thread Simon Glass
We expect commands to be echoed and this should happen quite quickly, since U-Boot is sitting at the prompt waiting for a command. Reduce the timeout for this situation. Try to produce a more useful error message when something goes wrong. Also handle the case where the connection has gone away

[PATCH 36/42] test: Introduce lab mode

2024-06-11 Thread Simon Glass
There is quite a bit of code in pytest to try to start up U-Boot on a board, with timeouts, expects, etc. This is tedious to maintain and is peripheral to the test system's purpose. It seems better to put this logic in the lab itself, where is can provide such support. With Labgrid we can use

[PATCH 35/42] test: Tidy up remaining exceptions

2024-06-11 Thread Simon Glass
Use the new handle_exception() function from ConsoleBase also. Signed-off-by: Simon Glass --- test/py/u_boot_console_base.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py index

[PATCH 34/42] test: Detect dead connections

2024-06-11 Thread Simon Glass
When the connection to a board dies, assume it is dead forever until some user action is taken. Skip all remaining tests. This avoids CI runs taking an hour, with hundreds of 30-second timeouts all to no avail. Signed-off-by: Simon Glass --- test/py/conftest.py | 19 +--

[PATCH 33/42] test: Separate out the exception handling

2024-06-11 Thread Simon Glass
The tests currently catch a very board Exception in each case. This is thrown even in the event of a coding error. We want to handle exceptions differently depending on their severity, so that we can avoid hour-long delays waiting for a board that is clearly broken. As a first step, create some

[PATCH 32/42] test: Move the receive code into a function

2024-06-11 Thread Simon Glass
There is quite a bit of code to deal with receiving data from the target so move it into its own receive() function. Signed-off-by: Simon Glass --- test/py/u_boot_spawn.py | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git

[PATCH 31/42] test: Introduce the concept of a role

2024-06-11 Thread Simon Glass
In Labgrid there is the concept of a 'role', which is similar to the U-Boot board ID in U-Boot's pytest subsystem. The role indicates both the target and information about the U-Boot build to use. It can also provide any amount of other configuration. The information is obtained using the

[PATCH 30/42] test: Create a common function to get the config

2024-06-11 Thread Simon Glass
The settings are decoded in two places. Combine them into a new function, before (in a future patch) expanding the number of items. Signed-off-by: Simon Glass --- test/py/conftest.py | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) diff --git

[PATCH 29/42] test: Check help output

2024-06-11 Thread Simon Glass
The current test doesn't check anything about the output. If a bug results in junk before the output, this is not currently detected. Add a check for the first line being the one expected. Signed-off-by: Simon Glass --- test/py/tests/test_help.py | 6 +- 1 file changed, 5 insertions(+), 1

[PATCH 28/42] test: dm: Show failing driver name

2024-06-11 Thread Simon Glass
When a driver is not registered properly it is not clear which one it is. Adjust test_dm_compat() to show this. Signed-off-by: Simon Glass --- test/py/tests/test_dm.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/py/tests/test_dm.py b/test/py/tests/test_dm.py

[PATCH 27/42] test: Avoid failing skipped tests

2024-06-11 Thread Simon Glass
When a test returns -EAGAIN this should not be considered a failure. Fix what seems to be a problem case, where the pytests see a failure when a test has merely been skipped. Signed-off-by: Simon Glass --- test/test-main.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-)

[PATCH 26/42] test: Decode exceptions only with sandbox

2024-06-11 Thread Simon Glass
When a real board fails we don't want to decode the exception. Reserve that behaviour for sandbox. Also avoid raising a new exception on failure - just re-raise the existing one. Signed-off-by: Simon Glass --- test/py/u_boot_console_sandbox.py | 2 +- test/py/u_boot_spawn.py | 10

[PATCH 23/42] test: Release board after tests complete

2024-06-11 Thread Simon Glass
When a board is finished with, the lab may want to power it off, or perform some other function. Add a new script which is called when tests are complete. Signed-off-by: Simon Glass --- test/py/u_boot_console_exec_attach.py | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH 25/42] test: Allow connecting to a running board

2024-06-11 Thread Simon Glass
Sometimes we know that the board is already running the right software, so provide an option to allow running of tests directly, without first resetting the board. This saves time when re-running a test where only the Python code is changing. Signed-off-by: Simon Glass --- test/py/conftest.py

[PATCH 24/42] log: Allow tests to pass with CONFIG_LOGF_FUNC_PAD set

2024-06-11 Thread Simon Glass
This setting pads out the function names. Adjust the test to handle this, since some boards use it. Signed-off-by: Simon Glass --- test/py/tests/test_log.py | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/py/tests/test_log.py b/test/py/tests/test_log.py

[PATCH 22/42] test: Pass stderr to stdout

2024-06-11 Thread Simon Glass
Some tests may output things to stderr. Ensure that this output is not dropped, by redirecting it to stdout Signed-off-by: Simon Glass --- test/py/u_boot_spawn.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/py/u_boot_spawn.py b/test/py/u_boot_spawn.py index

[PATCH 21/42] test: Use a constant for the test timeout

2024-06-11 Thread Simon Glass
Declare a constant rather than open-coding the same value twice. Signed-off-by: Simon Glass --- test/py/u_boot_console_base.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py index

[PATCH 20/42] test: Make bootstd init run only on sandbox

2024-06-11 Thread Simon Glass
Tests for standard boot need disks to be set up, which can only be done on sandbox, since adjusting disks on real hardware is not currently supported. Mark the init function as sandbox-only. Signed-off-by: Simon Glass --- test/py/tests/test_ut.py | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 19/42] test: Allow signaling that U-Boot is ready

2024-06-11 Thread Simon Glass
When Labgrid is used, it can get U-Boot ready for running tests. It prints a message when it has done so. Add logic to detect this message and accept it. Signed-off-by: Simon Glass --- test/py/u_boot_console_base.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

[PATCH 18/42] meson: Correct driver declaration for meson_axg_gpio

2024-06-11 Thread Simon Glass
This should use the driver macros so that the driver appears in the linker list. Fix this. Fixes: 8587839f19d ("pinctrl: meson: add axg support") Signed-off-by: Simon Glass --- drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 2 +- drivers/pinctrl/meson/pinctrl-meson-axg.c | 4 ++--

[PATCH 17/42] google: Disable TPMv2 on most Chromebooks

2024-06-11 Thread Simon Glass
This feature is not present on older Chromebooks, so disable the setting. Signed-off-by: Simon Glass --- configs/chromebook_link64_defconfig| 1 + configs/chromebook_link_defconfig | 1 + configs/chromebook_samus_defconfig | 1 + configs/chromebook_samus_tpl_defconfig | 1 +

[PATCH 16/42] sunxi: Mark scp as optional

2024-06-11 Thread Simon Glass
This binary does not prevent the system from booting. Mark it optional so that U-Boot can be built without it. Signed-off-by: Simon Glass --- arch/arm/dts/sunxi-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index

[PATCH 15/42] am33xx: Provide a function to set up the debug UART

2024-06-11 Thread Simon Glass
Since commit 0dba45864b2a ("arm: Init the debug UART") the debug UART is set up in _main() before early_system_init() is called. Add a suitable board_debug_uart_init() function to set up the UART in SPL. Signed-off-by: Simon Glass --- arch/arm/mach-omap2/am33xx/board.c | 18 +++---

[PATCH 14/42] initcall: Correct use of relocation offset

2024-06-11 Thread Simon Glass
The relocation offset can change in some initcall sequences. Handle this and make sure it is used for all debugging statements in init_run_list() Update the trace test to match. Signed-off-by: Simon Glass --- lib/initcall.c | 6 -- test/py/tests/test_trace.py | 4 ++-- 2

[PATCH 13/42] dm: core: Enhance comments on bind_drivers_pass()

2024-06-11 Thread Simon Glass
This part of driver model is a little subtle, so add some more comments to promote better understanding. Signed-off-by: Simon Glass --- drivers/core/lists.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/core/lists.c b/drivers/core/lists.c index

[PATCH 12/42] buildman: Add a way to limit the number of buildmans

2024-06-11 Thread Simon Glass
Buildman uses all available CPUs by default, so running more than one or two concurrent processes is not normally useful. However in some CI cases we want to be able to run several jobs at once to save time. For example, in a lab situation we may want to run a test on 20 boards at a time, since

[PATCH 11/42] buildman: Retry the build for current source

2024-06-11 Thread Simon Glass
Buildman retries a failed build when processing a branch, but does not do this when building current source. It is useful to do this retry in both cases, so add the logic for it. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 8 1 file changed, 8 insertions(+) diff

[PATCH 10/42] buildman: Add a flag to force mrproper on failure

2024-06-11 Thread Simon Glass
When a file is removed by a commit (e.g. include/common.h yay!) it can cause incremental build failures since one of the dependency files from a previous build may mention the file. Add an option to run 'make mrproper' automatically when a build fails. This can be used to automatically resolve

[PATCH 09/42] buildman: Avoid rebuilding when --mrproper is used

2024-06-11 Thread Simon Glass
When this flag is enabled, 'make mrproper' is always used when reconfiguring, so there is no point in doing it again. Update this. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/builderthread.py

[PATCH 08/42] buildman: Make mrproper an argument to run_commit()

2024-06-11 Thread Simon Glass
Pass this in so the caller can change it independently of the member variable. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/buildman/builderthread.py

[PATCH 07/42] buildman: Make mrproper an argument to _config_and_build()

2024-06-11 Thread Simon Glass
Pass this in so the caller can change it independently of the member variable. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index

[PATCH 06/42] buildman: Make mrproper an argument to _reconfigure()

2024-06-11 Thread Simon Glass
Pass this in so the caller can change it independently of the member variable. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index

[PATCH 05/42] binman: Update the entrydocs header

2024-06-11 Thread Simon Glass
Reduce the length of the underline for this header, to match the heading itself. Signed-off-by: Simon Glass --- tools/binman/entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 42e0b7b9145..2ed65800d22 100644 ---

[PATCH 04/42] binman: ti: Regenerate entry docs

2024-06-11 Thread Simon Glass
Correct formatting errors in the documentation. Regenerate the entries.rst file to include this recent addition. Signed-off-by: Simon Glass --- tools/binman/entries.rst| 35 + tools/binman/etype/ti_secure.py | 45 + 2 files

[PATCH 03/42] binman: Regenerate nxp docs

2024-06-11 Thread Simon Glass
Regenerate the entries.rst file to include this recent addition. Note that more docs are needed here, to actually describe the entry type. Note also that the entry type needs Binman tests added. Signed-off-by: Simon Glass --- tools/binman/entries.rst | 22 ++ 1 file

[PATCH 02/42] binman: efi: Correct entry docs

2024-06-11 Thread Simon Glass
Somehow the class documentation has got out of sync with the generated entries.rst file. Regenerating it causes errors, so correct these and regenerate the entries.rst file. Signed-off-by: Simon Glass Fixes: 809f28e7213 ("binman: capsule: Use dumped capsule header...") ---

[PATCH 01/42] trace: Update test to tolerate different trace-cmd version

2024-06-11 Thread Simon Glass
Some versions of trace-cmd (or some machines?) show one less dot in the CPU list. Signed-off-by: Simon Glass --- test/py/tests/test_trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/tests/test_trace.py b/test/py/tests/test_trace.py index

  1   2   3   >