Re: [RFC PATCH 1/1] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support

2022-01-26 Thread Heinrich Schuchardt
Am 26. Januar 2022 15:01:56 MEZ schrieb Jessica Clarke : >On 26 Jan 2022, at 11:06, Sunil V L wrote: >> >> This adds support for new RISCV_EFI_BOOT_PROTOCOL to >> communicate the boot hart ID to bootloader/kernel on RISC-V >> UEFI platforms. >> >> Signed-off-by: Sunil V L >> --- >> include/efi_

[PATCH v2 4/4] doc: qemu-riscv: Update documentation for QEMU spike machine

2022-01-26 Thread Anup Patel
We can now use same U-Boot images on both QEMU virt machine and QEMU spike machine so let's update the QEMU RISC-V documentation. Signed-off-by: Anup Patel --- doc/board/emulation/qemu-riscv.rst | 48 -- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/

[PATCH v2 3/4] riscv: qemu: Implement is_flash_available() for MTD NOR

2022-01-26 Thread Anup Patel
Currently, if MTD NOR is enabled then U-Boot tries to issue flash commands even when CFI flash DT node is not present. This causes access fault on RISC-V emulators or ISS which do not emulate CFI flash. To handle this issue, we implement is_flash_available() for qemu-riscv board which will return 1

[PATCH v2 2/4] riscv: qemu: Enable HTIF console support

2022-01-26 Thread Anup Patel
Enable support for HTIF console so that we can use QEMU RISC-V U-Boot on RISC-V emulators and ISS having it. Signed-off-by: Anup Patel Reviewed-by: Philipp Tomsich Reviewed-by: Rick Chen --- board/emulation/qemu-riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/emulation/

[PATCH v2 1/4] serial: Add RISC-V HTIF console driver

2022-01-26 Thread Anup Patel
Quite a few RISC-V emulators and ISS (including Spike) have host transfer interface (HTIF) based console. This patch adds HTIF based console driver for RISC-V platforms which depends totally on DT node for HTIF register base address. Signed-off-by: Anup Patel Reviewed-by: Philipp Tomsich Reviewe

[PATCH v2 0/4] QEMU spike machine support for U-Boot

2022-01-26 Thread Anup Patel
We can use same U-Boot binary compiled using qemu-riscv64_smode_defconfig on QEMU virt machine and QEMU spike machine. To achieve this, we need HTIF console support for U-Boot QEMU RISC-V board hence this series. To test this series with latest OpenSBI, we can use the following command: qemu-syste

Re: [PATCH v2] power: zynqmp: Add power domain driver for ZynqMP

2022-01-26 Thread Jaehoon Chung
On 1/20/22 16:25, Michal Simek wrote: > Driver should be enabled by CONFIG_POWER_DOMAIN=y and > CONFIG_ZYNQMP_POWER_DOMAIN=y. Power domain driver doesn't have own DT node > but it uses zynqmp firmware DT node that's why there is a need to bind > driver when firmware node is found. > > Driver itsel

Please pull u-boot-dm

2022-01-26 Thread Simon Glass
Hi Tom, https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/10771 The following changes since commit 6146cd62aedc4849fec66f10ab0aa57f1dc64b8e: Merge branch '2022-01-24-assorted-updates' (2022-01-25 08:01:43 -0500) are available in the Git repository at: git://git.denx.de/u-boot

[PATCH 1/1] doc: describe MSEL settings for booting from SD card

2022-01-26 Thread Heinrich Schuchardt
unmatched.rst describes booting from SD card or from SPI. But only for booting from SPI the boot selection settings are described. Add the missing information. Fix a typo 'uSD'. Signed-off-by: Heinrich Schuchardt --- doc/board/sifive/unmatched.rst | 7 +-- 1 file changed, 5 insertions(+),

Re: [RFC 1/2] drivers: mmc: write protect active boot area after mmc init.

2022-01-26 Thread Jaehoon Chung
Hi Paul On 1/27/22 10:23, Paul Liu wrote: > Hi Jaehoon, > > There are 2 boot partitions on eMMC. So the active one is write-protected. > Users can write the new firmware to another boot partition (inactive) which > is not write-protected. > And then switch it on. I know there are two boot partit

Re: [RFC 1/2] drivers: mmc: write protect active boot area after mmc init.

2022-01-26 Thread Paul Liu
Hi Jaehoon, There are 2 boot partitions on eMMC. So the active one is write-protected. Users can write the new firmware to another boot partition (inactive) which is not write-protected. And then switch it on. In U-boot, execute "mmc wp" write-protect all of the boot partitions. Maybe we can add

[PULL] u-boot-usb/master

2022-01-26 Thread Marek Vasut
The following changes since commit 6146cd62aedc4849fec66f10ab0aa57f1dc64b8e: Merge branch '2022-01-24-assorted-updates' (2022-01-25 08:01:43 -0500) are available in the Git repository at: git://source.denx.de/u-boot-usb.git master for you to fetch changes up to fc2b399ac03b91339a1cb1bfd4d1

Re: [PATCH 06/16] tools: Drop unused name in image-host

2022-01-26 Thread Simon Glass
The name is created but never used. Drop it. Signed-off-by: Simon Glass --- tools/image-host.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH 01/16] rsa: Add debugging for failure cases

2022-01-26 Thread Simon Glass
Add some more debugging to make it easier to see what is being tried and what fails. Fix a few comment styles while here. Signed-off-by: Simon Glass --- lib/rsa/rsa-verify.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH 03/16] tools: Move copyfile() into a common file

2022-01-26 Thread Simon Glass
This function is useful in other places. Move it to a common file. Signed-off-by: Simon Glass --- tools/fit_common.c | 56 ++ tools/fit_common.h | 11 + tools/fit_image.c | 56 -- 3 files changed, 6

Re: [PATCH 02/16] fit_check_sign: Update help to mention the key is in a dtb

2022-01-26 Thread Simon Glass
The key is inside a dtb file, so tweak the help to make that clear. Signed-off-by: Simon Glass --- tools/fit_check_sign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH 04/16] tools: Avoid leaving extra data at the end of copied files

2022-01-26 Thread Simon Glass
The copyfile() implementation has strange behaviour if the destination file already exists. Update it to ensure that any existing data in the destination file is dropped. Signed-off-by: Simon Glass --- tools/fit_common.c | 2 +- tools/fit_common.h | 2 ++ 2 files changed, 3 insertions(+), 1 del

Re: [PATCH 05/16] tools: Improve comments in signing functions

2022-01-26 Thread Simon Glass
Add some more comments to explain what is going on in the signing functions. Fix two repeated typos. Signed-off-by: Simon Glass --- include/image.h| 2 +- tools/fdt_host.h | 8 tools/image-host.c | 98 +++--- 3 files changed, 85 insertions(+)

Re: [PATCH 07/16] tools: Avoid confusion between keys and signatures

2022-01-26 Thread Simon Glass
We should be consistent in using the term 'signature' to describe a value added to sign something and 'key' to describe the key that can be used to verify the signature. Tidy up the code to stick to this. Add some comments to fit_config_verify_key() and its callers while we are here. Signed-off-

Re: [PATCH 11/16] tools: Pass public-key node through to caller

2022-01-26 Thread Simon Glass
Update the two functions that call add_verify_data() so that the caller can see the node that was written to. Signed-off-by: Simon Glass --- tools/image-host.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH 08/16] tools: Tidy up argument order in fit_config_check_sig()

2022-01-26 Thread Simon Glass
Put the parent node first in the parameters as this is more natural. Also add a comment to explain what is going on. Signed-off-by: Simon Glass --- boot/image-fit-sig.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH 12/16] tools: mkimage: Show where signatures/keys are written

2022-01-26 Thread Simon Glass
At present mkimage displays the node information but it is not clear what signing action was taken. Add a message that shows it. For now it only supports showing a single signing action, since that is the common case. Sample: Signature written to 'sha1-basic/test.fit', node '/configurat

Re: [PATCH 09/16] tools: Pass the key blob around

2022-01-26 Thread Simon Glass
At present we rely on the key blob being in the global_data fdt_blob pointer. This is true in U-Boot but not with tools. For clarity, pass the parameter around. Signed-off-by: Simon Glass --- boot/image-fit-sig.c | 31 ++- boot/image-fit.c | 12 +++- comm

Re: [PATCH v4 08/20] power: domain: ti: Add support for J721S2 SoC

2022-01-26 Thread Jaehoon Chung
On 1/26/22 00:26, Aswath Govindraju wrote: > From: David Huang > > Add support for J721S2 SoC. > > Signed-off-by: David Huang > Signed-off-by: Aswath Govindraju Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > drivers/power/domain/ti-power-domain.c | 5 + > include/k3-de

Re: [PATCH v2 7/9] power: domain: apple: Add reset support

2022-01-26 Thread Jaehoon Chung
Hi, On 1/23/22 04:38, Mark Kettenis wrote: > The power management controller found on Apple SoCs als provides > a way to reset all devices within a power domain. This is needed > to cleanly shutdown the NVMe controller before we hand over > control to the OS. > > Signed-off-by: Mark Kettenis > R

Re: [RFC 1/2] drivers: mmc: write protect active boot area after mmc init.

2022-01-26 Thread Jaehoon Chung
Hi, On 1/25/22 22:55, Ying-Chun Liu wrote: > From: "Ying-Chun Liu (PaulLiu)" > > This commit implements write protection for active boot partition for > eMMC. The active boot partition is write protected, and it is still > able to write to the inactive boot partition. It seems that you want to

[PATCH] soc: soc_ti_k3: update j721e revision numbering

2022-01-26 Thread Bryan Brattlof
There is a 4 bit VARIANT number inside the JTAGID register that TI increments any time a new variant for a chip is produced. Each family of TI's SoCs uses a different versioning scheme based off that VARIANT number. CC: Dave Gerlach Signed-off-by: Bryan Brattlof --- drivers/soc/soc_ti_k3.c | 40

U boot for Roach2

2022-01-26 Thread Jael Rojas Miguel
Good afternoon I want to use an image (linux system embedded) to boot from an SD card on the Roach2 board Please, could you give any suggestions on how to do it? I have the file download from ftp://ftp.denx.de/pub/u_boot/imagesthe version u-boot-2022.01. Many thanks Kind regards -- Jael Ro

Re: Compile only changed files when doing 'make'?

2022-01-26 Thread Grant Edwards
On 2022-01-25, Grant Edwards wrote: > I'm working on a Renesas supplied port of U-Boot, and it seems that > 'make' always compiles every single (configured) source file instead > compiling only the source files that have been changed since the > previous 'make'. This problem appears to be caused

[PATCH v7 2/2] arm: imx8m: add support for Advantech RSB-3720

2022-01-26 Thread Ying-Chun Liu
From: "Ying-Chun Liu (PaulLiu)" Add initial support for Advantech RSB-3720 board. The initial support includes: - MMC - eMMC - I2C - FEC - Serial console Signed-off-by: Darren Huang Signed-off-by: Kevin12.Chen Signed-off-by: Phill.Liu Signed-off-by: Tim Liang Signed-off-by: wei.zeng Si

[RFC PATCH 1/1] efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support

2022-01-26 Thread Sunil V L
This adds support for new RISCV_EFI_BOOT_PROTOCOL to communicate the boot hart ID to bootloader/kernel on RISC-V UEFI platforms. Signed-off-by: Sunil V L --- include/efi_api.h | 4 +++ include/efi_loader.h | 2 ++ include/efi_riscv.h| 16 + lib/efi_loader/Kconfig

[RFC PATCH 0/1] RISCV_EFI_BOOT_PROTOCOL support in U-boot

2022-01-26 Thread Sunil V L
This patch adds the support in u-boot for new RISCV_EFI_BOOT_PROTOCOL for RISC-V UEFI platforms. This protocol is required to communicate the boot hart ID to the bootloader/kernel which need to follow the EFI calling conventions. The latest draft spec of this new protocol is available at https://g

Re: Bug#1003490: u-boot: FTBFS on arch:all with qemu-ppce500 target

2022-01-26 Thread Aurelien Jarno
On 2022-01-25 19:04, Vagrant Cascadian wrote: > On 2022-01-25, Vagrant Cascadian wrote: > > On 2022-01-15, Aurelien Jarno wrote: > >> On 2022-01-11 16:40, Vagrant Cascadian wrote: > >>> On 2022-01-11, Lennart Sorensen wrote: > >>> > On Mon, Jan 10, 2022 at 05:10:04PM -0800, Vagrant Cascadian wrote:

RE: [PATCH 07/14] video: Drop references to CONFIG_VIDEO et al

2022-01-26 Thread Jason Liu
> -Original Message- > From: Simon Glass > Sent: 2022年1月23日 22:04 > To: U-Boot Mailing List > Cc: Anatolij Gustschin ; Jagan Teki > ; Andre Przywara ; > Simon Glass ; Andy Shevchenko > ; Aswath Govindraju > ; Aymen Sghaier ; Bin Meng > ; Dario Binacchi ; Fabio Estevam > ; Heiko Schocher

do you have plan to add kaslrseed support to extlinux.conf

2022-01-26 Thread 张 宁
Hi, Chris Morgan thank you to add kaslrseed to U-boot, do you have plan to add it to extlinux.conf? BR. Ning

Re: [PATCH v5 03/13] mmc: fsl: Use brackets around if()

2022-01-26 Thread Jaehoon Chung
On 1/22/22 21:07, Simon Glass wrote: > At present the IS_ENABLED() macro has extra brackets, making it possible > to write: > >if IS_ENABLED(CONFIG_XXX) > > but it is a bit confusing. Add the missing brackets. > > Signed-off-by: Simon Glass Reviewed-by: Jaehoon Chung Best Regards, Jaehoo

Re: [PATCH] cmd: mmc: Consider GP partitions in mmc hwpartition user enh start -

2022-01-26 Thread Jaehoon Chung
On 1/18/22 06:54, Marek Vasut wrote: > In case the eMMC contains any GP partitions or user sets up new GP > partitions, the size of these GP partitions reduce the size of the > USER partition. Subtract the size of those GP partitions from the > calculated size of USER partition when using `user enh

[PATCH v1 2/2] imx: imx8qm_rm7720: adjust fdt_addr

2022-01-26 Thread Oliver Graute
The Linux Kernel Image size for arm64 is still growing. A Kernel with 54 MB at load address 0x8028 overlaps with fdt_addr at 0x8300. So let's increase it to 0x8400 Signed-off-by: Oliver Graute --- include/configs/imx8qm_rom7720.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v1 1/2] imx: imx8qm_rom7720: Increase CONFIG_SYS_BOOTM_LEN to 64MB

2022-01-26 Thread Oliver Graute
Increase CONFIG_SYS_BOOTM_LEN to 64MB Signed-off-by: Oliver Graute --- include/configs/imx8qm_rom7720.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h index 666e497b0b..31d861481f 100644 --- a/include/configs/imx8qm_rom77

Re: [RFC PATCH v3 4/5] beacon: imx8mn: override env_get_location in imx8mn_beacon.c

2022-01-26 Thread Tommaso Merciai
On Wed, Jan 26, 2022 at 12:05:22PM -0600, Adam Ford wrote: > On Sat, Dec 25, 2021 at 2:26 PM Tommaso Merciai > wrote: > > > > Override env_get_location function at board level, previously dropped > > down from arch/arm/mach-imx/imx8m/soc.c > > > > References: > > - commit 37d3e3bb95d7532e2503f11

tools: imximage: i.MXRT flash config table (questions)

2022-01-26 Thread Jesse Taube
Hi friends!! I'm sorry if this isn't the right way of asking a question. For booting the imxrt10xx from SPI flash it needs a flash config block starting with "ascii "FCFB" Big Endian" from address 0 - 0x1000 of the flash documented on page 217 of the imxrt1050RM. The problem I see is that we ca

drivers: mtd: spi: Use correct 4 byte mode enablement for ISSI SPI flash devices alongside spi-nor-tiny.c subsystem

2022-01-26 Thread Nathan Barrett-Morrison
Hi All, I noticed this was missing from the spi-nor-tiny.c subsystem while trying to use an ISSI SPI flash device with the U-Boot SPL. This patch will allow 4 byte addressing mode to be enabled with ISSI flash devices while inside the U-Boot SPL / using spi-nor-tiny.c. Sincerely, Nathan From 218

[PATCH] drivers: mtd: spi: Use correct 4 byte mode enablement for ISSI SPI flash devices alongside spi-nor-tiny.c subsystem

2022-01-26 Thread Nathan Barrett-Morrison
Hi All, I noticed this was missing from the spi-nor-tiny.c subsystem while trying to use an ISSI SPI flash device with the U-Boot SPL. This patch will allow 4 byte addressing mode to be enabled with ISSI flash devices while inside the U-Boot SPL / using spi-nor-tiny.c. Sincerely, Nathan

drivers: mtd: spi: Allow Quad I/O enablement for ISSI SPI flash devices alongside spi-nor-tiny.c subsystem

2022-01-26 Thread Nathan Barrett-Morrison
Hi All, I noticed this was missing from the spi-nor-tiny.c subsystem while trying to use an ISSI SPI flash device with the U-Boot SPL. This patch will allow Quad (4x) I/O mode to be enabled with ISSI flash devices while inside the U-Boot SPL / using spi-nor-tiny.c. Sincerely, Nathan From 1a7fd52

Re: i.MX8MN (ROMv2) fails to boot over USB

2022-01-26 Thread Adam Ford
On Wed, Jan 26, 2022 at 12:31 PM Michael Nazzareno Trimarchi wrote: > > HI Adam > > On Wed, Jan 26, 2022 at 7:01 PM Adam Ford wrote: > > > > On Wed, Jan 26, 2022 at 11:24 AM Michael Nazzareno Trimarchi > > wrote: > > > > > > Hi Adam > > > > > > On Wed, Jan 26, 2022 at 2:26 AM Tim Harvey wrote:

Re: i.MX8MN (ROMv2) fails to boot over USB

2022-01-26 Thread Michael Nazzareno Trimarchi
HI Adam On Wed, Jan 26, 2022 at 7:01 PM Adam Ford wrote: > > On Wed, Jan 26, 2022 at 11:24 AM Michael Nazzareno Trimarchi > wrote: > > > > Hi Adam > > > > On Wed, Jan 26, 2022 at 2:26 AM Tim Harvey wrote: > > > > > > On Tue, Jan 25, 2022 at 3:49 PM Adam Ford wrote: > > > > > > > > I have a fla

[PATCH] imx: imx8mn_beacon: Fix USB booting

2022-01-26 Thread Adam Ford
The i.MX8M Nano can boot over USB using the boot ROM instead of adding extra code to SPL to support USB drivers, etc. However, when booting from USB, the environment doesnt' know where to load and causes a hang. Fix this hang by supporting CONFIG_ENV_IS_NOWHERE=y. It only falls back to this condi

Re: [RFC PATCH v3 4/5] beacon: imx8mn: override env_get_location in imx8mn_beacon.c

2022-01-26 Thread Adam Ford
On Sat, Dec 25, 2021 at 2:26 PM Tommaso Merciai wrote: > > Override env_get_location function at board level, previously dropped > down from arch/arm/mach-imx/imx8m/soc.c > > References: > - commit 37d3e3bb95d7532e2503f115dd6c6762fd3b0262 > > Signed-off-by: Tommaso Merciai I am going to re-do t

Re: i.MX8MN (ROMv2) fails to boot over USB

2022-01-26 Thread Adam Ford
On Wed, Jan 26, 2022 at 11:24 AM Michael Nazzareno Trimarchi wrote: > > Hi Adam > > On Wed, Jan 26, 2022 at 2:26 AM Tim Harvey wrote: > > > > On Tue, Jan 25, 2022 at 3:49 PM Adam Ford wrote: > > > > > > I have a flash.bin file that boots over MMC just fine, but when I use > > > that same flash.b

Re: [PATCH v2 09/12] configs: sunxi: Add common SUNIV header

2022-01-26 Thread Jesse Taube
On 1/26/22 08:53, Jesse Taube wrote: From: Icenowy Zheng Adds support for SUNIV and the F1C100s. Signed-off-by: Icenowy Zheng Signed-off-by: Jesse Taube --- V1->V2: * Combine ifdefs * Fix indentation * Fix negative logic * Fix rebase artifacts * Remove CONFIG_SYS_LOAD_ADDR * Remove CONFIG

Re: i.MX8MN (ROMv2) fails to boot over USB

2022-01-26 Thread Michael Nazzareno Trimarchi
Hi Adam On Wed, Jan 26, 2022 at 2:26 AM Tim Harvey wrote: > > On Tue, Jan 25, 2022 at 3:49 PM Adam Ford wrote: > > > > I have a flash.bin file that boots over MMC just fine, but when I use > > that same flash.bin file, it appears to hang after running ATF. I > > dumped some debug info for print

Re: [PATCH v2] binman: Skip node generation for images read from files

2022-01-26 Thread Jan Kiszka
On 26.01.22 16:57, Simon Glass wrote: Hi Jan, On Mon, 17 Jan 2022 at 00:28, Jan Kiszka wrote: From: Jan Kiszka We can and should run the node generator only when creating a new image. When we read it back, there is no need to generate nodes - they already exits, and binman does not dive tha

Re: [PATCH] doc: replace @return by Return:

2022-01-26 Thread Simon Glass
Hi, I'm ambivalent about this patch. Pro: - we can make everything use the correct @return in one go - we have a lot of other churn so this is no different Con: it changes things that may not appear in the docs for a long time, if ever. It is less effective without a checkpatch rule The ordering

[PATCH v1] imx: imx8qm-rom7720: switch to binman

2022-01-26 Thread Oliver Graute
Switch to use binman to pack images Signed-off-by: Oliver Graute --- arch/arm/dts/imx8qm-rom7720-a1.dts| 1 + arch/arm/dts/imx8qm-u-boot.dtsi | 133 ++ arch/arm/mach-imx/imx8/Kconfig| 1 + .../advantech/imx8qm_rom7720_a1/imximage.cfg

Re: [PATCH v2] binman: Skip node generation for images read from files

2022-01-26 Thread Simon Glass
Hi Jan, On Mon, 17 Jan 2022 at 00:28, Jan Kiszka wrote: > > From: Jan Kiszka > > We can and should run the node generator only when creating a new image. > When we read it back, there is no need to generate nodes - they already > exits, and binman does not dive that deep into the image - and the

Re: [PATCH 2/4] pci: Extend 'pci regions' command with bus number

2022-01-26 Thread Stefan Roese
On 1/25/22 17:50, Pali Rohár wrote: On Tuesday 25 January 2022 16:53:05 Stefan Roese wrote: On 1/17/22 16:38, Pali Rohár wrote: 'pci regions' currently prints only region information from bus 0 which belongs to controller 0. Parser for 'pci regions' cmdline currently ignores any additional argu

Re: [PATCH u-boot-marvell 14/14] tools: kwboot: Set debug flag to 1

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár This should enable BootROM output on UART. (At least on A385 BootROM this is broken, BootROM ignores this debug flag and does not enable its output on UART if some valid image is available in SPI-NOR.) Signed-off-by: Pali Rohár Signed

Re: [PATCH u-boot-marvell 11/14] tools: kwboot: Handle EINTR in kwboot_write()

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár The write() syscall may be interrupted. Handle EINTR and retry it. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 8 +--- 1 file changed, 5 insertions(+), 3

Re: [PATCH u-boot-marvell 10/14] tools: kwboot: Remove 2s delay before sending first xmodem packet

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár This delay is not needed anymore since kwboot already handles retrying logic for incomplete xmodem packets and also forces BootROM to flush its input queue. Removing it decreases total transfer time. Signed-off-by: Pali Rohár Signed-off-by

Re: [PATCH u-boot-marvell 13/14] tools: kwboot: Fix usage of -D without -t

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár When -D is specified then both bootmsg and debugmsg are not set, but imgpath is set. Fix this check for valid and required parameters. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --

Re: [PATCH v2 07/38] patman: Tidy up the download function a little

2022-01-26 Thread Simon Glass
Reverse the order of the return tuple, so that the filename is first. This seems more obvious than putting the temporary directory first. Correct a bug that leaves a space on the final line. Allow the caller to control the name of the temporary directory. Signed-off-by: Simon Glass --- (no cha

Re: [PATCH u-boot-marvell 12/14] tools: kwboot: Handle EINTR in kwboot_tty_recv()

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár The select() and read() syscalls may be interrupted. Handle EINTR and retry them. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 10 +++--- 1 file changed,

Re: [PATCH u-boot-marvell 09/14] tools: kwboot: Force BootROM to flush input queue after boot pattern

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár Force the BootROM to flush its input queue after sending boot pattern. This ensures that after function kwboot_bootmsg() finishes, BootROM is able to start receiving xmodem packets without any specific delay or setup. Signed-off-by: Pali R

Re: [PATCH u-boot-marvell 08/14] tools: kwboot: Allow to use option -b without image path

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár Allow option -b without image path parameter, to send boot pattern and wait for response but not send any image. This allows to use kwboot just for processing boot pattern and user can use any other xmodem tool for transferring the image its

Re: [PATCH u-boot-marvell 07/14] tools: kwboot: Show 'E' in progress output when error occurs

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár When kwboot is unable to resend current xmodem packet, show an 'E' in the progress output instead of a '+'. This allows to distinguish between the state when kwboot is retrying sending the packet and when retry is not possible. Signed-off-b

Re: [PATCH u-boot-marvell 06/14] tools: kwboot: Fix handling of repeated xmodem packets

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár Unfortunately during some stages of xmodem transfer, A385 BootROM is not able to handle repeated xmodem packets. So if an error occurs during that stage, stop the transfer and return failure. Signed-off-by: Pali Rohár Signed-off-by: Marek

Re: [PATCH u-boot-marvell 05/14] tools: kwboot: Do not change received character in kwboot_xm_recv_reply()

2022-01-26 Thread Stefan Roese
On 1/25/22 18:13, Marek Behún wrote: From: Pali Rohár Marvell BootROM expects retransmission of previous xmodem packet only in the case when it sends NAK response to the host. Do not change non-xmodem response (possibly UART transfer error) to NAK in kwboot_xm_recv_reply() function. Allow call

Re: [PATCH v2 17/38] binman: Add a bintool implementation for cbfstool

2022-01-26 Thread Simon Glass
Add a Bintool for this, which is used to run CBFS tests. It supports the features needed by the tests as well as fetching a binary from Google Drive. Building it from source is very slow since it is not separately supported by the coreboot build system and it builds an entire gcc toolchain before s

Re: [PATCH v2 29/38] binman: Tidy up pylint warnings in comp_util

2022-01-26 Thread Simon Glass
Tweak some naming and comments to resolve these. Use WriteFile() to write the file. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/cbfs_util.py | 8 tools/binman/comp_util.py | 19 +-- tools/binman/entry.py | 2 +- tools/binman/etyp

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2022-01-26 Thread Simon Glass
On 25/01/2022 00.50, Simon Glass wrote: > Hi Rasmus, > > On Mon, 24 Jan 2022 at 15:15, Rasmus Villemoes > wrote: >> >> On 24/01/2022 18.57, Simon Glass wrote: >> And the thing about "adding the signature" - yes, indeed, _signing_ can and should be done after building. But that is not at

Re: [PATCH] usb: Use the first available device for ehci_gadget

2022-01-26 Thread Simon Glass
On Fri, 5 Nov 2021 at 10:53, Sean Anderson wrote: > > For whatever reason, usb_setup_ehci_gadget removes and probes USB device > 0. However, not all systems have a device 0. Use the first device > instead. > > The device probed should probably have something to do with the > controller (as specifi

Re: [PATCH v2] dm: Fix OF_BAD_ADDR definition

2022-01-26 Thread Simon Glass
On Tue, 4 Jan 2022 at 00:42, Patrice Chotard wrote: > > When OF_LIVE flag is enabled on a 64 bits platform, there is an > issue when dev_read_addr() is called and need to perform an address > translation using __of_translate_address(). > > In case of error, __of_translate_address() return's value

Re: [PATCH v2 02/38] binman: Tweak elf tests for a toolchain change

2022-01-26 Thread Simon Glass
Some newer toolchains do not create a symbol for the .ucode section that this test relies on. Update the test to use the symbol that is explicitly created, instead. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/elf_test.py | 8 1 file changed, 4 insertions(+), 4 de

Re: [PATCH] binman: Document the __bss_size symbol error

2022-01-26 Thread Simon Glass
Add a note about the message so it is clear why it occurs. Signed-off-by: Simon Glass --- tools/binman/binman.rst | 29 + 1 file changed, 29 insertions(+) Applied to u-boot-dm, thanks!

Re: [PATCH v2 01/38] Makefile: Fake external blobs by default with binman

2022-01-26 Thread Simon Glass
This behaviour is necessary with boards where the binman description requires processing external blobs, since these may be missing. Enable it by default, so that CI is happy. Warnings indicate that a valid image is not produced, as with the --allow-missing option. Signed-off-by: Simon Glass ---

Re: [PATCH v2 03/38] mkimage: Show the external-offset error

2022-01-26 Thread Simon Glass
This is a debug message at present, which is not very helpful. Print out the error so that action can be taken. Signed-off-by: Simon Glass --- (no changes since v1) tools/fit_image.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH v2 04/38] binman: Expand the external FIT test a little

2022-01-26 Thread Simon Glass
At present this does not check that the external data is in the expected place. Use a non-zero offset for the external data and check it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/ftest.py | 17 + tools/binman/test/162_fit_external.dts |

Re: [PATCH v2 05/38] patman: Allow running a tool and returning the full result

2022-01-26 Thread Simon Glass
Add a new function which returns the entire result from running a tool, not just stdout. Update Run() to use this and to return stdout on error, if stderr is empty, since some unfortunate tools write their error output to stdout rather than stderr. Move building of the PATH to a separate function.

Re: [PATCH v2 06/38] buildman: Move the download function to tools

2022-01-26 Thread Simon Glass
This function is handy for binman as well. Move it into the shared 'tools' module. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/toolchain.py | 46 + tools/patman/tools.py | 45 2 files changed

Re: [PATCH v2 08/38] patman: Add a function to find a tool on the path

2022-01-26 Thread Simon Glass
The Run() function automatically uses the PATH variable to locate a tool when running it. Add a function that does this manually, so we don't have to run a tool to find out if it is present. This is needed by the new Bintool class, which wants to check which tools are present. Signed-off-by: Simo

Re: [PATCH v2 10/38] binman: Drop the image name from the fake-blob message

2022-01-26 Thread Simon Glass
This is not really needed and it makes the message different from the missing-blob message. Update it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/control.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH v2 11/38] binman: Allow faked blobs in blob-ext-list

2022-01-26 Thread Simon Glass
Since this is a list of blobs, each blob should have the ability to be faked, as with blob-ext. Update the Entry base class to set allow_fake and use the base class in the section code also, so that this propagagtes to blob-ext-list, which is not a section. Signed-off-by: Simon Glass --- (no cha

Re: [PATCH v2 12/38] binman: Correct path for fip_util

2022-01-26 Thread Simon Glass
This should be imported from the binman module. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/fip_util_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied to u-boot-dm, thanks!

Re: [PATCH v2 13/38] binman: Add installation instructions

2022-01-26 Thread Simon Glass
Explain how to install binman, since it is not obvious. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/binman.rst | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) Applied to u-boot-dm, thanks!

Re: [PATCH v2 14/38] binman: Add support for bintools

2022-01-26 Thread Simon Glass
Binman requires various tools to actually work, such as 'lz4' to compress data and 'futility' to sign Chrome OS firmware. At present these are handled in an ad-hoc manner and there is no easy way to find out what tools are needd to build an image, nor where to obtain them. Add an implementation of

Re: [PATCH v2 15/38] binman: Plumb in support for bintools

2022-01-26 Thread Simon Glass
Support collecting the available bintools needed by an image, by scanning the entries in the image. Also add a command-line interface to access the basic bintool features, such as listing the bintools and fetching them if needed. Signed-off-by: Simon Glass --- (no changes since v1) tools/binm

Re: [PATCH v2 16/38] binman: Add tests for bintool

2022-01-26 Thread Simon Glass
Add tests to cover the bintool functionality. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/bintool_test.py | 353 + tools/binman/btool/_testing.py | 36 2 files changed, 389 insertions(+) create mode 100644 tools/binman/bintool_test

Re: [PATCH v2 18/38] binman: Add a bintool implementation for fiptool

2022-01-26 Thread Simon Glass
Add a Bintool for this, which is used to run FIP tests. It supports the features needed by the tests as well as building a binary from the git tree. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/btool/fiptool.py | 123 ++ 1 file changed, 123

Re: [PATCH v2 19/38] binman: Add a bintool implementation for futility

2022-01-26 Thread Simon Glass
Add a Bintool for this, which is used to sign Chrome OS images and build the Google Binary Block (GBB). It supports the features needed by binman as well as fetching a binary from Google Drive. Building it from source is possible but is left for another time, as it requires at least one other libra

Re: [PATCH v2 20/38] binman: Add a bintool implementation for ifwitool

2022-01-26 Thread Simon Glass
Add a Bintool for this, which is used to build Intel IFWI images. It supports the features needed by the tests as well as downloading a binary from Google Drive. Although this is built in the U-Boot tree, it is not currently included with u-boot-tools, so it may be useful to install a binary on the

Re: [PATCH v2 21/38] binman: Add a bintool implementation for mkimage

2022-01-26 Thread Simon Glass
Add a Bintool for this, which is used to build images for use by U-Boot. It supports the features needed by binman as well as installing via the u-boot-tools packages. Although this is built in the U-Boot tree, it is still useful to install a binary on the system. Signed-off-by: Simon Glass ---

Re: [PATCH v2 22/38] binman: Enable bintool tests including cmdline processing

2022-01-26 Thread Simon Glass
The tests rely on having at least 5 bintool implementions. Now that we have this, enable them. Add tests for the binman 'tool' subcommand. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/ftest.py | 32 tools/binman/main.py | 7 --- 2 fil

Re: [PATCH v2 24/38] binman: Convert to using the FIP bintool

2022-01-26 Thread Simon Glass
Update the FIP tests to use this bintool, instead of running fiptool directly. This simplifies the code and provides more consistency as well as supporting missing bintools. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/fip_util.py | 26 -- tool

Re: [PATCH v2 23/38] binman: Convert to using the CBFS bintool

2022-01-26 Thread Simon Glass
Update the CBFS tests to use this bintool, instead of running cbfstool directly. This simplifies the overall code and provides more consistency, as well as supporting missing bintools. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/cbfs_util.py | 24 to

Re: [PATCH v2 25/38] binman: Convert to using the futility bintool

2022-01-26 Thread Simon Glass
Update the GBB and vblock entry types to use this bintool, instead of running futility directly. This simplifies the code and provides more consistency as well as supporting missing bintools. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/gbb.py| 37 +++

Re: [PATCH v2 33/38] binman: Convert to using the lzma_alone bintool

2022-01-26 Thread Simon Glass
Update the code to use this bintool, instead of running lzma_alone directly. This simplifies the code and provides more consistency. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/comp_util.py | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) Applied to u-

Re: [PATCH v2 34/38] binman: Plumb in support for missing bintools

2022-01-26 Thread Simon Glass
Bintools can be missing, in which case binman continues operation but reports an invalid image. Plumb in support for this and add tests for entry types which use bintools. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/cmdline.py | 2 ++ tools/binman/control.py

Re: [PATCH v2 26/38] binman: Convert to using the ifwitool bintool

2022-01-26 Thread Simon Glass
Update the ifwi entry type to use this bintool, instead of running ifwitool directly. This simplifies the code and provides more consistency as well as supporting missing bintools. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/intel_ifwi.py | 25 +++---

Re: [PATCH v2 28/38] binman: Move compression into binman

2022-01-26 Thread Simon Glass
The compression functions are not actually used by patman, so we don't need then in the tools module. Also we want to change them to use bintools, which patman will not support. Move these into a new comp_util module, within binman. Signed-off-by: Simon Glass --- (no changes since v1) tools/b

Re: [PATCH v2 27/38] binman: Convert to using the mkimage bintool

2022-01-26 Thread Simon Glass
Update the fit and mkimage entry types to use this bintool, instead of running mkimage directly. This simplifies the code and provides more consistency as well as supporting missing bintools. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/fit.py | 20 ++

  1   2   >