Re: [PATCH 1/1] acpi: Add missing RISC-V acpi_table header

2023-07-24 Thread Bin Meng
+Simon,

On Tue, Jul 25, 2023 at 9:30 AM Heinrich Schuchardt
 wrote:
>
> The pci_mmc.c driver can generate ACPI info and therefore includes
> asm/acpi_table.h. This file does not exist for the RISC-V architecture
> and thus code compilation fails when using this driver on RISC-V

Which header file includes the  in pci_mmc.c?

I feel like we should fix the header file dependency of the driver,
not by adding a dummy file for random architecture.

>
> Create an empty include file.
>
> Signed-off-by: Heinrich Schuchardt 
> ---
>  arch/riscv/include/asm/acpi_table.h | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
>  create mode 100644 arch/riscv/include/asm/acpi_table.h
>
> diff --git a/arch/riscv/include/asm/acpi_table.h 
> b/arch/riscv/include/asm/acpi_table.h
> new file mode 100644
> index 00..e69de29bb2
> --

Regards,
Bin


RE: [PATCH 1/1] dm: adc: imx93-adc depends on ADC (fix boot)

2023-07-24 Thread Bough Chen
> -Original Message-
> From: Sébastien Szymanski 
> Sent: 2023年7月24日 23:18
> To: u-boot@lists.denx.de
> Cc: Bough Chen ; Luca Ellero ;
> Sébastien Szymanski 
> Subject: [PATCH 1/1] dm: adc: imx93-adc depends on ADC (fix boot)
> 
> The i.MX93 11x11 EVK fails to boot with following error:
> 
>  Model: NXP i.MX93 11X11 EVK board
>  DRAM:  2 GiB
>  Error binding driver 'imx93-adc': -96
>  Some drivers failed to bind
>  Error binding driver 'simple_bus': -96
>  Some drivers failed to bind
>  Error binding driver 'simple_bus': -96
>  Some drivers failed to bind
>  initcall sequence fffb8f28 failed at call 8021e0d4 (err=-96)
> ### ERROR ### Please RESET the board ###
> 
> That's because since commit e7ff54d96303 ("imx93_evk: defconfig: add adc
> support") CONFIG_ADC_IMX93 is enabled but CONFIG_ADC is not.
> Fix this by making CONFIG_ADC_IMX93 depend on CONFIG_ADC.
> 
> Signed-off-by: Sébastien Szymanski 

Reviewed-by: Haibo Chen 

> ---
>  drivers/adc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/adc/Kconfig b/drivers/adc/Kconfig index
> 4336732dee56..a01d73846b74 100644
> --- a/drivers/adc/Kconfig
> +++ b/drivers/adc/Kconfig
> @@ -66,6 +66,7 @@ config STM32_ADC
> 
>  config ADC_IMX93
>   bool "Enable NXP IMX93 ADC driver"
> + depends on ADC
>   help
> This enables basic driver for NXP IMX93 ADC.
> It provides:
> --
> 2.41.0



Re: [PATCH] xhci_register: Fix double free on failure

2023-07-24 Thread Bin Meng
On Tue, Jul 25, 2023 at 3:45 AM Richard Habeeb  wrote:
>
> drivers/core/device.c will call `device_free()` after xhci_register
> already frees the private device data. This can cause a crash later
> during the boot process, observed on aarch64 RPi4b as a synchronous
> exception. All callers of xhci_register use priv_auto, so this won't
> lead to memory leaks.
>
> Signed-off-by: Richard Habeeb 
> ---
>
>  drivers/usb/host/xhci.c | 1 -
>  1 file changed, 1 deletion(-)
>

Reviewed-by: Bin Meng 


[PATCH 1/1] acpi: Add missing RISC-V acpi_table header

2023-07-24 Thread Heinrich Schuchardt
The pci_mmc.c driver can generate ACPI info and therefore includes
asm/acpi_table.h. This file does not exist for the RISC-V architecture
and thus code compilation fails when using this driver on RISC-V

Create an empty include file.

Signed-off-by: Heinrich Schuchardt 
---
 arch/riscv/include/asm/acpi_table.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 arch/riscv/include/asm/acpi_table.h

diff --git a/arch/riscv/include/asm/acpi_table.h 
b/arch/riscv/include/asm/acpi_table.h
new file mode 100644
index 00..e69de29bb2
-- 
2.40.1



Re: [PATCH v7 4/4] riscv: dts: starfive: Enable PCIe host controller

2023-07-24 Thread Leo Liang
On Thu, Jul 20, 2023 at 07:23:33PM +0800, Minda Chen wrote:
> From: Mason Huo 
> 
> Enable and add pinctrl configuration for PCIe host controller.
> 
> Signed-off-by: Mason Huo 
> Signed-off-by: Minda Chen 
> ---
>  .../dts/jh7110-starfive-visionfive-2.dtsi | 11 +++
>  arch/riscv/dts/jh7110.dtsi| 74 +++
>  2 files changed, 85 insertions(+)

Reviewed-by: Leo Yu-Chi Liang 


Re: [PATCH v7 3/4] configs: starfive-jh7110: Add support for PCIe host driver

2023-07-24 Thread Leo Liang
On Thu, Jul 20, 2023 at 07:23:32PM +0800, Minda Chen wrote:
> From: Mason Huo 
> 
> Add PCIe host driver and nvme driver in configure file.
> 
> Signed-off-by: Mason Huo 
> Signed-off-by: Minda Chen 
> ---
>  configs/starfive_visionfive2_defconfig | 8 
>  1 file changed, 8 insertions(+)

Reviewed-by: Leo Yu-Chi Liang 


Re: [PATCH v7 2/4] starfive: pci: Add StarFive JH7110 pcie driver

2023-07-24 Thread Leo Liang
On Thu, Jul 20, 2023 at 07:23:31PM +0800, Minda Chen wrote:
> From: Mason Huo 
> 
> Add pcie driver for StarFive JH7110, Also add PLDA
> PCIe controller common driver functions.
> 
> Several devices are tested:
> a) M.2 NVMe SSD
> b) Realtek 8169 Ethernet adapter.
> 
> Signed-off-by: Mason Huo 
> Signed-off-by: Minda Chen 
> Acked-by: Pali Rohár 
> ---
>  drivers/pci/Kconfig|  13 ++
>  drivers/pci/Makefile   |   2 +
>  drivers/pci/pcie_plda_common.c | 116 +++
>  drivers/pci/pcie_plda_common.h | 118 +++
>  drivers/pci/pcie_starfive_jh7110.c | 317 +
>  5 files changed, 566 insertions(+)
>  create mode 100644 drivers/pci/pcie_plda_common.c
>  create mode 100644 drivers/pci/pcie_plda_common.h
>  create mode 100644 drivers/pci/pcie_starfive_jh7110.c

Reviewed-by: Leo Yu-Chi Liang 


Re: [PATCH v15 00/10] introduce Arm FF-A support

2023-07-24 Thread Tom Rini
On Thu, Jul 13, 2023 at 02:28:37PM +0100, Abdellatif El Khlifi wrote:
> Adding support for Arm FF-A v1.0 (Arm Firmware Framework for Armv8-A) [A].
> 
> FF-A specifies interfaces that enable a pair of software execution 
> environments aka partitions to
> communicate with each other. A partition could be a VM in the Normal or 
> Secure world, an
> application in S-EL0, or a Trusted OS in S-EL1.
> 
> FF-A is a discoverable bus and similar to architecture features.
> FF-A bus is discovered using ARM_SMCCC_FEATURES mechanism performed
> by the PSCI driver.
> 
>=> dm tree
> 
> Class Index  Probed  DriverName
>---
>...
> firmware  0  [ + ]   psci  |-- psci
> ffa   0  [   ]   arm_ffa   |   `-- arm_ffa
>...
> 
> Clients are able to probe then use the FF-A bus by calling the DM class
> searching APIs (e.g: uclass_first_device).
> 
> This implementation of the specification provides support for Aarch64.
> 
> The FF-A driver uses the SMC ABIs defined by the FF-A specification to:
> 
> - Discover the presence of secure partitions (SPs) of interest
> - Access an SP's service through communication protocols
>   (e.g: EFI MM communication protocol)
> 
> The FF-A support provides the following features:
> 
> - Being generic by design and can be used by any Arm 64-bit platform
> - FF-A support can be compiled and used without EFI
> - Support for SMCCCv1.2 x0-x17 registers
> - Support for SMC32 calling convention
> - Support for 32-bit and 64-bit FF-A direct messaging
> - Support for FF-A MM communication (compatible with EFI boot time)
> - Enabling FF-A and MM communication in Corstone1000 platform as a use 
> case
> - A Uclass driver providing generic FF-A methods.
> - An Arm FF-A device driver providing Arm-specific methods and reusing 
> the Uclass methods.
> - A sandbox emulator for Arm FF-A, emulates the FF-A side of the Secure 
> World and provides
>   FF-A ABIs inspection methods.
> - An FF-A sandbox device driver for FF-A communication with the emulated 
> Secure World.
>   The driver leverages the FF-A Uclass to establish FF-A communication.
> - Sandbox FF-A test cases.
> - A new command called armffa is provided as an example of how to access 
> the
>   FF-A bus
> 
> For more details about the FF-A support please refer to [B] and refer to [C] 
> for
> how to use the armffa command.
> 
> Please find at [D] an example of the expected boot logs when enabling
> FF-A support for a platform. In this example the platform is
> Corstone1000. But it can be any Arm 64-bit platform.
> 
> Changelog of changes:
> ===
> 
> v15:

So, this does not pass CI:
https://source.denx.de/u-boot/u-boot/-/jobs/662303
https://source.denx.de/u-boot/u-boot/-/jobs/662304#L2234

And it's on me for merging this before letting the CI run I kicked
complete, sorry.  But I'm reverting this now.

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v3 3/3] board: toradex: add verdin am62 support

2023-07-24 Thread Tom Rini
On Mon, Jul 24, 2023 at 08:34:04PM +, Marcel Ziswiler wrote:
> Hi Nishanth
> 
> On Fri, 2023-07-21 at 08:37 -0500, Nishanth Menon wrote:
> > On 09:40-20230715, Marcel Ziswiler wrote:
> > > From: Marcel Ziswiler 
> > > 
> > > This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT
> > > V1.0A module. They are strapped to boot from their on-module eMMC.
> > > U-Boot supports booting from the on-module eMMC only, DFU support is
> > > disabled for now due to missing AM62x USB support.
> > > 
> > > Boot sequence is:
> > > SYSFW ---> R5 SPL (both in tiboot3.bin) ---> ATF (TF-A) ---> OP-TEE
> > >   ---> A53 SPL (part of tispl.bin) ---> U-boot proper (u-boot.img)
> > > 
> > > Signed-off-by: Marcel Ziswiler 
> > > 
> > > ---
> > > 
> > > Changes in v3:
> > > - Integrate our recent find of CTRL_SLEEP_MOCI# needing to be driven
> > >   from A53 SPL as it may be used to control some power-rails on the
> > >   carrier board. E.g. on the Yavia carrier board it is needed to power
> > >   the I2C EEPROM on the carrier board.
> > > - Improve boot environment in R5 SPL vs. A53.
> > > - Integrate launch configuration SKUs to Wi-Fi handling.
> > > - Re-sync device trees from Linux kernel v6.5-rc1.
> > > - Add warning if memory is less than expected.
> > 
> > Thank you. we are in the middle of a bunch of cleanup for AM62 at the
> > moment - fixing up mdio, dts, ethernet etc and introducing binman at the
> > moment.
> 
> I am, of course, fully aware of this and actually internally do have patches 
> on top of all such work which
> already got posted to the mailing list to make sure our stuff also works with 
> this.
> 
> I am also more than happy to provide more feedback to help in moving this all 
> forward.
> 
> > I think it might be better to introduce new platforms with those
> > changes incorporated.
> 
> While I do understand what you are saying I am also a little bit disappointed 
> that we are now blocked since
> more than one and a half months without a clear path/timeline moving forward.

I too am not thrilled with the overall state here.  When roughly will
the dts files be able to be re-synced and we can move forward? Perhaps
when the merge window opens in about 4 weeks?

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v2 1/1] spl: CONFIG_SPL_PCI_PNP should depend on CONFIG_SPL_PCI

2023-07-24 Thread Tom Rini
On Mon, Jul 24, 2023 at 09:27:26PM +0200, Heinrich Schuchardt wrote:

> CONFIG_SPL_PCI_PNP=y without CONFIG_SPL_PCI=y makes no sense.
> 
> Fixes: 32f5e9e5c1a7 ("nvme: pci: Enable for SPL")
> Signed-off-by: Heinrich Schuchardt 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v2 1/1] spl: initialize PCI before booting

2023-07-24 Thread Tom Rini
On Mon, Jul 24, 2023 at 10:18:41PM +0200, Heinrich Schuchardt wrote:

> MMC, SATA, and USB may be using PCI based controllers.
> Initialize the PCI sub-system before trying to boot.
> 
> Remove the initialization for NVMe that is now redundant.
> 
> Signed-off-by: Heinrich Schuchardt 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: Please pull u-boot-dm

2023-07-24 Thread Tom Rini
On Mon, Jul 24, 2023 at 12:31:55PM -0600, Simon Glass wrote:

> Hi Tom,
> 
> https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/17032
> 
> 
> The following changes since commit be71a05a417deb5fcea8e39e557f890626ab2352:
> 
>   Merge branch '2023-07-22-TI-binman-and-K3-improvements' (2023-07-23
> 21:46:05 -0400)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-dm.git tags/dm-pull-24jul23
> 
> for you to fetch changes up to 407a1413e3202585ca842896365718873b170ee2:
> 
>   buildman: Enable test coverage (2023-07-24 09:34:11 -0600)
> 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v15 00/10] introduce Arm FF-A support

2023-07-24 Thread Tom Rini
On Thu, 13 Jul 2023 14:28:37 +0100, Abdellatif El Khlifi wrote:

> Adding support for Arm FF-A v1.0 (Arm Firmware Framework for Armv8-A) [A].
> 
> FF-A specifies interfaces that enable a pair of software execution 
> environments aka partitions to
> communicate with each other. A partition could be a VM in the Normal or 
> Secure world, an
> application in S-EL0, or a Trusted OS in S-EL1.
> 
> FF-A is a discoverable bus and similar to architecture features.
> FF-A bus is discovered using ARM_SMCCC_FEATURES mechanism performed
> by the PSCI driver.
> 
> [...]

Applied to u-boot/master, thanks!

-- 
Tom



Re: [PATCH v3 3/3] board: toradex: add verdin am62 support

2023-07-24 Thread Marcel Ziswiler
Hi Nishanth

On Fri, 2023-07-21 at 08:37 -0500, Nishanth Menon wrote:
> On 09:40-20230715, Marcel Ziswiler wrote:
> > From: Marcel Ziswiler 
> > 
> > This adds initial support for the Toradex Verdin AM62 Quad 1GB WB IT
> > V1.0A module. They are strapped to boot from their on-module eMMC.
> > U-Boot supports booting from the on-module eMMC only, DFU support is
> > disabled for now due to missing AM62x USB support.
> > 
> > Boot sequence is:
> > SYSFW ---> R5 SPL (both in tiboot3.bin) ---> ATF (TF-A) ---> OP-TEE
> >   ---> A53 SPL (part of tispl.bin) ---> U-boot proper (u-boot.img)
> > 
> > Signed-off-by: Marcel Ziswiler 
> > 
> > ---
> > 
> > Changes in v3:
> > - Integrate our recent find of CTRL_SLEEP_MOCI# needing to be driven
> >   from A53 SPL as it may be used to control some power-rails on the
> >   carrier board. E.g. on the Yavia carrier board it is needed to power
> >   the I2C EEPROM on the carrier board.
> > - Improve boot environment in R5 SPL vs. A53.
> > - Integrate launch configuration SKUs to Wi-Fi handling.
> > - Re-sync device trees from Linux kernel v6.5-rc1.
> > - Add warning if memory is less than expected.
> 
> Thank you. we are in the middle of a bunch of cleanup for AM62 at the
> moment - fixing up mdio, dts, ethernet etc and introducing binman at the
> moment.

I am, of course, fully aware of this and actually internally do have patches on 
top of all such work which
already got posted to the mailing list to make sure our stuff also works with 
this.

I am also more than happy to provide more feedback to help in moving this all 
forward.

> I think it might be better to introduce new platforms with those
> changes incorporated.

While I do understand what you are saying I am also a little bit disappointed 
that we are now blocked since
more than one and a half months without a clear path/timeline moving forward.

> -- 
>
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 
> 849D 1736 249D

Cheers

Marcel


[PATCH v2 1/1] spl: initialize PCI before booting

2023-07-24 Thread Heinrich Schuchardt
MMC, SATA, and USB may be using PCI based controllers.
Initialize the PCI sub-system before trying to boot.

Remove the initialization for NVMe that is now redundant.

Signed-off-by: Heinrich Schuchardt 
---
v2:
Centralize the PCI initialization
---
 common/spl/spl.c  | 7 +++
 common/spl/spl_nvme.c | 5 -
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index f09bb97781..0062f3f45d 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -800,6 +800,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
IS_ENABLED(CONFIG_SPL_ATF))
dram_init_banksize();
 
+   if (CONFIG_IS_ENABLED(PCI)) {
+   ret = pci_init();
+   if (ret)
+   puts(SPL_TPL_PROMPT "Cannot initialize PCI\n");
+   /* Don't fail. We still can try other boot methods. */
+   }
+
bootcount_inc();
 
/* Dump driver model states to aid analysis */
diff --git a/common/spl/spl_nvme.c b/common/spl/spl_nvme.c
index 2af63f1dc8..c8774d67ec 100644
--- a/common/spl/spl_nvme.c
+++ b/common/spl/spl_nvme.c
@@ -7,7 +7,6 @@
 
 #include 
 #include 
-#include 
 #include 
 
 static int spl_nvme_load_image(struct spl_image_info *spl_image,
@@ -15,10 +14,6 @@ static int spl_nvme_load_image(struct spl_image_info 
*spl_image,
 {
int ret;
 
-   ret = pci_init();
-   if (ret < 0)
-   return ret;
-
ret = nvme_scan_namespace();
if (ret < 0)
return ret;
-- 
2.40.1



RPi Zero 2 W usb keyboard support?

2023-07-24 Thread Filip Žaludek



Hi,
  is supposed usb keyboard to work in u-boot 2023.04 on RPi Zero 2 W?
Configured as rpi_arm64_defconfig, no usb devices found but subsequent
kernel works as expected.


[pi02]
kernel=u-boot.bin
otg_mode=0
dtoverlay=dwc2,dr_mode=host


Regards,
Filip



[PATCH] xhci_register: Fix double free on failure

2023-07-24 Thread Richard Habeeb
drivers/core/device.c will call `device_free()` after xhci_register
already frees the private device data. This can cause a crash later
during the boot process, observed on aarch64 RPi4b as a synchronous
exception. All callers of xhci_register use priv_auto, so this won't
lead to memory leaks.

Signed-off-by: Richard Habeeb 
---

 drivers/usb/host/xhci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9e33c5d855..5cacf0769e 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1418,7 +1418,6 @@ int xhci_register(struct udevice *dev, struct
xhci_hccr *hccr,

  return 0;
 err:
- free(ctrl);
  debug("%s: failed, ret=%d\n", __func__, ret);
  return ret;
 }
-- 
2.17.1


[PATCH v2 1/1] spl: CONFIG_SPL_PCI_PNP should depend on CONFIG_SPL_PCI

2023-07-24 Thread Heinrich Schuchardt
CONFIG_SPL_PCI_PNP=y without CONFIG_SPL_PCI=y makes no sense.

Fixes: 32f5e9e5c1a7 ("nvme: pci: Enable for SPL")
Signed-off-by: Heinrich Schuchardt 
---
v2:
Keep CONFIG_SPL_PCI_PNP in drivers/pci/Kconfig
Add ' in SPL' to label
---
 drivers/pci/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index aca439d921..d2356cb91e 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -41,7 +41,8 @@ config PCI_PNP
  Enable PCI memory and I/O space resource allocation and assignment.
 
 config SPL_PCI_PNP
-   bool "Enable Plug & Play support for PCI"
+   bool "Enable Plug & Play support for PCI in SPL"
+   depends on SPL_PCI
help
  Enable PCI memory and I/O space resource allocation and assignment.
 
-- 
2.40.1



Re: [PATCH v3 05/11] binman: ftest: Add test for u_boot_spl_pubkey_dtb

2023-07-24 Thread Simon Glass
From: Lukas Funke 

Add test for u_boot_spl_pubkey_dtb. The test adds a public key to the
dtb and checks if the required nodes will be added to the images dtb.

Signed-off-by: Lukas Funke 
Reviewed-by: Simon Glass 

---

Changes in v3:
- Add newline before main
- Adapted test due to property renaming

Changes in v2:
- Changed u_boot_spl_pubkey_dtb to u-boot-spl-pubkey-dtb

 tools/binman/ftest.py| 33 
 tools/binman/test/281_spl_pubkey_dtb.dts | 16 
 2 files changed, 49 insertions(+)
 create mode 100644 tools/binman/test/281_spl_pubkey_dtb.dts

Applied to u-boot-dm, thanks!


Re: [PATCH v6 1/3] binman: Add support for externally encrypted blobs

2023-07-24 Thread Simon Glass
On Mon, 17 Jul 2023 at 01:06,  wrote:
>
> From: Christian Taedcke 
>
> This adds a new etype encrypted.
>
> It creates a new cipher node in the related image similar to the
> cipher node used by u-boot, see boot/image-cipher.c.
>
> Signed-off-by: Christian Taedcke 
> ---
>
> Changes in v6:
> - fix documentation of encrypted etype
>
> Changes in v5:
> - encrypted entry now inherits from Entry
> - remove unnecessary methods ObtainContents and ProcessContents
>
> Changes in v3:
> - rebase on u-boot-dm/mkim-working
> - update doc for functions ObtainContents and ProcessContents
> - update entries.rst
>
> Changes in v2:
> - add entry documentation
> - remove global /cipher node
> - replace key-name-hint with key-source property
>
>  tools/binman/entries.rst|  86 
>  tools/binman/etype/encrypted.py | 138 
>  2 files changed, 224 insertions(+)
>  create mode 100644 tools/binman/etype/encrypted.py

Reviewed-by: Simon Glass 

Applied to u-boot-dm, thanks!


Re: [PATCH v6 2/3] binman: Allow cipher node as special section

2023-07-24 Thread Simon Glass
On Mon, 17 Jul 2023 at 01:06,  wrote:
>
> From: Christian Taedcke 
>
> The new encrypted etype generates a cipher node in the device tree
> that should not be evaluated by binman, but still be kept in the
> output device tree.
>
> Signed-off-by: Christian Taedcke 
> ---
>
> (no changes since v3)
>
> Changes in v3:
> - rebase on u-boot-dm/mkim-working
>
>  tools/binman/etype/section.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass 

(don't forget to add review tags when sending out the next version -
"patman status" can collect these for you)

Applied to u-boot-dm, thanks!


Re: [PATCH v6 3/3] binman: Add tests for etype encrypted

2023-07-24 Thread Simon Glass
On Mon, 17 Jul 2023 at 01:06,  wrote:
>
> From: Christian Taedcke 
>
> Add tests to reach 100% code coverage for the added etype encrypted.
>
> Signed-off-by: Christian Taedcke 
> ---
>
> (no changes since v5)
>
> Changes in v5:
> - add comments to test functions
>
> Changes in v4:
> - fix failing test testEncryptedKeyFile
>
> Changes in v3:
> - rebase on u-boot-dm/mkim-working
> - remove unnecessary test testEncryptedNoContent
> - wrap some lines at 80 cols
>
> Changes in v2:
> - adapt tests for changed entry implementation
>
>  tools/binman/ftest.py | 58 +++
>  tools/binman/test/291_encrypted_no_algo.dts   | 15 +
>  .../test/292_encrypted_invalid_iv_file.dts| 18 ++
>  .../binman/test/293_encrypted_missing_key.dts | 23 
>  .../binman/test/294_encrypted_key_source.dts  | 24 
>  tools/binman/test/295_encrypted_key_file.dts  | 24 
>  6 files changed, 162 insertions(+)
>  create mode 100644 tools/binman/test/291_encrypted_no_algo.dts
>  create mode 100644 tools/binman/test/292_encrypted_invalid_iv_file.dts
>  create mode 100644 tools/binman/test/293_encrypted_missing_key.dts
>  create mode 100644 tools/binman/test/294_encrypted_key_source.dts
>  create mode 100644 tools/binman/test/295_encrypted_key_file.dts

Reviewed-by: Simon Glass 

Applied to u-boot-dm, thanks!


Re: [PATCH v3 02/11] binman: Don't decompress data while signing

2023-07-24 Thread Simon Glass
From: Lukas Funke 

While signing a fit compressed data (i.e. 'blob-ext') is decompressed,
but never compressed again. When compressed data was wrapped in a
section, decompression leads to an error because the outer section had
the original compressed size but the inner entry has the
uncompressed size now.

While singing there is no reason to decompress data. Thus, decompression
should be disabled.

Furthermore, bintools should be collected before loading the data. This
way bintools are available if processing is required on a node.

Signed-off-by: Lukas Funke 
Reviewed-by: Simon Glass 
---

(no changes since v1)

 tools/binman/control.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v3 03/11] binman: blob_dtb: Add fake_size argument to ObtainContents()

2023-07-24 Thread Simon Glass
From: Lukas Funke 

The method 'connect_contents_to_file()' calls ObtainsContents() with
'fake_size' argument. Without providing the argument in the blob_dtb
we are not able to call this method without error.

Signed-off-by: Lukas Funke 
Reviewed-by: Simon Glass 
---

(no changes since v1)

 tools/binman/etype/blob_dtb.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v3 04/11] binman: doc: Add documentation for fdt_add_pubkey bintool

2023-07-24 Thread Simon Glass
From: Lukas Funke 

Add documentation for btool which calls 'fdt_add_pubkey'

Signed-off-by: Lukas Funke 
Reviewed-by: Simon Glass 

---

Changes in v3:
- Fix rst headline length

 tools/binman/bintools.rst | 10 ++
 1 file changed, 10 insertions(+)

Applied to u-boot-dm, thanks!


Re: [PATCH v3 06/11] binman: btool: Add fdt_add_pubkey as btool

2023-07-24 Thread Simon Glass
From: Lukas Funke 

Add btool which calls 'fdt_add_pubkey'

Signed-off-by: Lukas Funke 
Reviewed-by: Simon Glass 
---

(no changes since v1)

 tools/binman/btool/fdt_add_pubkey.py | 67 
 1 file changed, 67 insertions(+)
 create mode 100644 tools/binman/btool/fdt_add_pubkey.py

Applied to u-boot-dm, thanks!


Re: [PATCH v3 07/11] binman: etype: Add u-boot-spl-pubkey-dtb etype

2023-07-24 Thread Simon Glass
From: Lukas Funke 

This adds a new etype 'u-boot-spl-pubkey-dtb'. The etype adds the public
key from a certificate to the dtb. This creates a '/signature' node which
is turn contains the fields which make up the public key. Usually this
is done by 'mkimage -K'. However, 'binman sign' does not add the public
key to the SPL. This is why the pubkey is added using this etype.

The etype calls the underlying 'fdt_add_pubkey' tool.

Signed-off-by: Lukas Funke 
Reviewed-by: Simon Glass 

---

Changes in v3:
- Fixed minor python doc typo in u-boot-spl-pubkey-dtb etype
- Renamed key property from 'key-name' to 'key-name-hint'

Changes in v2:
- Improved rst/python documentation
- Changed u_boot_spl_pubkey_dtb to u-boot-spl-pubkey-dtb in example

 tools/binman/entries.rst|  39 +++
 tools/binman/etype/u_boot_spl_pubkey_dtb.py | 109 
 2 files changed, 148 insertions(+)
 create mode 100644 tools/binman/etype/u_boot_spl_pubkey_dtb.py

Applied to u-boot-dm, thanks!


Re: [PATCH v3 08/11] binman: doc: Add documentation for Xilinx Bootgen bintool

2023-07-24 Thread Simon Glass
From: Lukas Funke 

Add documentation for the 'bootgen' bintool

Signed-off-by: Lukas Funke 
Reviewed-by: Simon Glass 
---

(no changes since v1)

 tools/binman/bintools.rst | 12 
 1 file changed, 12 insertions(+)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 01/83] buildman: Fix verboose typo and add comment

2023-07-24 Thread Simon Glass
Fix the typo in the RunTests() function, adding comments while we are
here.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to fix verboose typo and add comment

 tools/buildman/main.py | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 02/83] buildman: Allow --debug to enable debugging

2023-07-24 Thread Simon Glass
The -D option is used, but plumb it through --debug to enable a full
traceback when something goes wrong.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to allow --debug to enable debugging

 tools/buildman/main.py | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 03/83] buildman: Exit with the return code consistently

2023-07-24 Thread Simon Glass
Test should return a suitable exit code when they fail. Fix this and tidy
up the code a little.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to exit with the return code consistently

 tools/buildman/main.py | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 05/83] buildman: Drop dead code to handle :CONFIG_ construct

2023-07-24 Thread Simon Glass
This is not needed anymore, so drop it.

Signed-off-by: Simon Glass 
Fixes: 252ed872 ("kconfig: remove meaningless prefixes in defconfig files")
---

(no changes since v3)

Changes in v3:
- Add new patch to drop dead code to handle :CONFIG_ construct

 tools/buildman/boards.py | 14 +-
 1 file changed, 1 insertion(+), 13 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 04/83] buildman: Rename the ARM boards

2023-07-24 Thread Simon Glass
Use names consistent with their target names.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to rename the ARM boards

 tools/buildman/func_test.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 06/83] buildman: Avoid globals in leaf functions

2023-07-24 Thread Simon Glass
Rather than using the global thoughout each function, pass in these
values. This allows tests to use different values when testing the same
functions.

Improve a few comments while we are here.

No functional change is intended.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to avoid globals in leaf functions

 tools/buildman/boards.py | 39 ++-
 1 file changed, 26 insertions(+), 13 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 07/83] buildman: Add a test for Boards.scan_defconfigs()

2023-07-24 Thread Simon Glass
Add a test for this code. It requires some defconfig files and a test
Kconfig to work with, so copy these into the temporary directory at the
start.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch with a test for Boards.scan_defconfigs()

 tools/buildman/func_test.py  | 37 ++
 tools/buildman/test/Kconfig  | 72 
 tools/buildman/test/configs/board0_defconfig |  1 +
 tools/buildman/test/configs/board2_defconfig |  1 +
 4 files changed, 111 insertions(+)
 create mode 100644 tools/buildman/test/Kconfig
 create mode 100644 tools/buildman/test/configs/board0_defconfig
 create mode 100644 tools/buildman/test/configs/board2_defconfig

Applied to u-boot-dm, thanks!


Re: [PATCH v4 09/83] buildman: Add a partial test for ensure_board_list()

2023-07-24 Thread Simon Glass
Create a new function which has the non-UI parts of ensure_board_list().
Add some tests for everything except the N: tag.

While we are here, fix the confusing usage of fname inside a loops that
also uses fname.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch with a partial test for ensure_board_list()

 tools/buildman/board.py   |  6 +-
 tools/buildman/boards.py  | 58 
 tools/buildman/func_test.py   | 66 +++
 tools/buildman/test/boards/board0/MAINTAINERS |  5 ++
 tools/buildman/test/boards/board2/MAINTAINERS |  5 ++
 5 files changed, 126 insertions(+), 14 deletions(-)
 create mode 100644 tools/buildman/test/boards/board0/MAINTAINERS
 create mode 100644 tools/buildman/test/boards/board2/MAINTAINERS

Applied to u-boot-dm, thanks!


Re: [PATCH v4 08/83] buildman: Add a test for Boards.output_is_new()

2023-07-24 Thread Simon Glass
Add a test for this code, adjusting the timestamp on various files to
check each use case.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch with a test for Boards.output_is_new()

 tools/buildman/func_test.py | 61 +
 1 file changed, 61 insertions(+)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 14/83] buildman: Detect boards with no CONFIG_TARGET defined

2023-07-24 Thread Simon Glass
We generally expected exactly one of these. Add a check for it.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to detect boards with no CONFIG_TARGET defined

 tools/buildman/boards.py|  4 
 tools/buildman/func_test.py | 13 -
 2 files changed, 16 insertions(+), 1 deletion(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 15/83] buildman: Correct operation of MAINTAINERS N:

2023-07-24 Thread Simon Glass
This doesn't work as intended. Instead it scans every defconfig file
in the source tree.

Fix it and add a test.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Use search() instead of fullmatch() to allow partial matches

Changes in v3:
- Add new patch to correct operation of MAINTAINERS N:

 tools/buildman/boards.py| 15 ++-
 tools/buildman/func_test.py | 17 +
 2 files changed, 23 insertions(+), 9 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 16/83] buildman: Just display a single line for missing maintainers

2023-07-24 Thread Simon Glass
At present we get multiple lines of output when a board has no MAINTAINERS
entry:

   WARNING: no status info for 'bananapi-m2-pro'
   WARNING: no maintainers for 'bananapi-m2-pro'

Suppress the 'status' one since it is implied by the other.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to display a single line for missing maintainers

 tools/buildman/boards.py| 8 ++--
 tools/buildman/func_test.py | 1 -
 2 files changed, 6 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 18/83] buildman: Correct logic for missing maintainers

2023-07-24 Thread Simon Glass
An orphaned board should produce a warning, as should a missing name for
the maintainer (when '-' is provided). Add these cases.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Add new patch to correct logic for missing maintainers

 tools/buildman/boards.py| 14 +-
 tools/buildman/func_test.py | 20 ++--
 2 files changed, 27 insertions(+), 7 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 17/83] buildman: Sort the maintainer warnings

2023-07-24 Thread Simon Glass
Sort the warnings into alphabetical order, for easier reading. Also make
sure that the buildman test files are ignored.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Add new patch to sort the maintainer warnings

 tools/buildman/boards.py| 4 ++--
 tools/buildman/func_test.py | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 19/83] buildman: Add an option to check maintainers

2023-07-24 Thread Simon Glass
Rather than using the -R option to get this report as a side effect, add
a dedicated option for it.

Disable CI for now as there are some missing maintainers, unfortunately.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch with an option to check maintainers
- Use the new --maintainer-check option in CI

 .azure-pipelines.yml|  2 +-
 .gitlab-ci.yml  |  2 +-
 tools/buildman/boards.py| 52 +++--
 tools/buildman/buildman.rst | 13 ++
 tools/buildman/cmdline.py   |  2 ++
 tools/buildman/control.py   | 13 --
 tools/buildman/func_test.py |  6 +++--
 7 files changed, 64 insertions(+), 26 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 20/83] buildman: Provide an argument to the -R option

2023-07-24 Thread Simon Glass
Allow writing the file to a selected location, since otherwise this is
controlled by the buildman configuration, so cannot be determined by the
caller.

Signed-off-by: Simon Glass 
Fixes: https://source.denx.de/u-boot/u-boot/-/issues/17
---

(no changes since v1)

 tools/buildman/buildman.rst |  7 ---
 tools/buildman/cmdline.py   |  2 +-
 tools/buildman/control.py   |  2 ++
 tools/buildman/func_test.py | 25 +++--
 4 files changed, 26 insertions(+), 10 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 21/83] buildman: Tidy up pylint warnings in main

2023-07-24 Thread Simon Glass
Tidy up the various pylint warnings in module 'main'.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/main.py | 25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 23/83] buildman: Fix most pylint warnings in control

2023-07-24 Thread Simon Glass
Tidy up the easier-to-fix pylint warnings in module 'control'.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py   | 119 +---
 tools/buildman/func_test.py |   2 +-
 2 files changed, 71 insertions(+), 50 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 22/83] buildman: Convert camel case in control.py

2023-07-24 Thread Simon Glass
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py   | 31 ++-
 tools/buildman/func_test.py |  7 ---
 tools/buildman/main.py  |  3 +--
 tools/buildman/test.py  |  2 +-
 4 files changed, 24 insertions(+), 19 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 28/83] buildman: Drop use of builder in show_actions()

2023-07-24 Thread Simon Glass
This function only needs the output directory from the builder. This is
passed into the builder, so just pass the same value to show_actions().
The avoids needing a builder to call show_actions().

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 10/83] buildman: Tidy up common code in parse_file()

2023-07-24 Thread Simon Glass
Use a function to add to the maintainers database, to avoid duplicating
the same code twice.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to tidy up common code in parse_file()

 tools/buildman/boards.py | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 11/83] buildman: Warn about dangling maintainer entries

2023-07-24 Thread Simon Glass
Other than the top-level MAINTAINERS file, all maintainer entries should
actually reference a target. Add a warning to detect those that do not.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Reword the warning message

Changes in v3:
- Add new patch to warn about dangling maintainer entries

 tools/buildman/boards.py| 21 -
 tools/buildman/func_test.py |  9 ++---
 2 files changed, 22 insertions(+), 8 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 12/83] buildman: Refactor target handling in Boards.scan()

2023-07-24 Thread Simon Glass
Move the assert to the top of the function and provide an explicit
variables for the target name and base name.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to refactor target handling in Boards.scan()

 tools/buildman/boards.py | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 13/83] buildman: Detect boards with multiple CONFIG_TARGETs defined

2023-07-24 Thread Simon Glass
The TARGET_xxx options are special in that they refer to a single target.
Exactly one should be enabled for each target, corresponding to a
defconfig file.

Detect configs which result in two TARGET_xxx options being set. For
example, at present, TARGET_POLEG and TARET_POLEG_EVB are enabled for the
same board.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to detect boards with multiple CONFIG_TARGETs defined

 tools/buildman/boards.py| 73 +
 tools/buildman/func_test.py | 20 +-
 2 files changed, 68 insertions(+), 25 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 29/83] buildman: Move dry-run handling higher in do_buildman()

2023-07-24 Thread Simon Glass
Move this up above where the builder is created, since it no-longer makes
use of the builder.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 88 ---
 1 file changed, 45 insertions(+), 43 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 24/83] buildman: Move full-help processing to main

2023-07-24 Thread Simon Glass
This does not need any of the control features. Move it out of main to
reduce the size of the do_buildman() function.

For Python 3.6 the -H feature will not work, but this does not seem to be
a huge problem, as it dates from 2016.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 11 ---
 tools/buildman/main.py|  9 +
 2 files changed, 9 insertions(+), 11 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 25/83] buildman: Move series calculations into a separate function

2023-07-24 Thread Simon Glass
Reduce the size of the do_buildman() function a little by moving the code
that figures out the series into a separate function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 95 +++
 1 file changed, 56 insertions(+), 39 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 26/83] buildman: Move fetch-arch code into a separate function

2023-07-24 Thread Simon Glass
Reduce the size of the do_buildman() function a little by moving the code
that handles --fetch-arch into a separate function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 49 +--
 1 file changed, 31 insertions(+), 18 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 27/83] buildman: Add a test for the -A option

2023-07-24 Thread Simon Glass
This lacks a test at present. Add one.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/func_test.py | 7 +++
 1 file changed, 7 insertions(+)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 30/83] buildman: Add tests for excluding things

2023-07-24 Thread Simon Glass
Add some tests for the -x flag.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Add new patch to test for excluding things

 tools/buildman/func_test.py | 24 
 1 file changed, 24 insertions(+)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 31/83] buildman: Move board-selection code into a function

2023-07-24 Thread Simon Glass
Create a new determine_boards() function to hold the code which selects
which boards to build.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Correct test failure when using incorrect variable

 tools/buildman/control.py | 59 ---
 1 file changed, 43 insertions(+), 16 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 32/83] bulidman: Move more code to determine_series()

2023-07-24 Thread Simon Glass
Move some more series-related code here, to reduce the size of the main
function.

Signed-off-by: Simon Glass 
---

(no changes since v2)

Changes in v2:
- Correct operation of -A

 tools/buildman/control.py | 82 ---
 1 file changed, 42 insertions(+), 40 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 33/83] buildman: Move Boards-object code into a function

2023-07-24 Thread Simon Glass
Move the code which obtains a Boards object into its own function, to
reduce the size of the main function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 74 +--
 1 file changed, 48 insertions(+), 26 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 34/83] bulidman: Move toolchain handling to a function

2023-07-24 Thread Simon Glass
Move the code for dealing with toolchains out into its own function, to
reduce the size of the main function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 53 ---
 1 file changed, 38 insertions(+), 15 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 35/83] bulldman: Set up output_dir earlier

2023-07-24 Thread Simon Glass
Set up output_dir at the start of the main function, instead of updating
the options.output_dir option.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 36/83] buildman: Move output-file setup into one place

2023-07-24 Thread Simon Glass
Collect the two parts of the output-file handling into single place.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 37/83] buildman: Pass option values to get_action_summary()

2023-07-24 Thread Simon Glass
Pass in the individual values rather than the whole options object, so we
can see what is needed.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 38/83] buildman: Pass option values to show_actions()

2023-07-24 Thread Simon Glass
Pass in the individual values rather than the whole options object, so we
can see what is needed.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 39/83] buildman: Build option-adjusting into a function

2023-07-24 Thread Simon Glass
Create a separate function to adjust options. Also move show_actions() up
as far as we can in the function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 53 ---
 1 file changed, 33 insertions(+), 20 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 40/83] buildman: Move counting of commits into a function

2023-07-24 Thread Simon Glass
Move this code into a separate function to avoid a pylint warning in
determine_series().

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 63 +--
 1 file changed, 41 insertions(+), 22 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 41/83] buildman: Move setting up the output dir into a function

2023-07-24 Thread Simon Glass
Move this code into a separate function to reduce the size of the main
do_buildman() directory.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 45 ---
 1 file changed, 33 insertions(+), 12 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 42/83] buildman: Move commit numbering into determine_series()

2023-07-24 Thread Simon Glass
Commits are numbered for use in tests. Do this in determine_series() since
it is already dealing with the series.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 43/83] buildman: Avoid too many returns in do_buildman()

2023-07-24 Thread Simon Glass
Fix the pylint warning by using a variable instead of lots of 'return'
statements.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 44/83] buildman: Move remaining builder properties to constructor

2023-07-24 Thread Simon Glass
Do these all in the constructor, so it is consistent.

Move the stray builder comment into the correct place.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builder.py | 25 ++---
 tools/buildman/control.py | 18 +++---
 2 files changed, 25 insertions(+), 18 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 45/83] buildman: Tweak commits and show_bloat

2023-07-24 Thread Simon Glass
Move setting of show_bloat to adjust_options() and adjust how the commits
variable is set. Together these remove the pylint warning about too many
statements.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 46/83] buildman: Moving running of the builder into a function

2023-07-24 Thread Simon Glass
Move this code into a new function. This removes the pylint warning about
too many branches.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 56 ---
 1 file changed, 35 insertions(+), 21 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 47/83] buildman: Drop some unnecessary variables

2023-07-24 Thread Simon Glass
Drop some variables at the end of the do_bulidman() function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 48/83] buildman: Adjust show_toolchain_prefix() to not return

2023-07-24 Thread Simon Glass
This function does not need to return. Simplify the code by exiting
immediately.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 49/83] buildman: Move checking for make into run_builder()

2023-07-24 Thread Simon Glass
This is not needed until the builder is run. Move it there to reduce the
size of the do_buildman() function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 50/83] buildman: Move getting the adjust_cfg into run_builder()

2023-07-24 Thread Simon Glass
Move this into its own function to reduce the size of do_buildman().

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 38 +++---
 1 file changed, 27 insertions(+), 11 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 51/83] buildman: Use get_alow_missing() directly to avoid var

2023-07-24 Thread Simon Glass
Avoid an unnecessary local variable by moving this code to a function.
This fixes the pylint warning about too many local variables.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 52/83] buildman: Create a function to get number of built commits

2023-07-24 Thread Simon Glass
Move this code into a function. This removes the last pylint error in
the control module.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/control.py | 34 +-
 1 file changed, 25 insertions(+), 9 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 53/83] buildman: Convert camel case in cmdline.py

2023-07-24 Thread Simon Glass
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/cmdline.py   | 2 +-
 tools/buildman/func_test.py | 2 +-
 tools/buildman/main.py  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 54/83] buildman: Correct most pylint warnings in cmdline

2023-07-24 Thread Simon Glass
Tidu up warnings in this file.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/cmdline.py | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 55/83] buildman: Add a test for --boards

2023-07-24 Thread Simon Glass
Add a simple functional test for the --boards option. Fix the example in
the docs while we are here. Also improve the docs for Builder.count so it
is clearer what it contains.

Signed-off-by: Simon Glass 
---

(no changes since v2)

Changes in v2:
- Use snake case for tests

 tools/buildman/builder.py   |  3 ++-
 tools/buildman/buildman.rst |  2 +-
 tools/buildman/func_test.py | 11 +++
 3 files changed, 14 insertions(+), 2 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 63/83] buildman: Correct invalid use of out_dir variable

2023-07-24 Thread Simon Glass
This variable has a different meaning in the outer scope. Use a different
name to avoid confusion, or bugs.

Signed-off-by: Simon Glass 
---

(no changes since v3)

Changes in v3:
- Fix 'scrop' typo

 tools/buildman/builderthread.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 64/83] buildman: Drop unnecessary assignment of config_out

2023-07-24 Thread Simon Glass
This is already set up earlier in the function, so drop the extra
assignment.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 1 -
 1 file changed, 1 deletion(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 67/83] buildman: Move more things into _build_args()

2023-07-24 Thread Simon Glass
Move more of the argument-building code into this function. Fix a missing
assignment for out_rel_dir too.

Rename the function since it now builds all the arguments.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 55 -
 1 file changed, 34 insertions(+), 21 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 56/83] buildman: Convert to argparse

2023-07-24 Thread Simon Glass
Use argparse to parse the arguments, since OptionParser is deprecated now.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/cmdline.py   | 130 +
 tools/buildman/control.py   | 141 ++--
 tools/buildman/func_test.py |   6 +-
 tools/buildman/main.py  |  17 ++---
 4 files changed, 148 insertions(+), 146 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 57/83] buildman: Convert camel case in bsettings.py

2023-07-24 Thread Simon Glass
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/bsettings.py | 14 +++---
 tools/buildman/control.py   |  2 +-
 tools/buildman/func_test.py | 12 ++--
 tools/buildman/main.py  |  2 +-
 tools/buildman/test.py  |  4 ++--
 tools/buildman/toolchain.py | 14 +++---
 tools/moveconfig.py |  2 +-
 7 files changed, 25 insertions(+), 25 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 58/83] buildman: Convert camel case in builder.py

2023-07-24 Thread Simon Glass
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builder.py   | 228 
 tools/buildman/builderthread.py |  26 ++--
 tools/buildman/control.py   |  13 +-
 tools/buildman/func_test.py |   2 +-
 tools/buildman/test.py  |  22 +--
 5 files changed, 145 insertions(+), 146 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 59/83] buildman: Split parser creation in two

2023-07-24 Thread Simon Glass
Split this into two functions to avoid a warning about too many
statements.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/cmdline.py | 44 +--
 1 file changed, 33 insertions(+), 11 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 61/83] buildman: Correct most pylint warnings in builderthread

2023-07-24 Thread Simon Glass
Fix the easy warnings in this file.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 95 ++---
 1 file changed, 51 insertions(+), 44 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 60/83] buildman: Convert camel case in builderthread.py

2023-07-24 Thread Simon Glass
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builder.py   |  8 +++---
 tools/buildman/builderthread.py | 50 -
 2 files changed, 29 insertions(+), 29 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 62/83] buildman: Export _get_output_dir() to avoid warnings

2023-07-24 Thread Simon Glass
Make this a public memory since it is used outside the class.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builder.py   | 8 
 tools/buildman/builderthread.py | 2 +-
 tools/buildman/test.py  | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 65/83] buildman: Start a function to set up the make arguments

2023-07-24 Thread Simon Glass
Move some of this code into a new funciion, to help reduce the size of the
run_commits() function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 38 -
 1 file changed, 23 insertions(+), 15 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 66/83] buildman: Move setting of toolchain arguments to _build_args()

2023-07-24 Thread Simon Glass
Move a few more pieces to this new function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 68/83] buildman: Convert config_out to string IO

2023-07-24 Thread Simon Glass
This is probably a little more efficient and it allows passing the object
to another function to write data. Convert config_out to use a string I/O
device.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 71/83] buildman: Move reading of the done file into a function

2023-07-24 Thread Simon Glass
Move this logic into its own function to reduce the size of the
run_commt() function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 66 +
 1 file changed, 42 insertions(+), 24 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 69/83] buildman: Move reconfigure code into its own function

2023-07-24 Thread Simon Glass
Split this into its own function so reduce the size of run_commit().

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 41 -
 1 file changed, 30 insertions(+), 11 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 70/83] buildman: Move bulid code into its own function

2023-07-24 Thread Simon Glass
Split this into its own function so reduce the size of run_commit().

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 40 -
 1 file changed, 30 insertions(+), 10 deletions(-)

Applied to u-boot-dm, thanks!


Re: [PATCH v4 72/83] buildman: Move code to remove old outputs

2023-07-24 Thread Simon Glass
Put this in its own function to reduce the size of the run_commit()
function.

Signed-off-by: Simon Glass 
---

(no changes since v1)

 tools/buildman/builderthread.py | 28 +++-
 1 file changed, 19 insertions(+), 9 deletions(-)

Applied to u-boot-dm, thanks!


  1   2   3   >