Re: [PATCH] watchdog: Fix SPL build with watchdog disabled in asm files

2022-04-28 Thread Stefan Roese
On 4/28/22 13:33, Pali Rohár wrote: Allow to compile assembler files in SPL build which calls WATCHDOG_RESET function when watchdog is disabled in SPL and enabled in U-Boot proper. This issue was fixed in past by commit 7fbd42f5afc4 ("watchdog: Handle SPL build with watchdog disabled") for C sou

Re: [PATCH v3 02/15] mips: mtmips: add two reference boards for mt7621

2022-04-28 Thread Stefan Roese
On 4/28/22 12:37, Weijie Gao wrote: The mt7621_rfb board supports integrated giga PHYs plus one external giga PHYs. It also has up to 512MiB DDR3, 16MB SPI-NOR, 3 mini PCI-e x1 slots, SDXC and USB. The mt7621_nand_rfb board is almost the same as mt7621_rfb board, but it uses NAND flash and SDXC

Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC

2022-04-28 Thread Stefan Roese
Hi Weijie On 4/29/22 03:23, Weijie Gao wrote: Hi Marek, Yes. MT7621 does need such a proprietary binary for DDR initialization and calibration. That's why I submit only the ram-bootable part here. I'm considering to create a preloader to load and run DDR init&calib binary and ram-bootable u-bo

[PATCH v5] bosch: Add initial board support for ACC

2022-04-28 Thread Philip Oberfichtner
The Bosch ACC (Air Center Control) Board is based on the i.MX6D. Signed-off-by: Philip Oberfichtner --- Changes in v5: - Rebase on v2022.07-rc1 - Sync device tree with Linux Changes in v4: - Remove obsolete CONFIG_FEC #defines - Sync device tree with Linux Changes in v3: - Rename acc to bosch

[PATCH v2 2/2] mkimage: Support signing 'auto' FITs

2022-04-28 Thread Sean Anderson
This adds support for signing images in auto-generated FITs. To do this, we need to add a signature node. The algorithm name property already has its own option, but we need one for the key name hint. We could have gone the -G route and added an explicit name for the public key (like what is done f

[PATCH v2 1/2] mkimage: Document misc options

2022-04-28 Thread Sean Anderson
Over the years, several options have not made it into the help message. Document them. Do the same for the man page. Signed-off-by: Sean Anderson --- Changes in v2: - Document secondary image types - Move -G directly after -k - Reword documentation for -s doc/mkimage.1 | 60 +

Re: U-Boot and ethernet regression on mx6cuboxi

2022-04-28 Thread Tim Harvey
On Thu, Apr 28, 2022 at 1:41 PM Tom Rini wrote: > > Hey, > > So my mx6cuboxi was out of my lab for a bit, and that's how this > regression got in mainline. With: > 4223fb0ee18d11462c55ac94198fdc2055f2c27c is the first bad commit > commit 4223fb0ee18d11462c55ac94198fdc2055f2c27c > Author: Tim Harv

U-Boot and ethernet regression on mx6cuboxi

2022-04-28 Thread Tom Rini
Hey, So my mx6cuboxi was out of my lab for a bit, and that's how this regression got in mainline. With: 4223fb0ee18d11462c55ac94198fdc2055f2c27c is the first bad commit commit 4223fb0ee18d11462c55ac94198fdc2055f2c27c Author: Tim Harvey Date: Tue Mar 1 12:15:01 2022 -0800 net: fec: prevent

Re: [PATCH] efi_loader: disk: allow blk devices even without UCLASS_PARTITION

2022-04-28 Thread Mark Kettenis
> From: AKASHI Takahiro > Date: Thu, 28 Apr 2022 13:49:16 +0900 > > While GPT partition is mandated in UEFI specification, CONFIG_PARTITION is > seen optional under the current implementation. > So modify efi_disk_rw_blocks() to allow accepting UCLASS_BLK devices. > > Fixes: commit d97e98c887ed

[PATCH] Makefile: update warning about CONFIG_OF_EMBED

2022-04-28 Thread Ralph Siemsen
Update the diagnostic message with revised location of document, which changed in 3e9fddfc4f1 ("doc: Move devicetree control doc to rST") Signed-off-by: Ralph Siemsen --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ccc87c3a5cd..486a9b9ca

Re: [PATCH] dt-bindings: leds: import common led bindings from linux 5.17

2022-04-28 Thread Tom Rini
On Thu, Apr 28, 2022 at 01:26:53PM +0200, Pali Rohár wrote: > This allows usage of LED_COLOR_ID_RGB macro in DTS files. > > Signed-off-by: Pali Rohár Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH 2/2] test: dm: pinmux: Get LED2 udevice in the pinmux test

2022-04-28 Thread Tom Rini
On Mon, Apr 25, 2022 at 06:33:51PM +0200, Marek Vasut wrote: > The UT reinitializes the pin controller state, get LED2 udevice > to trigger its probe and configure the pin controller pin state > as it is expected by the test. > > Signed-off-by: Marek Vasut > Cc: Patrice Chotard > Cc: Patrick De

Re: [PATCH 1/2] test: dm: led: Fix LED enumeration

2022-04-28 Thread Tom Rini
On Mon, Apr 25, 2022 at 06:33:50PM +0200, Marek Vasut wrote: > The GPIO LED driver no longer considers the top level node an LED, > because it is not an LED. With this bug fixed, the LED enumeration > has changed. Update the test accordingly. > > Signed-off-by: Marek Vasut > Cc: Patrice Chotard

Re: [PATCH] led: Drop led_default_state()

2022-04-28 Thread Tom Rini
On Fri, Apr 22, 2022 at 03:41:42PM +0200, Marek Vasut wrote: > This function is empty, drop it. > > Signed-off-by: Marek Vasut > Cc: Patrice Chotard > Cc: Patrick Delaunay > Cc: Sean Anderson > Cc: Simon Glass > Cc: Steven Lawrance > Reviewed-by: Patrice Chotard Applied to u-boot/master,

Re: [PATCH] led: gpio: Use NOP uclass driver for top-level node

2022-04-28 Thread Tom Rini
On Fri, Apr 22, 2022 at 03:34:00PM +0200, Marek Vasut wrote: > The top level DT node of gpio-leds is not a LED itself, bind NOP uclass > driver to it, and bind different LED uclass driver to its subnodes which > represent the actual LEDs. This simplifies the probe() implementation > and fixes the

Re: [PATCH 3/3] led: gpio: Check device compatible string to determine the top level node

2022-04-28 Thread Tom Rini
On Fri, Apr 22, 2022 at 03:15:55PM +0200, Marek Vasut wrote: > Since 2d1deaf88ed ("led: gpio: Drop duplicate OF "label" property parsing"), > all LED nodes have some sort of label. Use > device_is_compatible(..."leds-gpio") > to determine whether this is a top-level node, since it is only the top

Re: [PATCH 2/3] led: Mark device instance with DM_FLAG_PROBE_AFTER_BIND

2022-04-28 Thread Tom Rini
On Fri, Apr 22, 2022 at 03:15:54PM +0200, Marek Vasut wrote: > Calling device_probe() from uclass .post_bind() callback has all kinds > of odd side-effects, e.g. device instances not being available just yet. > Make use of the DM_FLAG_PROBE_AFTER_BIND instead, mark device instances > which need to

Re: [PATCH 1/3] dm: core: Add DM_FLAG_PROBE_AFTER_BIND flag

2022-04-28 Thread Tom Rini
On Fri, Apr 22, 2022 at 03:15:53PM +0200, Marek Vasut wrote: > Introduce DM_FLAG_PROBE_AFTER_BIND flag, which can be set by driver or > uclass in .bind(), to indicate such driver instance should be probe()d > once binding of all devices is complete. > > This is useful in case the driver determine

[PATCH] board: freescale: p1_p2_rdb_pc: Allow to compile without __SW_BOOT_SD macro

2022-04-28 Thread Pali Rohár
Add #ifdef guard for __SW_BOOT_SD macro like there are guards for all other __SW_BOOT_* macros. Signed-off-by: Pali Rohár --- board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/f

Re: [PATCH] misc: atsha204a: Add support for atsha204 chip

2022-04-28 Thread Pali Rohár
On Friday 22 April 2022 05:59:28 Heiko Schocher wrote: > Hello Pali, > > On 21.04.22 11:40, Pali Rohár wrote: > > On Thursday 21 April 2022 06:11:11 Heiko Schocher wrote: > >> And not forget, please add a documentation for the compatible string > >> in u-boot:/doc/device-tree-bindings/ > > > > Cu

[PATCH] doc: Add device-tree-bindings for atsha204 and atsha204a

2022-04-28 Thread Pali Rohár
Document trivial bindings for atsha204 and atsha204a. Signed-off-by: Pali Rohár --- doc/device-tree-bindings/misc/atsha204.txt | 4 1 file changed, 4 insertions(+) create mode 100644 doc/device-tree-bindings/misc/atsha204.txt diff --git a/doc/device-tree-bindings/misc/atsha204.txt b/doc/

Re: [PATCH] ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN default

2022-04-28 Thread Tom Rini
On Thu, Apr 28, 2022 at 12:31:08PM -0400, Sean Anderson wrote: > Hi Fabio, > > On 4/28/22 12:23 PM, Fabio Estevam wrote: > > Hi Sean, > > > > On Thu, Apr 28, 2022 at 1:02 PM Sean Anderson > > wrote: > >> > >> SPL_SYS_MALLOC_F_LEN defaults to SYS_MALLOC_F_LEN. 0x1 (the new > >> default) is 6

Re: [PATCH v5 00/17] enable menu-driven boot device selection

2022-04-28 Thread Heinrich Schuchardt
On 4/28/22 18:31, Heinrich Schuchardt wrote: On 4/28/22 10:09, Masahisa Kojima wrote: This patch series adds the menu-driven boot device selection, by extending the existing "bootmenu" to include UEFI and distro_boot related entries, and supports menu-driven UEFI boot variable maintenance. This

Re: [PATCH v5 16/17] bootmenu: add removable media entries

2022-04-28 Thread Heinrich Schuchardt
On 4/28/22 10:09, Masahisa Kojima wrote: UEFI specification requires booting from removal media using a architecture-specific default image name such as BOOTAA64.EFI. This commit adds the removable media entries into bootmenu, so that user can select the removable media and boot with default imag

[PATCH v2] ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN default

2022-04-28 Thread Sean Anderson
SPL_SYS_MALLOC_F_LEN defaults to SYS_MALLOC_F_LEN. 0x1 is 64 KiB, or around half of the total OCRAM size. Revert to the default of 0x2000. This fixes SPL boot. Fixes: 545eceb520 ("imx8/ls10xx: Use a sane SYS_MALLOC_F_LEN default") Signed-off-by: Sean Anderson Reviewed-by: Fabio Estevam ---

Re: [PATCH] ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN default

2022-04-28 Thread Fabio Estevam
Hi Sean, On 28/04/2022 13:31, Sean Anderson wrote: That would also work. The primary problem is that between v2 and v3 the default got raised from 0x2000 to 0x1. Do you remember why you added layerscape stuff in the first place? The only non-default value for this property for this famil

Re: [PATCH v5 13/17] efi_loader: menu-driven addition of UEFI boot option

2022-04-28 Thread Heinrich Schuchardt
On 4/28/22 10:09, Masahisa Kojima wrote: This commit supports the menu-driven UEFI boot option addition. User can select the block device volume having efi_simple_file_system_protocol and select the file corresponding to the Boot variable. Then user enter the label of the BOOT variable in

Re: [PATCH v5 00/17] enable menu-driven boot device selection

2022-04-28 Thread Heinrich Schuchardt
On 4/28/22 10:09, Masahisa Kojima wrote: This patch series adds the menu-driven boot device selection, by extending the existing "bootmenu" to include UEFI and distro_boot related entries, and supports menu-driven UEFI boot variable maintenance. This patch series also includes the removable medi

Re: [PATCH] ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN default

2022-04-28 Thread Sean Anderson
Hi Fabio, On 4/28/22 12:23 PM, Fabio Estevam wrote: > Hi Sean, > > On Thu, Apr 28, 2022 at 1:02 PM Sean Anderson wrote: >> >> SPL_SYS_MALLOC_F_LEN defaults to SYS_MALLOC_F_LEN. 0x1 (the new >> default) is 64 KiB, or around half of the total OCRAM size. Revert to >> the previous default of 0x

[PATCH 1/1] efi_loader: BOOTSANDBOX.EFI is not a default file name

2022-04-28 Thread Heinrich Schuchardt
On the sandbox choose a default EFI file name according to the host architecture. Signed-off-by: Heinrich Schuchardt --- include/efi_default_filename.h | 48 +- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/include/efi_default_filename.h b/includ

Re: [PATCH] ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN default

2022-04-28 Thread Fabio Estevam
Hi Sean, On Thu, Apr 28, 2022 at 1:02 PM Sean Anderson wrote: > > SPL_SYS_MALLOC_F_LEN defaults to SYS_MALLOC_F_LEN. 0x1 (the new > default) is 64 KiB, or around half of the total OCRAM size. Revert to > the previous default of 0x2000. This fixes SPL boot. > > Fixes: 545eceb520 ("imx8/ls10xx:

Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC

2022-04-28 Thread Marek Behún
On Thu, 28 Apr 2022 18:37:09 +0800 Weijie Gao wrote: > This series will add support for MediaTek MT7621 SoC with two reference boards > and related drivers. > > The MediaTek MT7621 is a network processor integrating a dual-core > dual-threaded MIPS 1004Kc processor running at a normal frequency

[PATCH] ls10xxx: Use a sane SPL_SYS_MALLOC_F_LEN default

2022-04-28 Thread Sean Anderson
SPL_SYS_MALLOC_F_LEN defaults to SYS_MALLOC_F_LEN. 0x1 (the new default) is 64 KiB, or around half of the total OCRAM size. Revert to the previous default of 0x2000. This fixes SPL boot. Fixes: 545eceb520 ("imx8/ls10xx: Use a sane SYS_MALLOC_F_LEN default") Signed-off-by: Sean Anderson ---

Re: [PATCH] patman: Fix defaults not propegating to subparsers

2022-04-28 Thread Sean Anderson
Hi Alper, On 4/27/22 4:11 PM, Alper Nebi Yasak wrote: > On 22/04/2022 19:50, Sean Anderson wrote: >> On python 3.8.10, subparsers are not updated with defaults. I suspect >> this is related to [1]. Fix this by explicitly updating subparsers with >> settings. >> >> [1] https://github.com/python/cp

Re: [PATCH] efi_loader: Improve console screen clearing and reset

2022-04-28 Thread Jan Kiszka
On 28.04.22 13:52, Heinrich Schuchardt wrote: > On 4/25/22 11:23, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Ensure that the default colors are set when clearing the screen so that >> the background is properly filled and succeeding colored outputs will >> have no differently colored trail. >> >>

please modify output of i.MX8MSCALE DDR Tool

2022-04-28 Thread Rasmus Villemoes
Hi NXP folks Is it possible for you to modify the i.MX8MSCALE DDR Tool so that the lpddr4_timing.c files it emits use "static" in front of ddr_ddrc_cfg[] and all the other arrays it defines; the only symbol that file defines which should have external linkage is the final "struct dram_timing_info

Re: [PATCH 4/4] spl: spl_nand: Fix bad block handling in fitImage

2022-04-28 Thread Tom Rini
On Wed, Apr 27, 2022 at 07:50:25AM +0200, Michael Trimarchi wrote: > If the fitImage has some bad block in fit image area, the > offset must be recalulcated. This should be done always. > After implementing it in mxs now is possible to call the function > even for that platform. > > Cc: Fabio Est

Re: [PATCH] efi_loader: Improve console screen clearing and reset

2022-04-28 Thread Heinrich Schuchardt
On 4/25/22 11:23, Jan Kiszka wrote: From: Jan Kiszka Ensure that the default colors are set when clearing the screen so that the background is properly filled and succeeding colored outputs will have no differently colored trail. Before clearing, ensure that no previous output of firmware or U

[PATCH] board: synquacer: developerbox: Remove Masami from MAINTAINERS

2022-04-28 Thread Masami Hiramatsu
Remove Masami Hiramatsu from MAINTAINERS since he will leave Linaro and his email will be not available anymore. Signed-off-by: Masami Hiramatsu --- board/socionext/developerbox/MAINTAINERS |1 - 1 file changed, 1 deletion(-) diff --git a/board/socionext/developerbox/MAINTAINERS b/board/so

Re: [PATCH] misc: i2c_eeprom: fix at24c32 offset_len

2022-04-28 Thread Rasmus Villemoes
On 28/04/2022 13.11, Eugen Hristev wrote: > According to at24c32 datasheet: > > RANDOM READ: A random read requires a “dummy” byte write sequence to load in > the dataword address. Once the device address word and data word address are > clocked in and acknowledged by the EEPROM, the microcontroll

[PATCH] watchdog: Fix SPL build with watchdog disabled in asm files

2022-04-28 Thread Pali Rohár
Allow to compile assembler files in SPL build which calls WATCHDOG_RESET function when watchdog is disabled in SPL and enabled in U-Boot proper. This issue was fixed in past by commit 7fbd42f5afc4 ("watchdog: Handle SPL build with watchdog disabled") for C source files, but not for assembler sourc

[PATCH] powerpc: mpc85xx: Fix compilation with CONFIG_WDT

2022-04-28 Thread Pali Rohár
When CONFIG_WDT is enabled then non-DM watchdog code cannot be used due to conflicting functions like watchdog_reset(). So disable compilation of mpc85xx watchdog_reset() function when CONFIG_WDT is enabled. Signed-off-by: Pali Rohár --- arch/powerpc/cpu/mpc85xx/cpu.c | 2 ++ 1 file changed, 2 i

[PATCH] dt-bindings: leds: import common led bindings from linux 5.17

2022-04-28 Thread Pali Rohár
This allows usage of LED_COLOR_ID_RGB macro in DTS files. Signed-off-by: Pali Rohár --- include/dt-bindings/leds/common.h | 48 --- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h i

Re: [PATCH] efi_loader: Select EVENT as well

2022-04-28 Thread Heinrich Schuchardt
On 4/28/22 12:03, Jan Kiszka wrote: On 27.04.22 07:55, AKASHI Takahiro wrote: On Wed, Apr 27, 2022 at 07:47:15AM +0200, Jan Kiszka wrote: From: Jan Kiszka Fixes WARNING: unmet direct dependencies detected for EVENT_DYNAMIC Depends on [n]: EVENT [=n] Selected by [y]: - EFI_LOADER [=y

Re: [PATCH] efi_loader: disk: allow blk devices even without UCLASS_PARTITION

2022-04-28 Thread Heinrich Schuchardt
On 4/28/22 06:49, AKASHI Takahiro wrote: While GPT partition is mandated in UEFI specification, CONFIG_PARTITION is seen optional under the current implementation. So modify efi_disk_rw_blocks() to allow accepting UCLASS_BLK devices. Fixes: commit d97e98c887ed ("efi_loader: disk: use udevice ins

Re: [PATCH v5 00/12] efi_loader: more tightly integrate UEFI disks to driver model

2022-04-28 Thread Mark Kettenis
> Date: Thu, 28 Apr 2022 11:42:19 +0200 > From: Heinrich Schuchardt > > On 4/28/22 11:09, Mark Kettenis wrote: > >> We call efi_disk_init() after the MMC device is probed. Therefore > >> probing of the MCC device does not trigger EVT_DM_POST_PROBE. > >> > >> We have to move the efi_disk_init() ca

Re: [PATCH] efi_loader: Select EVENT as well

2022-04-28 Thread Jan Kiszka
On 27.04.22 07:55, AKASHI Takahiro wrote: > On Wed, Apr 27, 2022 at 07:47:15AM +0200, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Fixes >> >> WARNING: unmet direct dependencies detected for EVENT_DYNAMIC >> Depends on [n]: EVENT [=n] >> Selected by [y]: >> - EFI_LOADER [=y] && OF_LIBFDT [=y]

Re: [PATCH v5 00/12] efi_loader: more tightly integrate UEFI disks to driver model

2022-04-28 Thread Heinrich Schuchardt
On 4/28/22 11:09, Mark Kettenis wrote: We call efi_disk_init() after the MMC device is probed. Therefore probing of the MCC device does not trigger EVT_DM_POST_PROBE. We have to move the efi_disk_init() call before initr_dm(). [PATCH 1/1] efi_loader: call efi_init_early() earlier https://lists.

Re: [PATCH v5 00/12] efi_loader: more tightly integrate UEFI disks to driver model

2022-04-28 Thread Mark Kettenis
> Date: Thu, 28 Apr 2022 08:45:51 +0200 > Content-Language: en-US > From: Heinrich Schuchardt > Cc: masami.hirama...@linaro.org, u-boot@lists.denx.de, s...@chromium.org, > ilias.apalodi...@linaro.org, Tom Rini , > Mark Kettenis > Content-Type: text/plain; charset=UTF-8; format=flowed > > On 4/

Re: [PATCH 2/2] doc: imx8mn_evk: Do not export ATF_LOAD_ADDR

2022-04-28 Thread Peng Fan (OSS)
On 2022/4/19 1:15, Fabio Estevam wrote: From: Fabio Estevam The imx8mn_evk target have been converted to use binman. With the binman approach the ATF load address is described via devicetree, so remove the now unneeded instruction of exporting ATF_LOAD_ADDR. Signed-off-by: Fabio Estevam

Re: [PATCH 1/2] imx8mn_evk: Enable cache in SPL

2022-04-28 Thread Peng Fan (OSS)
On 2022/4/19 1:15, Fabio Estevam wrote: From: Fabio Estevam There is no reason for disabling I-cache and D-cache in SPL. Remove the unneeded CONFIG_SPL_SYS_ICACHE_OFF and CONFIG_SPL_SYS_DCACHE_OFF options. Signed-off-by: Fabio Estevam Reviewed-by: Peng Fan --- configs/imx8mn_evk_def

Re: [PATCH] spl_imx_romapi: Remove extraneous character

2022-04-28 Thread Peng Fan (OSS)
On 2022/4/21 22:01, Fabio Estevam wrote: From: Fabio Estevam Currently the following output is shown: ... Trying to boot from BOOTROM Find img info 0x&48020a00, size 872 ... Remove the extraneous "&" character, so that the correct output can be seen. Signed-off-by: Fabio Estevam Acked-b

[PATCH v5 17/17] doc:bootmenu: add UEFI boot and distro boot support description

2022-04-28 Thread Masahisa Kojima
The bootmenu enumerates the UEFI boot options and distro boot (boot_targets) for boot device selection. This commit adds the description how the UEFI boot and distro boot work in bootmenu. This commit also adds "Synopsis", "Description" and "Configuration" sections to follow the U-Boot command doc

[PATCH v5 15/17] efi_loader: menu-driven update of UEFI bootorder variable

2022-04-28 Thread Masahisa Kojima
This commit adds the menu-driven update of UEFI bootorder variable. Signed-off-by: Masahisa Kojima --- Changes in v5: - split into the separate patch lib/efi_loader/efi_bootmenu_maintenance.c | 102 ++ 1 file changed, 102 insertions(+) diff --git a/lib/efi_loader/efi_bootme

[PATCH v5 16/17] bootmenu: add removable media entries

2022-04-28 Thread Masahisa Kojima
UEFI specification requires booting from removal media using a architecture-specific default image name such as BOOTAA64.EFI. This commit adds the removable media entries into bootmenu, so that user can select the removable media and boot with default image. The bootmenu automatically enumerates t

[PATCH v5 13/17] efi_loader: menu-driven addition of UEFI boot option

2022-04-28 Thread Masahisa Kojima
This commit supports the menu-driven UEFI boot option addition. User can select the block device volume having efi_simple_file_system_protocol and select the file corresponding to the Boot variable. Then user enter the label of the BOOT variable in utf8. Signed-off-by: Masahisa Kojima ---

[PATCH v5 14/17] efi_loader: menu-driven deletion of UEFI boot variable

2022-04-28 Thread Masahisa Kojima
This commit adds the menu-driven deletion of UEFI boot variable. Signed-off-by: Masahisa Kojima --- Changes in v5: - split into the separate patch lib/efi_loader/efi_bootmenu_maintenance.c | 142 ++ 1 file changed, 142 insertions(+) diff --git a/lib/efi_loader/efi_bootmenu_

[PATCH v5 12/17] bootmenu: factor out the user input handling

2022-04-28 Thread Masahisa Kojima
This commit moves the user input handling from cmd/bootmenu.c to common/menu.c to reuse it from other modules. Signed-off-by: Masahisa Kojima --- No change since v4 Newly created in v4. cmd/bootmenu.c | 149 - common/menu.c | 137 +++

[PATCH v5 09/17] bootmenu: add UEFI boot entry into bootmenu

2022-04-28 Thread Masahisa Kojima
This commit adds the UEFI related menu entries into the bootmenu. User can select which UEFI "Boot" option to execute from bootmenu, then bootmenu sets the "BootNext" UEFI variable and invoke efi bootmgr. The efi bootmgr will handle the "BootNext" UEFI variable. If the "BootNext" UEFI variabl

[PATCH v5 11/17] bootmenu: add Kconfig option not to enter U-Boot console

2022-04-28 Thread Masahisa Kojima
This commit adds the Kconfig option to disable to enter the U-Boot console from bootmenu. If CMD_BOOTMENU_ENTER_UBOOT_CONSOLE is enabled, "U-Boot console" entry is appeared as the last entry in the bootmenu, then user can enter U-Boot console. If CMD_BOOTMENU_ENTER_UBOOT_CONSOLE is disabled, "Qui

[PATCH v5 10/17] bootmenu: add distro boot entry

2022-04-28 Thread Masahisa Kojima
This commit adds the distro_boot entries into the bootmenu. The bootmenu read the "boot_targets" U-Boot environment variable and enumerate it. User can select the distro boot entry, then bootmenu executes "run bootcmd_xxx" command. The bootmenu also checks the existing block devices and network op

[PATCH v5 08/17] bootmenu: update bootmenu_entry structure

2022-04-28 Thread Masahisa Kojima
This is a preparation for succeeding addition of uefi boot and distro boot menu entries into bootmenu. The bootmenu_entry title is updated to u16 string because uefi use u16 string. This commit also factors out the function to prepare the entries generated by "bootmenu_x" U-Boot environment variabl

[PATCH v5 07/17] bootmenu: flush input buffer before waiting user key input

2022-04-28 Thread Masahisa Kojima
Before waiting user key input to stop autoboot, the input buffer must be flushed. Signed-off-by: Masahisa Kojima --- Change in v5: - newly created, split into separate patch cmd/bootmenu.c | 4 1 file changed, 4 insertions(+) diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index d573487272..

[PATCH v5 06/17] efi_loader: bootmgr: add booting from removable media

2022-04-28 Thread Masahisa Kojima
From: AKASHI Takahiro Under the current implementation, booting from removable media using a architecture-specific default image name, say BOOTAA64.EFI, is supported only in distro_bootcmd script. See the commit 74522c898b35 ("efi_loader: Add distro boot script for removable media"). This is, ho

[PATCH v5 05/17] efi_loader: export efi_locate_device_handle()

2022-04-28 Thread Masahisa Kojima
From: AKASHI Takahiro This function will be used in the next commit where some behavior of EFI boot manager will be expanded. Signed-off-by: AKASHI Takahiro Reviewed-by: Ilias Apalodimas --- No changes from original version include/efi_loader.h | 4 lib/efi_loader/efi_boottime.

[PATCH v5 03/17] menu: always show the menu regardless of the number of entry

2022-04-28 Thread Masahisa Kojima
To make user aware of the menu entry selection, menu always appears regardless of the number of entry. Signed-off-by: Masahisa Kojima --- No changes since v4 Newly created in v4 common/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/menu.c b/common/menu.c inde

[PATCH v5 04/17] menu: menu_get_choice() return -ENOENT if menu item is empty

2022-04-28 Thread Masahisa Kojima
menu_get_choice() needs to handle the case that menu item is empty. In this case, menu_get_choice() returns -ENOENT. Signed-off-by: Masahisa Kojima --- Newly created in v5 common/menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/menu.c b/common/menu.c index b577d80b4f..4118c6

[PATCH v5 02/17] test: unit test for u16_strlcat()

2022-04-28 Thread Masahisa Kojima
Provide a unit test for function u16_strlcat(). Signed-off-by: Masahisa Kojima --- Changes in v5: - u16_strlcat() 3rd agument update from buffer size to maximum string count - increase buffer size for test - change u16 string for the test, the letters in the test are different each other - buf

[PATCH v5 01/17] lib/charset: add u16_strlcat() function

2022-04-28 Thread Masahisa Kojima
Provide u16 string version of strlcat(). Signed-off-by: Masahisa Kojima --- Changes in v5: - change 3rd argument from size to count, it indicates the maximum u16 string count that dest buffer can have. Other u16_strXXX functions in U-Boot use string count, not the buffer size. u16_strlcat()

[PATCH v5 00/17] enable menu-driven boot device selection

2022-04-28 Thread Masahisa Kojima
This patch series adds the menu-driven boot device selection, by extending the existing "bootmenu" to include UEFI and distro_boot related entries, and supports menu-driven UEFI boot variable maintenance. This patch series also includes the removable media support that UEFI specification requires

Re: [PATCH v4 02/11] lib/charset: add u16_strlcat() function

2022-04-28 Thread Masahisa Kojima
Hi Heinrich, On Mon, 18 Apr 2022 at 16:47, Masahisa Kojima wrote: > > On Sat, 16 Apr 2022 at 16:32, Heinrich Schuchardt wrote: > > > > On 3/24/22 14:54, Masahisa Kojima wrote: > > > Provide u16 string version of strlcat(). > > > > > > Signed-off-by: Masahisa Kojima > > > Reviewed-by: Simon Glas

Re: [PATCH v4 00/11] enable menu-driven boot device selection

2022-04-28 Thread Masahisa Kojima
Hi Heinrich, On Sat, 16 Apr 2022 at 15:46, Heinrich Schuchardt wrote: > > On 3/24/22 14:54, Masahisa Kojima wrote: > > This patch series adds the menu-driven boot device selection, > > by extending the existing "bootmenu" to include UEFI and distro_boot > > related entries, and supports menu-driv