[PATCH v18 0/3] add TCP and HTTP for downloading images

2022-10-17 Thread Ying-Chun Liu (PaulLiu)
This patch is a refresh from previous patches made by Duncan Hare . I've contacted him and continue to work on this patch. This patch introduce a TCP stack with SACK. And a simple wget command to download images from http server. v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which

[PATCH v18 1/3] net: Add TCP protocol

2022-10-17 Thread Ying-Chun Liu (PaulLiu)
Currently file transfers are done using tftp or NFS both over udp. This requires a request to be sent from client (u-boot) to the boot server. The current standard is TCP with selective acknowledgment. Signed-off-by: Duncan Hare Signed-off-by: Duncan Hare Signed-off-by: Ying-Chun Liu (PaulLiu)

[PATCH v18 3/3] doc: cmd: wget: add documentation

2022-10-17 Thread Ying-Chun Liu (PaulLiu)
Add documentation for the wget command. Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Simon Glass --- doc/usage/cmd/wget.rst | 61 ++ doc/usage/index.rst| 1 + 2 files changed, 62 insertions(+) create mode 100644 doc/usage/cmd/wget.rst diff --git a/do

[PATCH v18 2/3] net: Add wget application

2022-10-17 Thread Ying-Chun Liu (PaulLiu)
This commit adds a simple wget command that can download files from http server. The command syntax is wget ${loadaddr} Signed-off-by: Duncan Hare Signed-off-by: Ying-Chun Liu (PaulLiu) Reviewed-by: Simon Glass Cc: Christian Gmeiner Cc: Joe Hershberger Cc: Michal Simek Cc: Ramon Fried ---

[PATCH] cyclic: Don't disable cylic function upon exceeding CPU time

2022-10-17 Thread Stefan Roese
With the migration of the watchdog infrastructure to cyclic functions it's been noticed, that at least one watchdog driver is broken now. As the execution time of it's watchdog reset function is quite long. In general it's not really necessary (right now) to disable the cyclic function upon exceed

Re: [PATCH v17 1/2] net: Add TCP protocol

2022-10-17 Thread PaulLiu
Hi Simon, I think it is a bit hard for me to test it right now. It seems that we need to setup a fake HTTP server? It can be easily done by some python scripts but I'm not sure how to start. Is there some example on testing the network commands? Like tftp or nfs? Yours, Paul On Tue, Jul 12, 202

[PATCH] nvmem: u-boot-env: add Broadcom format support

2022-10-17 Thread Rafał Miłecki
From: Rafał Miłecki Broadcom uses U-Boot for a lot of their bcmbca familiy chipsets. They decided to store U-Boot environment data inside U-Boot partition and to use a custom header (with "uEnv" magic and env data length). Add support for Broadcom's specific binding and their custom format. Ref

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

2022-10-17 Thread Mattijs Korpershoek
On ven., oct. 14, 2022 at 09:55, Simon Glass wrote: > Hi Mattijs, > > On Thu, 13 Oct 2022 at 06:57, Mattijs Korpershoek > wrote: >> >> In some cases, the param variable is wrong, and in other cases we have >> undocumented arguments. >> >> Fix the docs. >> >> Signed-off-by: Mattijs Korpershoek >

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

2022-10-17 Thread Michal Suchánek
On Sat, Oct 15, 2022 at 10:27:43PM +0200, Heinrich Schuchardt wrote: > On 10/15/22 21:46, Simon Glass wrote: > > Hi Heinrich, > > > > On Sat, 15 Oct 2022 at 13:29, Heinrich Schuchardt > > wrote: > > > > > > > > > > > > Am 15. Oktober 2022 21:24:36 MESZ schrieb Simon Glass : > > > > Hi Heinric

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

2022-10-17 Thread Mattijs Korpershoek
In some cases, the param variable is wrong, and in other cases we have undocumented arguments. Fix the docs. Signed-off-by: Mattijs Korpershoek --- Changes in v2: * Don't edit blk_foreach_probe() comment as it's just returing (Simon) * Link to v1: https://lore.kernel.org/r/20221013-blk-doc-typ

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

2022-10-17 Thread Julien Masson
Hi Simon, On Mon 17 Oct 2022 at 09:49, Simon Glass wrote: > Hi Julien, > > > On Thu, 13 Oct 2022 at 09:51, Julien Masson wrote: >> >> 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 Ma

[PATCH 7/6] net: deal with fragment-overlapping-two-holes case

2022-10-17 Thread Rasmus Villemoes
With a suitable sequence of malicious packets, it's currently possible to get a hole descriptor to contain arbitrary attacker-controlled contents, and then with one more packet to use that as an arbitrary write vector. While one could possibly change the algorithm so we instead loop over all holes

Re: [PATCH 0/3] arm64: layerscape: Various small size reductions for SPL

2022-10-17 Thread Peng Fan
Hi Sean, I have applied your patchset, but met CI failure, could you please send me a fix? ./tools/buildman/buildman ls1043aqds_qspi Building current source for 1 boards (1 thread, 4 jobs per thread) aarch64: + ls1043aqds_qspi += WARNING == +This boa

Re: [u-boot][PATCH 04/14] mtd: rawnand: omap_gpmc: Optimize NAND reads

2022-10-17 Thread Roger Quadros
Hi Michael, On 17/10/2022 09:39, Michael Nazzareno Trimarchi wrote: > Hi Roger > > On Sat, Oct 15, 2022 at 3:29 PM Roger Quadros wrote: >> >> Hi Michael, >> >> On 15/10/2022 10:24, Michael Nazzareno Trimarchi wrote: >>> Hi >>> >>> On Tue, Oct 11, 2022 at 1:50 PM Roger Quadros wrote: R

[PATCH v2 0/2] splash: add more options/support

2022-10-17 Thread Julien Masson
This patch series add several options/support for splashscreen feature: - support raw image from MMC - get devpart from environment variable With these changes the user has now more options and can change default configurations through environment variables. Example: image located in splashscreen

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

2022-10-17 Thread Julien Masson
The user has now the choice to specify the splash location in the MMC as a raw storage. Signed-off-by: Julien Masson --- Changes in v2: - splash_mmc_read_raw: return -EIO in case of errors - splash_mmc_read_raw: use IS_ENABLED(CONFIG_CMD_MMC) instead of #ifdef common/splash.c| 6 +

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

2022-10-17 Thread Julien Masson
By default several types of splash locations are supported and the user can select one of them through environment var (splashsource). However the devpart is still hardcoded and we cannot change it from the environment. This patch add the support of "splashdevpart" which allow the user to set the

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

2022-10-17 Thread Andre Przywara
On 13/10/2022 14:26, Icenowy Zheng wrote: 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 Zhen

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

2022-10-17 Thread Andre Przywara
On 13/10/2022 14:26, Icenowy Zheng wrote: As the compile error when D-Cache is enabled is gone, we can have D-Cache enabled now. Signed-off-by: Icenowy Zheng Reviewed-by: Andre Przywara Thanks, Andre --- configs/licheepi_nano_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a

[PATCH 1/2] config_whitelist: remove CONFIG_KM_UPDATE_UBOOT

2022-10-17 Thread Holger Brunck
This option is already gone. Signed-off-by: Holger Brunck --- scripts/config_whitelist.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 137b7f61ac..7cf82f1a90 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_wh

[PATCH 2/2] board/km: drop CONFIG_KM_ROOTFSSIZE

2022-10-17 Thread Holger Brunck
This unused nowadays and can be dropped. Signed-off-by: Holger Brunck --- include/configs/km/km-powerpc.h | 3 --- include/configs/kmcent2.h | 3 --- scripts/config_whitelist.txt| 1 - 3 files changed, 7 deletions(-) diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km

[PATCH v2 0/5] add support for Theobroma Systems PX30-µQ7 (Ringneck) with Haikou devkit

2022-10-17 Thread Quentin Schulz
mmon.h | 3 +- include/configs/ringneck_px30.h| 15 + 15 files changed, 1237 insertions(+), 5 deletions(-) --- base-commit: 5e973853e2535cc2ccff20d6fb8f981f6863a3b2 change-id: 20221017-upstream-ringneck-57abd09a7aaa Best regards, -- Quentin Schulz

[PATCH v2 1/5] rockchip: px30: fix CONFIG_IRAM_BASE

2022-10-17 Thread Quentin Schulz
From: Quentin Schulz The IRAM on PX30 (or Int_MEM in datasheet) starts at 0xff0e and not 0xff02 as rightfully stated in the FIXME comment. Let's fix it so that BROM_BOOTSOURCE_ID_ADDR points to the correct address for PX30. Fixes: 46281a76bee3 ("rockchip: add core px30 headers") Cc: Que

[PATCH v2 2/5] rockchip: px30: list possible SPL boot devices

2022-10-17 Thread Quentin Schulz
From: Quentin Schulz BOOTROM sets a bit in a CPU register so that the software can know from where the first stage bootloader was booted. One use case for this is to specify the default loading medium for U-Boot proper to match the one used by the BOOTROM to load the SPL (same-as-spl in u-boot,sp

[PATCH v2 3/5] rockchip: px30: insert u-boot, spl-boot-device into U-Boot device tree

2022-10-17 Thread Quentin Schulz
From: Quentin Schulz It is possible to boot U-Boot proper from a different storage medium than the one used by the BOOTROM to load the SPL. This information is stored in the u-boot,spl-boot-device Device Tree property and is accessible from U-Boot proper so that it has knowledge at runtime where

[PATCH v2 4/5] arm64: dts: rockchip: sync px30 with linux-next

2022-10-17 Thread Quentin Schulz
From: Quentin Schulz Sync the px30 dtsi from linux-next tree, commit 483fed3b5dc8c ("Add linux-next specific files for 20220921"). Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- arch/arm/dts/px30.dtsi | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) d

[PATCH v2 5/5] rockchip: add support for PX30 Ringneck SoM on Haikou Devkit

2022-10-17 Thread Quentin Schulz
From: Quentin Schulz The PX30-µQ7 (Ringneck) is a system-on-module featuring the Rockchip PX30 in a micro Qseven-compatible form-factor. PX30-µQ7 features: * CPU: quad-core Cortex-A35 * DRAM: 2GB dual-channel * eMMC: onboard eMMC * SD/MMC * TI DP83825I 10/

[PATCH v2] binman: Add support for symlinking images

2022-10-17 Thread Neha Malcom Francis
Adding support to symlink an image packaged using binman. Signed-off-by: Neha Malcom Francis --- Changes in v2: - added testing for symlink support - moved from tools.Run('ln',...) to os.symlink() tools/binman/binman.rst | 3 +++ tools/binman/ftest.py |

[PATCH 0/2] Manage PCS/PMA PHY if pressent

2022-10-17 Thread Andy Chiu
If both PCS/PMA PHY and an external PHY are pressent on the Ethernet, then the real link status should point to the external facing PHY. At the same time, we must ensure the link status of the PCS/PMA PHY is good before transmitting packets. Andy Chiu (2): net:xilinx_axi: add PCS/PMA PHY net:x

[PATCH 1/2] net:xilinx_axi: add PCS/PMA PHY

2022-10-17 Thread Andy Chiu
If we bridge an external PHY to Xilinx's PCS/PMA PHY and would like to get and set the real status of the PHY facing the external world. Then we should phy_connect() to the external PHY instead of the PCS/PMA one. Thus, we add a pcs-phy DT entry, which have been merged in Linux, and leave the confi

[PATCH 2/2] net:xilinx_axi: check PCS/PMA PHY status in setup_phy

2022-10-17 Thread Andy Chiu
Both PCS/PMA PHY and the external PHY need to have a valid link status in order to have Ethernet traffic. Check and wait this status at setup_phy() so that we could diagnose if there is a PHY issue. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu --- drivers/net/xilinx_axi_emac.c | 43 ++

[PATCH] ARM: dts: at91: sama7g5: fix signal name of pin PB2

2022-10-17 Thread Mihai Sain
The signal name of pin PB2 with function F is FLEXCOM11_IO1 as it is defined in the datasheet. Fixes: 558378a4cd ("ARM: mach-at91: add support for new SoC sama7g5") Signed-off-by: Mihai Sain --- arch/arm/dts/sama7g5-pinfunc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ar

[PATCH] xilinx: common: Remove zynq_board_read_rom_ethaddr()

2022-10-17 Thread Venkatesh Yadav Abbarapu
Removing the zynq_board_read_rom_ethaddr() function as xlnx,eeprom is not used anymore. As all board dts to use nvmem alias instead of xlnx,eeprom. Signed-off-by: Venkatesh Yadav Abbarapu --- arch/arm/mach-zynq/include/mach/sys_proto.h | 2 -- arch/arm/mach-zynqmp/include/mach/sys_proto.h |

Re: [PATCH v2] spl: fit: Report fdt error for loading u-boot

2022-10-17 Thread Su, Bao Cheng
Hi Simon, On Sat, 2022-07-30 at 19:27 -0600, Simon Glass wrote: > Hi Bao Cheng, > > On Sat, 30 Jul 2022 at 03:05, Su, Bao Cheng wrote: > > > > Commit 71551055cbdb ("spl: fit: Load devicetree when a Linux payload is > > found") made a change to not report the spl_fit_append_fdt error at all > >

Re: [PATCH v2 3/3] arm: dts: rockchip: rk3288: partial sync from Linux

2022-10-17 Thread Kever Yang
On 2022/9/28 22:24, Johan Jonker wrote: Partial sync of rk3288.dtsi from Linux version 5.18 Changed: only properties and functions that are not yet included swap some clocks positions fix some irq numbers style and sort nodes Signed-off-by: Johan Jonker Reviewed-by: Kever Yang

Re: [PATCH] rkspi: only enable padding quirk on SoCs which need it

2022-10-17 Thread Kever Yang
Hi Lorenz,     This is no need because: - a type rkspi is need because the format is different requirement for the image format; - when then issue fixed in new SoC, then the image format is the same as rksd, so you can   use rksd for all the image in new SoCs. Thanks, - Kever On 2022/9

Re: [PATCH v2 07/12] rockchip: puma-rk3399: load environment from same medium as one used to load U-Boot proper

2022-10-17 Thread Kever Yang
On 2022/9/15 17:14, Quentin Schulz wrote: From: Quentin Schulz Chances are when one boots U-Boot proper from a given storage medium, they want the same medium to be used to load and store the environment. This basically allows to have completely separate U-Boot (TPL/SPL/U-Boot proper/environ

Re: [PATCH 7/7] rockchip: add support for PX30 Ringneck SoM on Haikou Devkit

2022-10-17 Thread Kever Yang
Hi Quentin, On 2022/9/26 17:50, Quentin Schulz wrote: Hi Kever, On 9/24/22 10:02, Kever Yang wrote: Hi Quentin, Does the dts already available on mainline kernel? If yes, please provide the commit number. It is sent upstream. From cover-letter: https://lore.kernel.org/lkml/202209221

Re: [PATCH] arm: dts: rockchip: rk3399: nanopi-r4s: Provide smbios sysinfo

2022-10-17 Thread Kever Yang
On 2022/9/29 08:15, Christian Kohlschütter wrote: Provide human-readable manufacturer and product names for the FriendlyELEC NanoPi R4S. Enable CONFIG_SYSINFO and CONFIG_SYSINFO_SMBIOS by default. Signed-off-by: Christian Kohlschütter Reviewed-by: Kever Yang Thanks, - Kever --- arch/ar

Re: [PATCH] arm: dts: rockchip: rk356x: sync with Linux 6.0

2022-10-17 Thread Kever Yang
On 2022/10/4 09:30, FUKAUMI Naoki wrote: prepare for rk3566 based board Signed-off-by: FUKAUMI Naoki Reviewed-by: Kever Yang Thanks, - Kever --- arch/arm/dts/rk3566.dtsi | 35 + arch/arm/dts/rk3568-evb-u-boot.dtsi |2 +- arch/arm/dts/rk3568-pinc

Re: [PATCH] arm: dts: rockchip: rk3399: nanopi-r4s: Provide smbios sysinfo

2022-10-17 Thread Kever Yang
Hi Christian, I got below error when try to apply: Applying: arm: dts: rockchip: rk3399: nanopi-r4s: Provide smbios sysinfo error: sha1 information is lacking or useless (configs/nanopi-r4s-rk3399_defconfig). error: could not build fake ancestor hint: Use 'git am --show-current-patch' to see t

Re: [PATCH v2 00/28] ARM: Add Rockchip RV1126 support

2022-10-17 Thread Kever Yang
Hi Jagan,     Could you resend this patch set? There are some merge conflict when I try to apply.     For dts related patch, please add the commit number available on mainline kernel, or else I will  merge other patches except dts. Thanks, - Kever On 2022/8/18 22:52, Jagan Teki wrote:

Re: [PATCH v2 00/28] ARM: Add Rockchip RV1126 support

2022-10-17 Thread Jagan Teki
Hi Kever, On Mon, 17 Oct 2022 at 18:59, Kever Yang wrote: > > Hi Jagan, > > Could you resend this patch set? There are some merge conflict when > I try to apply. > > For dts related patch, please add the commit number available on > mainline kernel, > > or else I will merge other patch

Re: [PATCH v5 09/10] arm_ffa: introduce FF-A MM communication

2022-10-17 Thread Abdellatif El Khlifi
On Fri, Oct 14, 2022 at 09:55:59AM -0600, Simon Glass wrote: > Hi, > > On Fri, 14 Oct 2022 at 04:38, Abdellatif El Khlifi > wrote: > > > > On Thu, Sep 29, 2022 at 12:32:42PM +0300, Ilias Apalodimas wrote: > > > Hi Abdellatif, > > > > > > > --- a/arch/arm/cpu/armv8/cache.S > > > > +++ b/arch/arm/c

Re: [PATCH 7/7] rockchip: add support for PX30 Ringneck SoM on Haikou Devkit

2022-10-17 Thread Quentin Schulz
Hi Kever, On 10/17/22 15:17, Kever Yang wrote: Hi Quentin, On 2022/9/26 17:50, Quentin Schulz wrote: Hi Kever, On 9/24/22 10:02, Kever Yang wrote: Hi Quentin, Does the dts already available on mainline kernel? If yes, please provide the commit number. It is sent upstream. From cov

[PATCH] CI: Update to jammy-20221003-17Oct2022 tag

2022-10-17 Thread Tom Rini
This includes python3-pyelftools so we can drop it from one of the tests directly. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index f200b40dbb24.

[PATCH v2 0/3] arm64: layerscape: Various small size reductions for SPL

2022-10-17 Thread Sean Anderson
This series groups a few small size reductions I found while trying to reduce my SPL size. They are all independent of each other. Changes in v2: - Fix using || instead of && for ARCH_LS1043 Sean Anderson (3): arm: layerscape: Don't select FSL_IFC when booting from SD card arm: layerscape: Di

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

2022-10-17 Thread Sean Anderson
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 --- Changes in v2: - Fix using || instead of && for ARCH_LS1043 arch

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

2022-10-17 Thread Sean Anderson
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 --- (no changes since v1) arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../include/asm/arch-fsl-layerscape/fs

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

2022-10-17 Thread Sean Anderson
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 --- (no changes since v1) include/fsl_csu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fsl_

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

2022-10-17 Thread Tom Rini
On Thu, Oct 13, 2022 at 06:25:57AM -0600, 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 > Reviewed-by: Heinrich Schuchardt Applied to u-boot/master, thanks! -- Tom signat

Re: [PATCH] CI: Update to jammy-20221003-17Oct2022 tag

2022-10-17 Thread Tom Rini
On Mon, Oct 17, 2022 at 11:16:59AM -0400, Tom Rini wrote: > This includes python3-pyelftools so we can drop it from one of the tests > directly. > > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

[PATCH v2] arm: dts: rockchip: rk3399: nanopi-r4s: Provide smbios sysinfo

2022-10-17 Thread Christian Kohlschütter
Provide human-readable manufacturer and product names for the FriendlyELEC NanoPi R4S. Enable CONFIG_SYSINFO and CONFIG_SYSINFO_SMBIOS by default. Signed-off-by: Christian Kohlschütter --- arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi | 22 ++ configs/nanopi-r4s-rk3399_defconfi

Re: [PATCH 1/1] board: gateworks: gw_ventana: fix building with GCC 12.2

2022-10-17 Thread Tim Harvey
On Wed, Oct 12, 2022 at 9:59 AM Heinrich Schuchardt wrote: > > Building with GCC 12.2 results in an error > > board/gateworks/gw_ventana/gw_ventana.c:636:68: error: the comparison > will always evaluate as 'true' for the address of 'pwm_padmux' will > never be NULL [-Werror=address] >

Re: [PATCH 1/1] board: gateworks: gw_ventana: fix building with GCC 12.2

2022-10-17 Thread Fabio Estevam
On Wed, Oct 12, 2022 at 1:59 PM Heinrich Schuchardt wrote: > > Building with GCC 12.2 results in an error > > board/gateworks/gw_ventana/gw_ventana.c:636:68: error: the comparison > will always evaluate as 'true' for the address of 'pwm_padmux' will > never be NULL [-Werror=address] >

[PATCH 00/24] bootstd: Add a boot menu

2022-10-17 Thread Simon Glass
So far standard boot lacks a boot menu, although it is possible to create a rudimentary one using the existing 'bootmenu' command. Even then, this text-based menu offer only basic functionality and does not take full advantage of the displays which are common on many devices. This series provides

[PATCH 01/24] sandbox: Enable mmc command and legacy images

2022-10-17 Thread Simon Glass
The mmc command is useful for testing mmc disk images in sandbox, so enable it. We also need to enable legacy images so that we can run tests which use them. Disable it for a few avb tests since MMC is not implemented there yet. Signed-off-by: Simon Glass --- configs/sandbox_defconfig

[PATCH 03/24] bootmenu: Add a few comments

2022-10-17 Thread Simon Glass
The behaviour of these two functions is completely undocumented. Add some notes so the poor, suffering dev can figure out what is going on. Signed-off-by: Simon Glass --- include/menu.h | 42 ++ 1 file changed, 42 insertions(+) diff --git a/include/menu.

[PATCH 02/24] cli: Move readline character-processing to a state machine

2022-10-17 Thread Simon Glass
The current cread_line() function is very long. It handles the escape processing inline. The menu command does similar processing but at the character level, so there is some duplication. Split the character processing into a new function cli_ch_process() which processes individual characters and

[PATCH 04/24] menu: Rename KEY_... to BKEY_...

2022-10-17 Thread Simon Glass
This enum values conflict with linux/input.h so rename them. Signed-off-by: Simon Glass --- cmd/bootmenu.c | 10 +- cmd/eficonfig.c | 26 +- common/menu.c | 34 +- include/menu.h | 32 4 files c

[PATCH 05/24] menu: Update bootmenu_autoboot_loop() to return the code

2022-10-17 Thread Simon Glass
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass --- cmd/bootmenu.c | 2 +- common/menu.c | 16 +--- include/menu.h | 7 +++ 3 files changed, 13 inse

[PATCH 07/24] menu: Use a switch statement

2022-10-17 Thread Simon Glass
Convert the long line of if() statements to a switch() since this makes better use of the C language. Signed-off-by: Simon Glass --- common/menu.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/common/menu.c b/common/menu.c index 22947f5d69

[PATCH 09/24] image: Add a function to find a script in an image

2022-10-17 Thread Simon Glass
Split this functionality out of the 'source' command so it can be used from another place. Signed-off-by: Simon Glass --- cmd/source.c| 173 ++-- include/image.h | 13 2 files changed, 107 insertions(+), 79 deletions(-) diff --git a/cmd/sou

[PATCH 10/24] video: Enable VIDEO_ANSI by default only with EFI

2022-10-17 Thread Simon Glass
This is not generally needed unless EFI_LOADER is used. Adjust the default setting to reduce the size of the U-Boot build. Signed-off-by: Simon Glass --- drivers/video/Kconfig | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfi

[PATCH 15/24] bootstd: Allow reading a logo for the OS

2022-10-17 Thread Simon Glass
Some operating systems provide a logo in bmp format. Read this in if present so it can be displayed in the menu. Signed-off-by: Simon Glass --- boot/bootmeth-uclass.c | 69 -- boot/bootmeth_script.c | 4 +++ cmd/bootflow.c | 6 include/boot

[PATCH 14/24] bootstd: Read the Operating System name for distro/scripts

2022-10-17 Thread Simon Glass
Add the concept of an OS name to the bootflow. This typically includes the OS name, version and kernel version. Implement this for the distro and script bootmeths so that it works with Armbian and older version of Fedora. Signed-off-by: Simon Glass --- boot/bootflow.c| 1 + boot/bootm

[PATCH 16/24] menu: Factor out menu-keypress decoding

2022-10-17 Thread Simon Glass
Move this code into a separate function so that it can be used in the new VBE menu. Signed-off-by: Simon Glass --- common/menu.c | 48 ++-- include/menu.h | 10 ++ 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/common/menu.c

[PATCH 21/24] bootstd: Support creating a boot menu

2022-10-17 Thread Simon Glass
Create an expo to handle the boot menu. For now this is quite simple, with just a header, some menu items and a pointer to show the current one. Signed-off-by: Simon Glass --- boot/Makefile| 1 + boot/bootflow_internal.h | 37 ++ boot/bootflow_menu.c | 238 +++

[PATCH 17/24] expo: Add basic implementation

2022-10-17 Thread Simon Glass
An expo is a way of presenting and collecting information from the user. It consists of a collection of 'scenes' of which only one is presented at a time. An expo is typically used to show a boot menu and allow settings to be changed. One created, the same expo can be automatically presented in gr

[PATCH 22/24] bootstd: Add a test for the bootstd menu

2022-10-17 Thread Simon Glass
Add a test which checks that two operating systems can be displayed in a menu, allowing one to be selected. Enable a few things on snow so that the unit tests build. Signed-off-by: Simon Glass --- arch/sandbox/dts/test.dts| 11 ++ configs/snow_defconfig | 4 + test

[PATCH 12/24] video: Fix unchnaged typo

2022-10-17 Thread Simon Glass
Fix this typo in the header file. Signed-off-by: Simon Glass --- include/video.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/video.h b/include/video.h index 529f9685183..7dee94cc265 100644 --- a/include/video.h +++ b/include/video.h @@ -248,7 +248,7 @@ void video

[PATCH 24/24] expo: Add documentation

2022-10-17 Thread Simon Glass
Add some documentation for the expo feature. Signed-off-by: Simon Glass --- doc/develop/expo.rst | 184 ++ doc/develop/index.rst | 1 + 2 files changed, 185 insertions(+) create mode 100644 doc/develop/expo.rst diff --git a/doc/develop/expo.rst b/doc

[PATCH 19/24] expo: Add support for scene menus

2022-10-17 Thread Simon Glass
A menu is a key part of the expo design. It consists of a number of items which the user can select from. Add the initial implementation of this. Signed-off-by: Simon Glass --- boot/Makefile | 2 + boot/scene_menu.c | 372 ++ 2 files changed, 3

[PATCH 18/24] expo: Add support for scenes

2022-10-17 Thread Simon Glass
A scene is a single screen within an expo. It is possible to move between scenes but only one can be displayed at once. Add a basic implementation. Signed-off-by: Simon Glass --- boot/scene.c | 385 ++ boot/scene_internal.h | 123 ++

[PATCH 20/24] expo: Add basic tests

2022-10-17 Thread Simon Glass
Add some tests for the expo, including setting up and rendering an expo. Signed-off-by: Simon Glass --- test/boot/Makefile | 2 + test/boot/expo.c | 510 + 2 files changed, 512 insertions(+) create mode 100644 test/boot/expo.c diff --git a/test/

[PATCH 23/24] bootstd: Support setting a theme for the menu

2022-10-17 Thread Simon Glass
Allow a theme to be set. For now this is very simple, just a default font size to use for all elements. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 43 ++ boot/bootstd-uclass.c | 2 ++ include/bootflow.h| 10 ++ include/bootstd.h | 4 +++ test/boot/b

[PATCH 06/24] menu: Update bootmenu_loop() to return the code

2022-10-17 Thread Simon Glass
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass --- cmd/bootmenu.c | 2 +- cmd/eficonfig.c | 4 ++-- common/menu.c | 30 -- include/me

Re: [PATCH 00/24] bootstd: Add a boot menu

2022-10-17 Thread Heinrich Schuchardt
On 10/17/22 22:29, Simon Glass wrote: So far standard boot lacks a boot menu, although it is possible to create a rudimentary one using the existing 'bootmenu' command. Even then, this text-based menu offer only basic functionality and does not take full advantage of the displays which are commo

Re: [PATCH 1/1] sandbox: typo Fictionnal

2022-10-17 Thread Simon Glass
On Sun, 16 Oct 2022 at 14:17, Heinrich Schuchardt wrote: > > %s/Fictionnal/Fictional/ > > Signed-off-by: Heinrich Schuchardt > --- > board/sandbox/sandbox.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Simon Glass

Re: [PATCH 00/24] bootstd: Add a boot menu

2022-10-17 Thread Simon Glass
Hi Heinrich, On Mon, 17 Oct 2022 at 15:11, Heinrich Schuchardt wrote: > > On 10/17/22 22:29, Simon Glass wrote: > > So far standard boot lacks a boot menu, although it is possible to create > > a rudimentary one using the existing 'bootmenu' command. > > > > Even then, this text-based menu offer

Re: [PATCH v6 17/20] dm: core: Switch uclass_*_device_err to use uclass_*_device_check

2022-10-17 Thread Simon Glass
The _err variant iterators use the simple iterators without suffix as basis. However, there is no user that uclass_next_device_err for iteration, many users of uclass_first_device_err use it to get the first and (assumed) only device of an uclass, and a couple that use uclass_next_device_err to ge

Re: [PATCH v6 15/20] mpc83xx: gazerbeam: Update sysinfo_get error handling

2022-10-17 Thread Simon Glass
On Wed, 12 Oct 2022 at 14:01, Michal Suchanek wrote: > > In a later patch sysinfo_get will be changed to return the device in cae > of an error. Set sysinfo to NULL on error to preserve previous behavior. > > Signed-off-by: Michal Suchanek > --- > board/gdsys/mpc8308/gazerbeam.c | 12 +--

Re: [PATCH v6 13/20] net: eth-uclass: Do not set device on error

2022-10-17 Thread Simon Glass
eth_get_dev relies on the broken behavior that returns an error but not the device on which the error happened which gives the caller no reasonable way to report or handle the error. In a later patch uclass_first_device_err will be changed to return the device on error but eth_get_dev stores the r

Re: [PATCH v6 12/20] dm: blk: Do not use uclass_next_device_err

2022-10-17 Thread Simon Glass
blk_first_device_err/blk_next_device_err uses uclass_first_device_err/uclass_next_device_err for device iteration. Although the function names superficially match the return value from uclass_first_device_err/uclass_next_device_err is never used meaningfully, and uclass_first_device/uclass_next_de

Re: [PATCH v6 11/20] dm: treewide: Use uclass_next_device_err when accessing second device

2022-10-17 Thread Simon Glass
There are a couple users of uclass_next_device return value that get the first device by other means and use uclass_next_device assuming the following device in the uclass is related to the first one. Use uclass_next_device_err because the return value from uclass_next_device will be removed in a

Re: [PATCH v6 10/20] dm: treewide: Use uclass_first_device_err when accessing one device

2022-10-17 Thread Simon Glass
There is a number of users that use uclass_first_device to access the first and (assumed) only device in uclass. Some check the return value of uclass_first_device and also that a device was returned which is exactly what uclass_first_device_err does. Some are not checking that a device was retur

Re: [PATCH v6 09/20] cmd: List all uclass devices regardless of probe error

2022-10-17 Thread Simon Glass
There are a few commands that iterate uclass with uclass_first_device/uclass_next_device or the _err variant. Use the _check class iterator variant to get devices that fail to probe as well, and print the status. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- v6: Drop errno_str ---

Re: [PATCH v6 08/20] w1: Fix bus counting in w1_get_bus

2022-10-17 Thread Simon Glass
Use uclass_first_device_check/uclass_next_device_check to correctly count buses that fail to probe. Fixes: d3e19cf919 ("w1: Add 1-Wire uclass") Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- drivers/w1/w1-uclass.c | 20 +++- 1 file changed, 11 insertions(+), 9 delet

Re: [PATCH v6 07/20] video: ipuv3: Fix error handling when getting the display

2022-10-17 Thread Simon Glass
The code checks that uclass_first_device returned a device but the returned value that is assigned is never used. Use uclass_first_device_err instead, and move the error return outside of the if block. Fixes: f4ec1ae08e ("mxc_ipuv3_fb.c: call display_enable") Signed-off-by: Michal Suchanek Review

Re: [PATCH v6 05/20] usb: ether: Fix error handling in usb_ether_init

2022-10-17 Thread Simon Glass
The code checks the return value from uclass_first_device as well as that the device exists but it passes on the return value which may be zero if there are no gadget devices. Just check that a device was returned and return -ENODEV otherwise. Also remove the dev variable which is not really used

Re: [PATCH v6 04/20] bootstd: Fix listing boot devices

2022-10-17 Thread Simon Glass
bootdev_list() uses uclass_*_device_err() to iterate devices. However, the only value _err adds is returning an error when the device pointer is null, and that's checked anyway. Also there is some intent to report errors, and that's what uclass_*_device_check() is for, use it. Signed-off-by: Mich

Re: [PATCH v6 06/20] stdio: Fix class iteration in stdio_add_devices()

2022-10-17 Thread Simon Glass
There is a complaint in the code that iterates keyboards that we don't have the _check variant of class iterator but we in fact do, use it. In the code that iterates video devices there is an attempt to print errors but the simple iterator does not return a device when there is an error. Use the _

Re: [PATCH v6 01/20] dm: core: Fix uclass_probe_all to really probe all devices

2022-10-17 Thread Simon Glass
On Wed, 12 Oct 2022 at 13:58, Michal Suchanek wrote: > > uclass_probe_all uses uclass_first_device/uclass_next_device assigning > the return value. > > The interface for getting meaningful error is > uclass_first_device_check/uclass_next_device_check, use it. > > Also do not stop iteration when an

Re: [PATCH v6 02/20] dm: treewide: Do not opencode uclass_probe_all()

2022-10-17 Thread Simon Glass
We already have a function for probing all devices of a specific class, use it. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- drivers/cpu/cpu-uclass.c | 20 drivers/virtio/virtio-uclass.c | 15 +-- test/dm/core.c | 17 +++-

Re: [PATCH v6 16/20] dm: core: Switch uclass_foreach_dev_probe to use simple iterator

2022-10-17 Thread Simon Glass
On Wed, 12 Oct 2022 at 13:58, Michal Suchanek wrote: > > The return value is not used for anythig, and in a later patch the > behavior of the _err iterator will change in an incompatible way. > > Signed-off-by: Michal Suchanek > --- > v6: - split off as separate patch > --- > include/dm/uclass.h

Re: [PATCH v2 14/14] vbe: Add a test for VBE device tree fixups

2022-10-17 Thread Simon Glass
When a FIT includes some OS requests, U-Boot should process these and add the requested info to corresponding subnodes of the /chosen node. Add a pytest for this, which sets up the FIT, runs bootm and then uses a C unit test to check that everything looks OK. The test needs to run on sandbox_flatt

Re: [PATCH v2 11/14] test: Move common FIT code into a separate fit_util file

2022-10-17 Thread Simon Glass
To avoid duplicating code, create a new fit_util module which provides various utility functions for FIT. Move this code out from the existing test_fit.py and refactor it with addition parameters. Fix up pylint warnings in the conversion. This involves no functional change. Signed-off-by: Simon

Re: [PATCH v2 12/14] vbe: Add fixups for a basic set of OS requests

2022-10-17 Thread Simon Glass
As a starting point, add support for providing random data, if requested by the OS. Also add ASLR, as a placeholder for now. Signed-off-by: Simon Glass --- (no changes since v1) boot/Makefile| 2 +- boot/vbe_fixup.c | 233 +++ t

Re: [PATCH v6 03/20] dm: pci: Fix device PCI iteration

2022-10-17 Thread Simon Glass
When there is no PCI bus uclass_first_device will return no bus and no error which will result in pci_find_first_device calling skip_to_next_device with no bus, and the bus is only checked at the end of the while cycle, not the beginning. Fixes: 76c3fbcd3d ("dm: pci: Add a way to iterate through a

Re: [PATCH v2 13/14] dm: core: Update docs about oftree_from_fdt()

2022-10-17 Thread Simon Glass
Update this function's comment and also the livetree documentation, so it is clear when to use the function. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to update docs about oftree_from_fdt() doc/develop/driver-model/livetree.rst | 2 +- include/dm/ofnode.h

  1   2   >