[PATCH v2 28/35] global_data: Move env_addr field higher

2024-08-21 Thread Simon Glass
Move this field to be with others of the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_dat

[PATCH v2 29/35] global_data: Put phys_addr fields near the top

2024-08-21 Thread Simon Glass
Put these fields near the top and together, since they have the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/asm-generic/global_data.h b/inclu

[PATCH v2 30/35] global_data: Move ulong fields together

2024-08-21 Thread Simon Glass
Move all the always-present ulong fields next to the others at the top of global_data Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 50 +++ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/include/asm-generic

[PATCH v2 31/35] global_data: Move pointer members together

2024-08-21 Thread Simon Glass
Collect the pointer members near the top of global_data to help with alignment. Signed-off-by: Simon Glass --- (no changes since v1) include/asm-generic/global_data.h | 38 +++ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/include/asm-generic/globa

[PATCH v2 32/35] global_data: Remove jump table in SPL

2024-08-21 Thread Simon Glass
SPL builds don't use the jump table since they cannot run apps. Drop it, moving it together with boardf. Signed-off-by: Simon Glass --- (no changes since v1) board/freescale/ls2080ardb/eth_ls2080rdb.c | 2 +- common/console.c | 3 ++- include/asm-generic/global_data

[PATCH v2 33/35] global_data: Remove environment members if not used

2024-08-21 Thread Simon Glass
If the environment is not enabled we don't need these fields in global_data. Make them conditional. Make these fields conditional. Move env_buf up one so it can share an #ifdef. Signed-off-by: Simon Glass --- (no changes since v1) common/hwconfig.c | 8 +++- include/asm-g

[PATCH v2 34/35] doc: Move generic-board documentation into rst

2024-08-21 Thread Simon Glass
This information is useful for people looking at how U-Boot has changed over the years and the design decisions which led to it. Move it into doc/ in an 'historical' section. Signed-off-by: Simon Glass --- (no changes since v1) .../historical/generic_board.rst} | 17 +

[PATCH v2 35/35] doc: Add some guidelines about global data

2024-08-21 Thread Simon Glass
Update the documentation to provide a bit more information about how to use global data. Signed-off-by: Simon Glass --- Changes in v2: - Rebase to -next doc/develop/global_data.rst | 25 + 1 file changed, 25 insertions(+) diff --git a/doc/develop/global_data.rst b/doc/

[PATCH v2 24/35] global_data: Reduce the size of mon_len

2024-08-21 Thread Simon Glass
This is the length of the U-Boot binary, which is typically 200-800KB and certainly not larger than 4GB. Use a 32-bit value to save space in global_data and move it up to be with fields of the same alignment. Signed-off-by: Simon Glass --- (no changes since v1) common/board_f.c

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Caleb Connolly
On 21/08/2024 18:16, Simon Glass wrote: Hi Caleb, On Wed, 21 Aug 2024 at 08:49, Caleb Connolly wrote: On 21/08/2024 16:37, Simon Glass wrote: Hi Caleb, On Wed, 21 Aug 2024 at 08:11, Caleb Connolly wrote: Hi Simon, +U_BOOT_DRIVER(gcc_sc7280) = { + .name = "gcc_sc7280

Re: u-boot on raspberry pi with secure boot

2024-08-21 Thread Jonas Kvinge
On Tue, 2024-08-20 at 16:29 +0200, Caleb Connolly wrote: > Hi Jonas, > > > I don't know the details of how this is implemented, but the way to > solve this is by doing EFI secureboot in U-Boot. The trick is to > embed > the securebook public key hash into U-Boot, there it will be > validated >

Re: [PATCH 1/2] pytest: requirements.txt: Resync with the rest of the project

2024-08-21 Thread Tom Rini
On Mon, 19 Aug 2024 15:07:18 -0600, Tom Rini wrote: > In order to build the docker container, which contains a download cache > of python modules, we need to have our versions be in sync in each > requirements file. Update some of the cases where which are older than > the rest of the project. >

Re: [RFC PATCH 1/2] pci: Add TI K3 Cadence PCIe Controller

2024-08-21 Thread Tom Rini
On Wed, Aug 21, 2024 at 08:29:07PM +0530, Siddharth Vadapalli wrote: > Add support for the Cadence PCIe Controller present on TI's K3 SoCs. > This driver is an adaptation of the Linux driver. > > Signed-off-by: Siddharth Vadapalli [snip] > diff --git a/drivers/pci/pcie_cdns_ti.c b/drivers/pci/pc

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Simon Glass
Hi Caleb, On Wed, 21 Aug 2024 at 10:47, Caleb Connolly wrote: > > > > On 21/08/2024 18:16, Simon Glass wrote: > > Hi Caleb, > > > > On Wed, 21 Aug 2024 at 08:49, Caleb Connolly > > wrote: > >> > >> > >> > >> On 21/08/2024 16:37, Simon Glass wrote: > >>> Hi Caleb, > >>> > >>> On Wed, 21 Aug 2024

Re: u-boot on raspberry pi with secure boot

2024-08-21 Thread Ilias Apalodimas
Hi Jonas on mobile and on vacation, I'll respond in a week or so. In the meantime https://www.linaro.org/blog/uefi-secureboot-in-u-boot/ this might help. In sort you have to include the efi keys in the uboot binary. Cheers Ilias On Wed, Aug 21, 2024, 20:35 Jonas Kvinge wrote: > On Tue, 2024-0

Re: [PATCH v2 0/3] Meson: R/W support for pages used by boot ROM

2024-08-21 Thread Arseniy Krasnov
Hi, sorry, pls ping 😄 Thanks On 08.07.2024 10:13, Arseniy Krasnov wrote: > Patchset is based on patchset for Linux (today merged to nand-next): > https://lore.kernel.org/linux-mtd/20240507230903.3399594-1-avkras...@salutedevices.com/ > > Here is description from it: > > > Amlogic's boot ROM

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Caleb Connolly
On 21/08/2024 20:27, Simon Glass wrote: Hi Caleb, On Wed, 21 Aug 2024 at 10:47, Caleb Connolly wrote: On 21/08/2024 18:16, Simon Glass wrote: Hi Caleb, On Wed, 21 Aug 2024 at 08:49, Caleb Connolly wrote: On 21/08/2024 16:37, Simon Glass wrote: Hi Caleb, On Wed, 21 Aug 2024 at 08

[PATCH] ARM: imx: Use USB SDPS as fallback option on Data Modul i.MX8M Plus eDM SBC

2024-08-21 Thread Marek Vasut
The Data Modul i.MX8M Plus eDM SBC does have USB gadget capable port accessible via USB A-A cable plugged into the bottom USB 3.0 port. Use USB SDPS as the fallback boot device, so USB SDPS loading can be performed using e.g. uuu tool. Signed-off-by: Marek Vasut --- Cc: Fabio Estevam Cc: Tom Rin

[PATCH] ARM: imx: Enable cat and xxd commands on Data Modul i.MX8M Mini/Plus eDM SBC

2024-08-21 Thread Marek Vasut
Enable 'cat' command to print file from filesystem to stdout. Enable 'xxd' command to hexdump file from filesystem to stdout. Signed-off-by: Marek Vasut --- Cc: "NXP i.MX U-Boot Team" Cc: Fabio Estevam Cc: u-boot@lists.denx.de --- configs/imx8mm_data_modul_edm_sbc_defconfig | 2 ++ configs/imx

Re: [PATCH v2 0/3] Meson: R/W support for pages used by boot ROM

2024-08-21 Thread Michael Nazzareno Trimarchi
Hi I will read them tomorrow ;) Thank you for understanding Michael Il mer 21 ago 2024, 22:25 Arseniy Krasnov ha scritto: > Hi, sorry, pls ping 😄 > > Thanks > > On 08.07.2024 10:13, Arseniy Krasnov wrote: > > Patchset is based on patchset for Linux (today merged to nand-next): > > > https://

[PATCH 1/1] efi_loader: allow EFI_LOADER_BOUNCE_BUFFER on all architectures

2024-08-21 Thread Heinrich Schuchardt
There not only ARM64 boards but also RISC-V boards that require a bounce buffer to read block devices. Drop the architecture restriction. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kcon

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-21 Thread Marek Vasut
On 8/21/24 11:22 PM, Zixun LI wrote: usb_gadget_register_driver() called by probe will initialize the USB controller which enters ready to connect state with pull-up resistor enabled. From the host's point of view, a device is ready to be enumerated. However, since dm_usb_gadget_handle_interru

Re: [PATCH v3 00/27] Make LMB memory map global and persistent

2024-08-21 Thread Tom Rini
On Wed, Aug 21, 2024 at 04:28:12PM +0530, Sughosh Ganu wrote: > This is a follow-up from an earlier RFC series [1] for making the LMB > and EFI memory allocations work together. This is a non-rfc version > with only the LMB part of the patches, for making the LMB memory map > global and persistent

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-21 Thread Marek Vasut
On 8/21/24 11:58 PM, Zixun LI wrote: Hi Marek, Hi, On Wed, Aug 21, 2024 at 11:43 PM Marek Vasut wrote: Wouldn't it be better if usb_gadget_register_driver() started in disconnected state right away ? That's what I did initially. But since g_dnl doesn't do connection after register (I exp

[PATCH] qconfig: Fix an incorrect format-string with negative value

2024-08-21 Thread Simon Glass
This is not allowed, so use ljust() instead. This fixes the 'qconfig -i -I help' command. Signed-off-by: Simon Glass Fixes: 1bd43060b3e ("moveconfig: Use f strings where possible") --- tools/qconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qconfig.py b/tools/

Re: [PATCH 00/11] mach-snapdragon: various improvements for newer boards

2024-08-21 Thread Caleb Connolly
On Fri, 09 Aug 2024 01:59:23 +0200, Caleb Connolly wrote: > Supporting the newer SM8550 and SM8650 SoCs unfortunately requires a > bump in complexity for us. Qualcomm changed a lot about how the memory > map is handed over to the "kernel", adding many holes, not mapping > certain regions, and add

[PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-21 Thread Zixun LI
usb_gadget_register_driver() called by probe will initialize the USB controller which enters ready to connect state with pull-up resistor enabled. >From the host's point of view, a device is ready to be enumerated. However, since dm_usb_gadget_handle_interrupts() is only called when ethernet funct

Re: [PATCH 1/1] usb: gadget: ether: Disable USB pullup in eth probe

2024-08-21 Thread Zixun LI
Hi Marek, On Wed, Aug 21, 2024 at 11:43 PM Marek Vasut wrote: > > Wouldn't it be better if usb_gadget_register_driver() started in > disconnected state right away ? That's what I did initially. But since g_dnl doesn't do connection after register (I explained in cover letter) doing so will keep

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

2024-08-21 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 allowe

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

2024-08-21 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 --- (no changes since v1) test/py/u_boot_console_base.py | 9 + 1 file changed, 5 insertions(+), 4 delet

[PATCH v4 02/19] test: Use a constant for the test timeout

2024-08-21 Thread Simon Glass
Declare a constant rather than open-coding the same value twice. Signed-off-by: Simon Glass --- (no changes since v1) 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 v4 03/19] test: Pass stderr to stdout

2024-08-21 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 --- (no changes since v1) 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 v4 04/19] test: Release board after tests complete

2024-08-21 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 --- (no changes since v1) test/py/u_boot_console_exec_attach.py | 10 ++ 1 file changed, 10 insertions(+

[PATCH v4 05/19] test: Allow connecting to a running board

2024-08-21 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 --- (no changes since v1)

[PATCH v4 06/19] test: Avoid failing skipped tests

2024-08-21 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. We cannot squash the -EAGAIN error in ut_run_test() since the failure count is incremented by its caller, ut_run_test_live_

[PATCH v4 07/19] test: Create a common function to get the config

2024-08-21 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 --- (no changes since v1) test/py/conftest.py | 41 - 1 file changed, 28 insertions(+), 13 dele

[PATCH v4 09/19] test: Move the receive code into a function

2024-08-21 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 --- (no changes since v1) test/py/u_boot_spawn.py | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) dif

[PATCH v4 08/19] test: Introduce the concept of a role

2024-08-21 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 'labgrid

[PATCH v4 10/19] test: Separate out the exception handling

2024-08-21 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 n

[PATCH v4 11/19] test: Detect dead connections

2024-08-21 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 --- (no changes since v1) test/py/conftest.py | 19 +

[PATCH v4 12/19] test: Tidy up remaining exceptions

2024-08-21 Thread Simon Glass
Use the new handle_exception() function from ConsoleBase also. Signed-off-by: Simon Glass --- (no changes since v1) 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 in

[PATCH v4 13/19] test: Introduce lab mode

2024-08-21 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 the

[PATCH v4 14/19] test: Improve handling of sending commands

2024-08-21 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 si

[PATCH v4 16/19] test: Avoid double echo when starting up

2024-08-21 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 spa

[PATCH v4 17/19] test: Try to shut down the lab console gracefully

2024-08-21 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 --- (no changes since v1) test/py/u_boot_spawn.py | 17 +++-- 1 file changed,

[PATCH v4 15/19] test: Fix mulptiplex_log typo

2024-08-21 Thread Simon Glass
Fix a typo in a comment. Signed-off-by: Simon Glass --- (no changes since v1) 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 e2e78179555..f610fa9a6f8 100644 --- a/test/py/u

[PATCH v4 18/19] test: Add a section for closing the connection

2024-08-21 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 --- (no changes since v1) test/py/u_boot_console_base.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/py/u_bo

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

2024-08-21 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 push

Re: [PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280

2024-08-21 Thread Simon Glass
Hi Caleb, On Wed, 21 Aug 2024 at 14:33, Caleb Connolly wrote: > > > > On 21/08/2024 20:27, Simon Glass wrote: > > Hi Caleb, > > > > On Wed, 21 Aug 2024 at 10:47, Caleb Connolly > > wrote: > >> > >> > >> > >> On 21/08/2024 18:16, Simon Glass wrote: > >>> Hi Caleb, > >>> > >>> On Wed, 21 Aug 2024

Re: [PATCH v3 2/3] buildman: Allow skipping the dtc build

2024-08-21 Thread Simon Glass
Hi Tom, On Fri, 16 Aug 2024 at 17:53, Simon Glass wrote: > > Hi Tom, > > On Fri, 16 Aug 2024 at 11:22, Tom Rini wrote: > > > > On Thu, Aug 15, 2024 at 01:57:45PM -0600, Simon Glass wrote: > > > > > For most boards, the device-tree compiler is built in-tree, ignoring the > > > system version. Add

Re: [PATCH v3 06/19] test: Avoid failing skipped tests

2024-08-21 Thread Simon Glass
Hi Tom, On Wed, 26 Jun 2024 at 02:00, Simon Glass wrote: > > Hi Tom, > > On Tue, 25 Jun 2024 at 15:14, Tom Rini wrote: > > > > On Tue, Jun 25, 2024 at 01:38:00PM +0100, Simon Glass wrote: > > > Hi Tom, > > > > > > On Mon, 24 Jun 2024 at 19:06, Tom Rini wrote: > > > > > > > > On Sun, Jun 23, 202

Re: [RFC PATCH 1/2] pci: Add TI K3 Cadence PCIe Controller

2024-08-21 Thread Siddharth Vadapalli
On Wed, Aug 21, 2024 at 12:00:20PM -0600, Tom Rini wrote: > On Wed, Aug 21, 2024 at 08:29:07PM +0530, Siddharth Vadapalli wrote: > [...] > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > >

<    1   2