Re: [PATCH v13 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-10-13 Thread Sughosh Ganu
On Fri, 14 Oct 2022 at 11:46, Ilias Apalodimas wrote: > > On Thu, Oct 06, 2022 at 02:36:17PM +0530, Sughosh Ganu wrote: > > In the FWU Multi Bank Update feature, the information about the > > updatable images is stored as part of the metadata, on a separate > > partition. Add a driver for reading

[PATCH v3 6/6] test: add test for eficonfig secure boot key management

2022-10-13 Thread Masahisa Kojima
Provide a unit test for the eficonfig secure boot key management menu. Signed-off-by: Masahisa Kojima --- No change since v2 newly created in v2 test/py/tests/test_eficonfig/conftest.py | 84 +++- test/py/tests/test_eficonfig/defs.py | 14 + .../test_eficonfig/test_eficonfig_sb

[PATCH v3 4/6] eficonfig: add "Show/Delete Signature Database" menu entry

2022-10-13 Thread Masahisa Kojima
This commit adds the menu-driven interface to show and delete the signature database. EFI Signature Lists can contain the multiple signature entries, this menu can delete the indivisual entry. If the PK is enrolled and UEFI Secure Boot is in User Mode or Deployed Mode, user can not delete the ex

[PATCH v3 5/6] test/eficonfig: support secure boot key maintenance menu

2022-10-13 Thread Masahisa Kojima
eficonfig test is get aligned with the addition of secure boot key management menu. Signed-off-by: Masahisa Kojima --- No change since v2 newly created in v2 test/py/tests/test_eficonfig/test_eficonfig.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/py/tests/test

[PATCH v3 3/6] eficonfig: add UEFI Secure Boot Key enrollment interface

2022-10-13 Thread Masahisa Kojima
This commit adds the menu-driven UEFI Secure Boot Key enrollment interface. User can enroll the PK, KEK, db and dbx by selecting EFI Signature Lists file. After the PK is enrolled, UEFI Secure Boot is enabled and EFI Signature Lists file must be signed by KEK or PK. Signed-off-by: Masahisa Kojima

[PATCH v3 2/6] eficonfig: expose append entry function

2022-10-13 Thread Masahisa Kojima
This commit exposes the eficonfig menu entry append function. Signed-off-by: Masahisa Kojima --- No change since v2 newly created in v2 cmd/eficonfig.c | 32 +--- include/efi_config.h | 5 + 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/

[PATCH v3 1/6] eficonfig: refactor eficonfig_select_file_handler()

2022-10-13 Thread Masahisa Kojima
eficonfig_select_file_handler() is commonly used to select the file. eficonfig_display_select_file_option() intends to add the additional menu mainly to clear the selected file information. eficonfig_display_select_file_option() is not necessary for the file selection process, so it should be outsi

[PATCH v3 0/6] eficonfig: add UEFI Secure Boot key maintenance interface

2022-10-13 Thread Masahisa Kojima
This series adds the UEFI Secure Boot key maintenance interface to the eficonfig command. User can enroll and delete the PK, KEK, db and dbx. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b kojima/eficonfig_sbkey_v3 [Major Changes] - rebase

Re: [PATCH v13 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-10-13 Thread Ilias Apalodimas
On Thu, Oct 06, 2022 at 02:36:24PM +0530, Sughosh Ganu wrote: > The FWU Multi Bank Update feature supports updation of firmware images s/updation/updating > to one of multiple sets(also called banks) of images. The firmware > images are clubbed together in banks, with the system booting images >

[PATCH] sandbox: Eliminate CONFIG_HOST_32/64BIT

2022-10-13 Thread Heinrich Schuchardt
From: Heinrich Schuchardt Building sandbox_defconfig on 32bit systems requires manual configuration. we should void this. The compiler provides symbol __LP64__. This is enough to know if the host is a 64bit or a 32bit system. Reported-by: Michal Suchanek Signed-off-by: Heinrich Schuchardt ---

Re: [PATCH v13 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-10-13 Thread Ilias Apalodimas
On Thu, Oct 06, 2022 at 02:36:23PM +0530, Sughosh Ganu wrote: > The FWU Multi Bank Update specification requires the Update Agent to > carry out certain checks at the time of platform boot. The Update > Agent is the component which is responsible for updating the firmware > components and maintaini

Re: [PATCH v13 06/15] FWU: Add helper functions for accessing FWU metadata

2022-10-13 Thread Ilias Apalodimas
On Thu, Oct 06, 2022 at 02:36:20PM +0530, Sughosh Ganu wrote: > Add weak functions for getting the update index value and dfu > alternate number needed for FWU Multi Bank update > functionality. > > The current implementation for getting the update index value is for > platforms with 2 banks. If a

Re: [PATCH v13 13/15] mkeficapsule: Add support for generating empty capsules

2022-10-13 Thread Ilias Apalodimas
On Thu, Oct 06, 2022 at 02:36:27PM +0530, Sughosh Ganu wrote: > The Dependable Boot specification[1] describes the structure of the > firmware accept and revert capsules. These are empty capsules which > are used for signalling the acceptance or rejection of the updated > firmware by the OS. Add su

Re: [PATCH v13 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-10-13 Thread Ilias Apalodimas
On Thu, Oct 06, 2022 at 02:36:17PM +0530, Sughosh Ganu wrote: > In the FWU Multi Bank Update feature, the information about the > updatable images is stored as part of the metadata, on a separate > partition. Add a driver for reading from and writing to the metadata > when the updatable images and

Re: [PATCH v13 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-10-13 Thread Ilias Apalodimas
Hi Sughosh On Thu, Oct 06, 2022 at 02:36:16PM +0530, Sughosh Ganu wrote: > In the FWU Multi Bank Update feature, the information about the > updatable images is stored as part of the metadata, which is stored on > a dedicated partition. Add the metadata structure, and a driver model > uclass whic

Re: [PATCH 6/6] sunxi: add CherryPi-F1C200s support

2022-10-13 Thread Jesse Taube
On 10/13/22 05:53, Andre Przywara wrote: On 13/10/2022 09:33, Clément Péron wrote: Hi Clément, On Wed, 12 Oct 2022 at 18:35, Andre Przywara wrote: The CherryPi F1C200s board is a small development board, featuring the F1C200s with 64MB of co-packaged DRAM. It comes with two USB-C sockets

[PATCH 8/8] [DO NOT MERGE] sunxi: add a defconfig for PopStick

2022-10-13 Thread Icenowy Zheng
--- configs/popstick_defconfig | 35 +++ 1 file changed, 35 insertions(+) create mode 100644 configs/popstick_defconfig diff --git a/configs/popstick_defconfig b/configs/popstick_defconfig new file mode 100644 index 00..6dc21695b7 --- /dev/null +++ b/confi

[PATCH 7/8] [DO NOT MERGE, DIRTY HACK] sunxi: use UBI for environement storage

2022-10-13 Thread Icenowy Zheng
Signed-off-by: Icenowy Zheng --- board/sunxi/board.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 21a2407e06..f4138573d4 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -133,6 +133,7 @@ void i2c_init_board(void) */ enum env_l

[PATCH 6/8] [DO NOT MERGE] sunxi: sync DT from my tree for PopStick

2022-10-13 Thread Icenowy Zheng
Signed-off-by: Icenowy Zheng --- arch/arm/dts/Makefile| 3 +- arch/arm/dts/suniv-f1c100s-licheepi-nano.dts | 16 +++ arch/arm/dts/suniv-f1c100s.dtsi | 26 + arch/arm/dts/suniv-f1c200s-popstick-v1.1.dts | 101 +++ 4 files changed, 145 in

[PATCH 5/8] sunxi: enable support for SPI NAND booting on SUNIV

2022-10-13 Thread Icenowy Zheng
As we added support for SPI NAND to the existing SPL SPI codepath, route the boot code to it when it detects the BROM loads SPL from SPI NAND, as for SoCs with both SPI NAND and boot media indicator support, the boot media indicator is the same for SPI NOR and NAND. Signed-off-by: Icenowy Zheng -

[PATCH 4/8] sunxi: SPL SPI: add initial support for booting from SPI NAND

2022-10-13 Thread Icenowy Zheng
This commit adds support for booting from SPI NAND to SPL SPI code by mimicing the behavior of boot ROM (use fixed page size and sequentially try SPI NOR and NAND). Signed-off-by: Icenowy Zheng --- arch/arm/mach-sunxi/Kconfig | 16 +++ arch/arm/mach-sunxi/spl_spi_sunxi.c | 74 +++

[PATCH 3/8] sunxi: SPL SPI: allow multiple boot attempt

2022-10-13 Thread Icenowy Zheng
As we're going to add support for SPI NAND to this code, add code that allows multiple boot attempts with different load offsets and functions. To keep compatibility with loading raw binary on SPI NOR, a bool parameter is used to allow booting without valid magic number when booting with SPI NOR.

[PATCH 2/8] sunxi: SPL SPI: add support for read command with 2 byte address

2022-10-13 Thread Icenowy Zheng
This kind of read command is utilized in SPI NANDs for reading data inside a selected page, which is obviously smaller than how much 2 byte address can address. So 2 bytes are used for the address and one dummy byte is needed after the real address. As the address is sent out in bit endian, this ma

[PATCH 1/8] sunxi: SPL SPI: extract code for doing SPI transfer

2022-10-13 Thread Icenowy Zheng
To support SPI NAND flashes, more commands than Read (03h) are needed. Extract the code for doing SPI transfer from the reading code for code reuse. Signed-off-by: Icenowy Zheng --- arch/arm/mach-sunxi/spl_spi_sunxi.c | 105 1 file changed, 59 insertions(+), 46 dele

Re: [PATCH] tests: Build correct sandbox configuration on 32bit

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 22:28, Michal Suchanek wrote: Currently sandbox configuration defautls to 64bit and there is no automation for building 32bit sandbox on 32bit hosts. cpp does not know about target specification, code needs to be compiled to determine integer width. Add a test program that prints th

[PATCH 0/8] SUNIV SPI NAND support in SPL

2022-10-13 Thread Icenowy Zheng
This patchset tries to extend SPI-based boot code in sunxi SPL to support SPI NAND, following the same principle with current SPI NOR code (mimicking the behavior of sunxi BROM). In addition, as part of test to this patchset, some patches for Source Parts Inc. PopStick is attached, although marked

Re: [EXT] [REGRESSION]: v2022.07: SHA256 hash is broken on imx8m series with CAAM enabled

2022-10-13 Thread Peng Fan
On 7/15/2022 11:06 PM, ZHIZHIKIN Andrey wrote: Hello Gaurav, Cc: Tom here for integration points. -Original Message- From: U-Boot On Behalf Of Gaurav Jain Sent: Friday, July 15, 2022 4:01 PM To: ZHIZHIKIN Andrey Cc: u-boot@lists.denx.de; feste...@denx.de; sba...@denx.de; Michael W

Re: commit 787f04bb6a - imx: add USB2_BOOT type

2022-10-13 Thread Peng Fan
Hi Rasmus On 10/7/2022 4:08 PM, Rasmus Villemoes wrote: Hi Peng It seems that commit 787f04bb6a (imx: add USB2_BOOT type) broke our board logic which relies on whether get_boot_device() returns USB_BOOT or not. Instrumenting get_boot_device() shows that on our imx8mp board, boot_instance is 3 w

Re: [PATCH v4] imx: imx8qm: cgtqmx8: switch to binman

2022-10-13 Thread Peng Fan
On 10/7/2022 9:11 PM, Oliver Graute wrote: Switch to use binman to pack images Signed-off-by: Oliver Graute Reviewed-by: Fabio Estevam Reviewed-by: Simon Glass Reviewed-by: Peng Fan --- Changes for v4 - rebased on master Changes for v3 -added Reviewed-by - rebased on master

Re: [PATCH 3/3] arm: fsl: csu: Reduce size of ns_dev

2022-10-13 Thread Peng Fan
On 10/12/2022 5:51 AM, Sean Anderson wrote: None of the values in this struct are larger than 256, so we can reduce the members to u8s. This saves around 1K. Signed-off-by: Sean Anderson Reviewed-by: Peng Fan --- include/fsl_csu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

Re: [PATCH 2/3] arm: layerscape: Disable unused parts of ICID tables

2022-10-13 Thread Peng Fan
On 10/12/2022 5:51 AM, Sean Anderson wrote: Several parts of the ICID table are only necessary for U-Boot proper. Disable them in SPL. This saves around 500 bytes. Signed-off-by: Sean Anderson Reviewed-by: Peng Fan --- arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../in

Re: [PATCH 1/3] arm: layerscape: Don't select FSL_IFC when booting from SD card

2022-10-13 Thread Peng Fan
On 10/12/2022 5:51 AM, Sean Anderson wrote: FSL_IFC should only be selected when booting from NAND flash (or when NAND_FSL_IFC is enabled). The existing logic does this correctly when QSPI is also enabled, but not when just booting from SD. Signed-off-by: Sean Anderson Reviewed-by: Peng Fa

[PATCH] test: Fix typo in test name

2022-10-13 Thread Michal Suchanek
For other sandbox tests the printed test name corresponds to the configuration except for this one. Signed-off-by: Michal Suchanek --- test/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run b/test/run index 810b47e08d..5b17204c73 100755 --- a/test/run +++ b/test/r

[PATCH] libfdt: Fix build with python 3.10

2022-10-13 Thread Michal Suchanek
Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in swig 4.10 but it is not clear when it will be released. There was a warning since python 3.8. Link: https://github.com/swig/swig/pull/2277 Signed-off-by: Michal Suchanek --- scripts/dtc/pylibfdt/libfdt.i_shipped | 4 1

[PATCH] libfdt: Fix invalid version warning

2022-10-13 Thread Michal Suchanek
python does not like the u-boot- prefix in the version, drop it. /usr/lib/python3.10/site-packages/setuptools/dist.py:544: UserWarning: The version specified ('u-boot-2022.10') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440

[PATCH] clk: k210: Fix error calculation on 32bit

2022-10-13 Thread Michal Suchanek
k210 is 64bit but the driver and tests are also built in sandbox, and that can be built 32bit. BIT(32) does not work on 32bit, shift before subtraction to fit into 32bit integer with BIT values. Signed-off-by: Michal Suchanek --- drivers/clk/clk_k210.c | 2 +- test/dm/k210_pll.c | 2 +- 2

[PATCH] tests: Build correct sandbox configuration on 32bit

2022-10-13 Thread Michal Suchanek
Currently sandbox configuration defautls to 64bit and there is no automation for building 32bit sandbox on 32bit hosts. cpp does not know about target specification, code needs to be compiled to determine integer width. Add a test program that prints the integer width, and a make target that alig

Re: [PATCH 1/1] powerpc: fix fdt_fixup_liodn_tbl_fman()

2022-10-13 Thread Marek Behún
On Thu, 13 Oct 2022 18:47:29 +0200 Heinrich Schuchardt wrote: > On 10/13/22 18:12, Marek Behún wrote: > > On Wed, 12 Oct 2022 19:13:11 +0200 > > Heinrich Schuchardt wrote: > > > >> Builiding with GCC 12.2 fails: > >> > >> arch/powerpc/cpu/mpc85xx/liodn.c: In function > >> 'fdt_fixup_lio

Re: [u-boot][PATCH 10/14] mtd: rawnand: omap_gpmc: support u-boot driver model

2022-10-13 Thread Roger Quadros
On 13/10/2022 14:17, Adam Ford wrote: > On Wed, Oct 12, 2022 at 6:42 AM Adam Ford wrote: >> >> On Wed, Oct 12, 2022 at 1:22 AM Roger Quadros wrote: >>> >>> Hi Adam, >>> >>> On 11/10/2022 18:01, Adam Ford wrote: On Tue, Oct 11, 2022 at 6:52 AM Roger Quadros wrote: > > Adds driver mod

Re: Question about uboot initialisation

2022-10-13 Thread momo aubin
Hi Simon, > On 12 Sep 2022, at 10:59 PM, momo aubin wrote: > >  > > Sent from my iPhone > >> On 12 Sep 2022, at 8:31 PM, Simon Glass wrote: >> >> Hi Aubin, >> On Mon, 12 Sept 2022 at 09:13, momo aubin wrote: >>> >>> >>> On Mon, 12 Sept 2022 at 17:07, Simon Glass wrote: >>>

Re: Re: [PATCH 0/2] sunxi: update devicetree files from the kernel

2022-10-13 Thread Jernej Škrabec
Dne ponedeljek, 26. september 2022 ob 12:34:38 CEST je Andre Przywara napisal(a): > On Wed, 14 Sep 2022 00:40:02 +0100 > Andre Przywara wrote: > > Hi, > > can someone please have a look and confirm that this is legit? Could be as > easy as just diff'ing against what's in the kernel tree and che

[PATCH 3/3] cmd: source: Support specifying config name

2022-10-13 Thread Sean Anderson
As discussed previously [1,2], the source command is not safe to use with verified boot unless there is a key with required = "images" (which has its own problems). This is because if such a key is absent, signatures are verified but not required. It is assumed that configuration nodes will provide

[PATCH 2/3] cmd: source: Clean up a few lines

2022-10-13 Thread Sean Anderson
This simplifies a few lines and corrects an error message. Signed-off-by: Sean Anderson --- cmd/source.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/source.c b/cmd/source.c index bb98255fe86..f08e6d34172 100644 --- a/cmd/source.c +++ b/cmd/source.c @@ -128

[PATCH 1/3] treewide: Use NULL for script image name

2022-10-13 Thread Sean Anderson
Two callers of image_source_script specify an image name. However, both use the deprecated @ syntax, indicating that they have not been updated in a while. If CONFIG_FIT_SIGNATURE is enabled, we will reject such names outright. Back in commit 152576a598c ("stm32mp: stm32prog: handle U-Boot script i

[PATCH 0/3] cmd: source: Support specifying config name

2022-10-13 Thread Sean Anderson
This series adds support for using configs with the source command. See the third patch for details. Sean Anderson (3): treewide: Use NULL for script image name cmd: source: Clean up a few lines cmd: source: Support specifying config name .../cmd_stm32prog/cmd_stm32prog.c | 2

Re: [PATCH v6 7/8] net: add MV88E61xx DSA driver

2022-10-13 Thread Tim Harvey
On Wed, Oct 12, 2022 at 12:50 PM Vladimir Oltean wrote: > > On Mon, Oct 10, 2022 at 09:39:43AM -0700, Tim Harvey wrote: > > Add a DSA driver for the MV88E6xxx compatible Ethernet switches. > > > > Cc: Marek BehĂșn > > Cc: Vladimir Oltean > > Signed-off-by: Tim Harvey > > Reviewed-by: Vladimir O

Re: [PATCH 1/1] powerpc: fix fdt_fixup_liodn_tbl_fman()

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 18:12, Marek Behún wrote: On Wed, 12 Oct 2022 19:13:11 +0200 Heinrich Schuchardt wrote: Builiding with GCC 12.2 fails: arch/powerpc/cpu/mpc85xx/liodn.c: In function 'fdt_fixup_liodn_tbl_fman': arch/powerpc/cpu/mpc85xx/liodn.c:340:35: error: the comparison will alway

Re: [PATCH v2 29/45] image: Correct strncpy() warning with image_set_name()

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 14:29, Simon Glass wrote: gcc 12 seems to warn on strncpy() as a matter of course. Rewrite the code a different way to do the same thing, to avoid the warning. Signed-off-by: Simon Glass --- (no changes since v1) include/image.h | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [PATCH v2 17/45] disk: Rename block_dev to desc

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 14:28, Simon Glass wrote: The use of 'block_dev' in this context is confusing, since it is not a pointer to a device, just to some information about it. Rename this to 'desc', as is more commonly used, since it is a block descriptor. Signed-off-by: Simon Glass Acked-by: Heinrich S

Re: [PATCH v2 16/45] disk: Rename block functions

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 14:28, Simon Glass wrote: Use the uclass type as the first part of the function name, to be consistent with the methods in other block drivers. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to rename block functions disk/disk-uclass.c| 24

Re: [PATCH v2 14/45] test: Support tests which can only be run manually

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 14:28, Simon Glass wrote: At present we normally write tests either in Python or in C. But most Python tests end up doing a lot of checks which would be better done in C. Checks done in C are orders of magnitude faster and it is possible to get full access to U-Boot's internal working

Re: [PATCH 1/1] powerpc: fix fdt_fixup_liodn_tbl_fman()

2022-10-13 Thread Marek Behún
On Wed, 12 Oct 2022 19:13:11 +0200 Heinrich Schuchardt wrote: > Builiding with GCC 12.2 fails: > > arch/powerpc/cpu/mpc85xx/liodn.c: In function 'fdt_fixup_liodn_tbl_fman': > arch/powerpc/cpu/mpc85xx/liodn.c:340:35: error: the comparison will > always evaluate as 'false' for the addr

Re: [RESEND PATCH 1/2] splash: support raw image from MMC

2022-10-13 Thread Julien Masson
Hi Simon, On Thu 13 Oct 2022 at 17:51, Simon Glass wrote: > HI Julien, > > On Wed, 12 Oct 2022 at 05:38, Julien Masson wrote: >> >> The user has now the choice to specify the splash location in the MMC >> as a raw storage. >> >> Signed-off-by: Julien Masson >> --- >> common/splash.c|

Re: [PATCH v2 12/45] test: Report skippped tests

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 14:28, Simon Glass wrote: At present it is possible for a test to skip itself by returning -EAGAIN but this is not recorded. "Console recording disabled" in test_pre_run() is an existing example. Acked-by: Heinrich Schuchardt Keep a track of skipped tests and report the total a

Re: [PATCH v2 02/45] docker: Install pyelftools for builds

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 14:25, Simon Glass wrote: Binman needs this module to build sandbox_vpl and it is needed elsewhere in CI. Add it to the docker file. Signed-off-by: Simon Glass --- Changes in v2: - Split the docker change into a separate patch. tools/docker/Dockerfile | 1 + 1 file changed, 1

Re: [PATCH v2 04/45] disk: Drop debug messages in part_efi

2022-10-13 Thread Heinrich Schuchardt
On 10/13/22 14:28, Simon Glass wrote: This is monstrously verbose when something goes wrong. It should work by recording the problem and reporting it (once) at the command level. At present it sometimes outputs hundreds of lines of CRC mismatches. For now, just silence it all. GUID Partition

Re: [RESEND PATCH 2/2] splash: get devpart from environment variable

2022-10-13 Thread Julien Masson
Hi Simon, Thanks for the review. On Thu 13 Oct 2022 at 17:44, Simon Glass wrote: > Hi Julien, > > On Wed, 12 Oct 2022 at 05:38, Julien Masson wrote: >> >> By default several types of splash locations are supported and the >> user can select one of them through environment var (splashsource).

Re: [PATCH] image: fit: Fix not verifying data configuration

2022-10-13 Thread Sean Anderson
On 10/13/22 3:14 AM, Rasmus Villemoes wrote: > On 12/10/2022 18.28, Sean Anderson wrote: >> On 10/12/22 08:59, Simon Glass wrote: >>> Hi Sean, >>> >>> On Tue, 11 Oct 2022 at 17:25, Sean Anderson >>> wrote: When reading data from a FIT image, we must verify the configuration we ge

Re: [PATCH v2] cmd: bcb: select user(0) hwpart in __bcb_load()

2022-10-13 Thread Sean Anderson
On 10/13/22 8:25 AM, Mattijs Korpershoek wrote: > For some blk operations, it's possible that a different hw partition > gets selected via blk_dselect_hwpart(). > In that case, only the region of the device covered by that partition > is accessible. > > This breaks "bcb load" which attempts to

Re: [PATCH v2 1/2] image: Fix string truncation warning

2022-10-13 Thread Michal Suchánek
On Thu, Oct 13, 2022 at 10:16:56AM +0200, Michal Suchanek wrote: > In file included from ../tools/imagetool.h:24, > from ../tools/default_image.c:16: > In function ‘image_set_name’, > inlined from ‘image_set_header’ at ../tools/default_image.c:133:2: > ../include/image.h:786:9:

[PATCH v2 00/45] vbe: Implement the full firmware flow

2022-10-13 Thread Simon Glass
This series provides an implementation of VBE from TPL through to U-Boot proper, using VBE to load the relevant firmware stages. It buils a single image.bin file containing all the phases: TPL - initial phase, loads VPL using binman symbols VPL - main firmware phase, loads SPL using VBE para

[PATCH 2/2] configs: sunxi: licheepi_nano: enable D-Cache

2022-10-13 Thread Icenowy Zheng
As the compile error when D-Cache is enabled is gone, we can have D-Cache enabled now. Signed-off-by: Icenowy Zheng --- configs/licheepi_nano_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/licheepi_nano_defconfig b/configs/licheepi_nano_defconfig index a9776bbcac..b80d32c50

[PATCH 1/2] sunxi: fix SUNIV build when enabling D-Cache

2022-10-13 Thread Icenowy Zheng
The enable_caches function in architecture-specific board code is only necessary for V7A CPUs, code for both V8A and ARM926 have already declared this function. Only provide our implementation of enable_caches() for V7A CPUs. Signed-off-by: Icenowy Zheng --- arch/arm/mach-sunxi/board.c | 2 +-

[PATCH 0/2] sunxi: fix SUNIV D$ support

2022-10-13 Thread Icenowy Zheng
Currently D$ support of SUNIV is broken because of duplicated definition of the D$ enabling function. Mask the one in mach-sunxi to fix the build error when D$ is enabled, and enable the D$ on Lichee Pi Nano. Icenowy Zheng (2): sunxi: fix SUNIV build when enabling D-Cache configs: sunxi: lich

[PATCH] blk: fix a couple of trivial documentation typos

2022-10-13 Thread Mattijs Korpershoek
: 0e49f5c26caf9972137a474065afd4bdfe5ec062 change-id: 20221013-blk-doc-typos-de90e92ccd6b Best regards, -- Mattijs Korpershoek

[PATCH v2 24/45] image: Move comment for fit_conf_find_compat()

2022-10-13 Thread Simon Glass
Move this comment to the header file, where the APIs should be defined. Signed-off-by: Simon Glass --- Changes in v2: - Update the comment style boot/image-fit.c | 43 --- include/image.h | 41 + 2 files changed,

[PATCH v2 40/45] sandbox: Add an image for VPL

2022-10-13 Thread Simon Glass
Use binman to build an image which includes all the U-Boot phases so that a full VBE boot can take place with just that image.bin file. Attach the image file to mmc2 so it can be loaded. VBE is used to load images in two phases: - In VPL, VBE decides which SPL image to load - In SPL, VBE de

[PATCH v2 45/45] vbe: Add a test for the VBE flow into U-Boot proper

2022-10-13 Thread Simon Glass
Add a test which checks that VBE boots correctly from TPL through to U-Boot proper. Signed-off-by: Simon Glass --- Changes in v2: - Drop patch 'rsa: Avoid warning in padding_pss_verify()' arch/sandbox/dts/test.dts | 37 ++ test/py/tests/test_vbe_vpl.py | 38

[PATCH v2 44/45] vbe: Add a command to show the VBE state

2022-10-13 Thread Simon Glass
Add a VBE comment which shows the current state. Currently this is just the phases which booted via VBE. Signed-off-by: Simon Glass --- (no changes since v1) cmd/vbe.c | 31 ++- include/spl.h | 2 ++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git

[PATCH v2 43/45] vbe: Record which phases loaded using VBE

2022-10-13 Thread Simon Glass
We expect VPL and SPL to load using VBE. Add a record of this so we can check it in U-Boot proper. Signed-off-by: Simon Glass --- (no changes since v1) boot/vbe_simple_fw.c | 10 ++ include/bloblist.h | 1 + include/vbe.h| 9 + 3 files changed, 20 insertions(+) dif

[PATCH v2 42/45] vbe: Use a manual test

2022-10-13 Thread Simon Glass
Use a manual test for the VBE test, so we can make the pytest and the C unit test work together properly. Signed-off-by: Simon Glass --- (no changes since v1) test/boot/vbe_fixup.c | 19 --- test/py/tests/test_vbe.py | 7 ++- 2 files changed, 10 insertions(+), 16 delet

[PATCH v2 21/45] dm: blk: mmc: Tidy up some Makefile rules for SPL

2022-10-13 Thread Simon Glass
Use the correct SPL_TPL_ variable so that these features can be enabled in TPL and VPL as needed. Disable it by default in TPL to avoid any code-size increase. No boards are actually using it since the Makefile rules don't allow including drivers/block/ with TPL_DM enabled. It can be manually enab

[PATCH v2 41/45] vpl: Allow signature verification

2022-10-13 Thread Simon Glass
Add the required Kconfig option so that signatures can be verified when loading a configuration. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to allow signature verification boot/Kconfig | 1 - common/Kconfig | 7 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v2 38/45] vbe: Add Kconfig options for VPL

2022-10-13 Thread Simon Glass
Enable the various features needed in VPL, by adding Kconfig options. Update the defconfig for sandbox_vpl so that the build for each phase includes what is needed. Drop LZMA for now and make sure partition support is omitted in SPL, since it is not needed. Signed-off-by: Simon Glass --- (no ch

[PATCH v2 39/45] vbe: Add info about the VBE device to the fwupd node

2022-10-13 Thread Simon Glass
At present we put the driver in the /chosen node in U-Boot. This is a bit strange, since U-Boot doesn't normally use that node itself. It is better to put it under the bootstd node. To make this work we need to copy create the node under /chosen when fixing up the device tree. Copy over all the pr

[PATCH v2 37/45] vbe: Drop the U-Boot prefix from the version

2022-10-13 Thread Simon Glass
We don't need the U-Boot prefix on the version and in fact it is harmful since pytest gets confused seeing the U-Boot banner bring displayed when the version is printed. Drop the prefix from the string. We could produce an entirely new string from the component parts, but this adds to the rodata

[PATCH v2 35/45] vbe: Support reading the next SPL phase via VBE

2022-10-13 Thread Simon Glass
Add an SPL loader to obtain the next-phase binary from a FIT provided by the VBE driver. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/spl.c | 3 +- arch/sandbox/include/asm/spl.h | 1 + boot/Makefile | 1 + boot/vbe_request.c

[PATCH v2 34/45] vbe: Support selecting operations by SPL phase

2022-10-13 Thread Simon Glass
VBE supports booting firmware during the SPL phases, i.e. so that VPL can start SPL and SPL can start U-Boot. It also supports booting an OS, when in U-Boot. As a first step towards these features, add functions to indicate the current VBE phase. The firmware selection is done in VPL and the OS s

[PATCH v2 31/45] vbe: Use a warning for a failed requests

2022-10-13 Thread Simon Glass
Optional requests should present a warning rather than an error. Update the log call. Signed-off-by: Simon Glass --- (no changes since v1) boot/vbe_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/vbe_request.c b/boot/vbe_request.c index 935505dd421..01f7a

[PATCH v2 28/45] image: Allow loading a FIT image for a particular phase

2022-10-13 Thread Simon Glass
Add support for filtering out FIT images by phase. Rather than adding yet another argument to this already overloaded function, use a composite value, where the phase is only added in if needed. The FIT config is still selected (and verified) as normal, but the images are selected based on the pha

[PATCH v2 36/45] vbe: Move OS implementation into a separate file

2022-10-13 Thread Simon Glass
Move this into its own file so it can be built only by U-Boot proper. Signed-off-by: Simon Glass --- (no changes since v1) boot/Makefile| 1 + boot/vbe_simple.c| 102 +-- boot/vbe_simple.h| 34 +++ boot/

[PATCH v2 33/45] sandbox: Support obtaining the next phase from an image

2022-10-13 Thread Simon Glass
At present sandbox runs the next phase from discrete executables, so for example u-boot-tpl runs u-boot-vpl to get to the next phase. In some cases the phases are all built into a single firmware image, as is done for real boards. Add support for this to sandbox. Make it higher priority so that i

[PATCH v2 25/45] sandbox: Generalise SPL booting

2022-10-13 Thread Simon Glass
At present sandbox only supports jumping to a file, to get to the next U-Boot phase. We want to support other methods, so update the code to use an enum for the method. Also use the Use board_boot_order() to set the order, so we can add more options. Also add the MMC methods into the BOOT_DEVICE e

[PATCH v2 32/45] spl: Allow multiple loaders of the same time

2022-10-13 Thread Simon Glass
At present we only support a single loader of each time. Extra ones are ignored. This means that only one BOOT_DEVICE_BOARD can be used in the SPL image. This is inconvenient since we sometimes want to provide several board-specific drivers, albeit at different priorties. Add support for this. Th

[PATCH v2 30/45] vbe: Rename vbe_fixup to vbe_request

2022-10-13 Thread Simon Glass
The vbe_fixup file handles device tree fixups, but these are called OS requests in VBE. Rename the file to reflect its wider purpose. Signed-off-by: Simon Glass --- (no changes since v1) boot/Makefile | 2 +- boot/{vbe_fixup.c => vbe_request.c} | 2 +- test/py/tests/test_

[PATCH v2 27/45] image: Add the concept of a phase to FIT

2022-10-13 Thread Simon Glass
We want to be able to mark an image as related to a phase, so we can easily load all the images for SPL or for U-Boot proper. Add this to the FIT specification, along with some access functions. Signed-off-by: Simon Glass --- Changes in v2: - Attach the phase to the image node instead of the co

[PATCH v2 29/45] image: Correct strncpy() warning with image_set_name()

2022-10-13 Thread Simon Glass
gcc 12 seems to warn on strncpy() as a matter of course. Rewrite the code a different way to do the same thing, to avoid the warning. Signed-off-by: Simon Glass --- (no changes since v1) include/image.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/image.h

[PATCH v2 26/45] sandbox: Add a way to specify the sandbox executable

2022-10-13 Thread Simon Glass
At present the sandbox executable is assumed to be arg[0] but this only works for a single jump (e.g. from SPL to U-Boot). Add a new arg to solve this issue, along with a detailed comment. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/start.c | 30 ++

[PATCH v2 23/45] sandbox: Drop message about writing sandbox state

2022-10-13 Thread Simon Glass
This happens every time sandbox moves to the next phase so is not very interesting. Display the message only when debugging. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- (no changes since v1) arch/sandbox/cpu/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v2 18/45] dm: blk: Add udevice functions

2022-10-13 Thread Simon Glass
At present we have functions called blk_dread(), etc., which take a struct blk_desc * to refer to the block device. Add some functions which use udevice instead, since this is more in keeping with how driver model is supposed to work. Update one of the tests to use this. Note that it would be nic

[PATCH v2 22/45] dm: mmc: Allow sandbox emulator to build without writes

2022-10-13 Thread Simon Glass
When MMC_WRITE is disabled this driver produced a build error. Fix this. Also update a comment while we are here. Signed-off-by: Simon Glass --- (no changes since v1) drivers/mmc/sandbox_mmc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/sandbox_m

[PATCH v2 20/45] bloblist: Drop debugging

2022-10-13 Thread Simon Glass
Disable debugging by default since this implementation is stable now. Signed-off-by: Simon Glass --- (no changes since v1) common/bloblist.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/bloblist.c b/common/bloblist.c index 8488663354b..0d63b6e8817 100644 --- a/common/bloblist.c ++

[PATCH v2 19/45] usb: Update the test to cover reading and writing

2022-10-13 Thread Simon Glass
Add test coverage for blk_write() as well. The blk_erase() is not tested for now as the USB stor interface does not support erase. Signed-off-by: Simon Glass --- Changes in v2: - Rebase to master drivers/scsi/scsi_emul.c | 9 drivers/usb/emul/sandbox_flash.c | 35 +++

[PATCH v2 17/45] disk: Rename block_dev to desc

2022-10-13 Thread Simon Glass
The use of 'block_dev' in this context is confusing, since it is not a pointer to a device, just to some information about it. Rename this to 'desc', as is more commonly used, since it is a block descriptor. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to rename block_dev to des

[PATCH v2 15/45] bootstd: Add a way to set up a bootflow

2022-10-13 Thread Simon Glass
Add a function to init a bootflow, to reduce code duplication. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 5 + boot/bootflow.c| 9 + boot/bootmeth-uclass.c | 5 + include/bootflow.h | 12 4 files changed, 23 inserti

[PATCH v2 13/45] test: Update tests to use the skip feature

2022-10-13 Thread Simon Glass
Some tests currently return 0 when they want to be skipped. Update them to return -EAGAIN instead, so they are counted as skipped. A few tests are in two parts, with the latter part being skipped in certain situations. Split these into two and use the correct condition for the second part. Signed

[PATCH v2 16/45] disk: Rename block functions

2022-10-13 Thread Simon Glass
Use the uclass type as the first part of the function name, to be consistent with the methods in other block drivers. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to rename block functions disk/disk-uclass.c| 24 include/part.h| 12

[PATCH v2 14/45] test: Support tests which can only be run manually

2022-10-13 Thread Simon Glass
At present we normally write tests either in Python or in C. But most Python tests end up doing a lot of checks which would be better done in C. Checks done in C are orders of magnitude faster and it is possible to get full access to U-Boot's internal workings, rather than just relying on the comma

[PATCH v2 11/45] binman: Support writing symbols into ELF files

2022-10-13 Thread Simon Glass
In some cases the ELF version of SPL builds may be packaged, rather than a binary .bin file. Add support for this. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/elf.py | 41 +++ tools/binman/entry.py | 5 ++- tools/binman/e

[PATCH v2 10/45] binman: Handle writing ELF symbols in the Entry class

2022-10-13 Thread Simon Glass
This feature is used by several etypes and we plan to add more that use it. Make symbol writing a feature of the base class to reduce the code duplication. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/entry.py | 13 +++-- tools/binman/etype/blob.py

  1   2   >