[PATCH 1/2] board: rockchip: Add minimal generic RK3328 board

2025-02-03 Thread Jonas Karlman
Add a minimal generic RK3328 board that only have eMMC, SDMMC, SPI flash and USB OTG enabled. This defconfig can be used to boot from eMMC, SD-card or SPI flash on most RK3328 boards that follow reference board design. Signed-off-by: Jonas Karlman --- arch/arm/dts/rk3328-generic-u-boot.dtsi | 39

[PATCH 2/2] board: rockchip: Add minimal generic RK3399 board

2025-02-03 Thread Jonas Karlman
Add a minimal generic RK3399 board that only have eMMC, SDMMC, SPI flash and USB OTG enabled. This defconfig can be used to boot from eMMC, SD-card or SPI flash on most RK3399 boards that follow reference board design. Signed-off-by: Jonas Karlman --- arch/arm/dts/rk3399-generic-u-boot.dtsi | 10

[PATCH 0/2] rockchip: Add minimal generic RK3328 and RK3399 boards

2025-02-03 Thread Jonas Karlman
This series adds minimal generic board targets for RK3328 and RK3399, like existing minimal generic boards for RK3566/RK3568, RK3588S/RK3588, pending RK3528 [1] and upcoming RK3576 targets. These generic boards can be used to boot into U-Boot and/or Linux on most boards that follow reference board

Re: [PATCH] zynqmp: Save "bootseq" environment variable in dec format

2025-02-03 Thread Michal Simek
On 2/4/25 02:15, Szőke Benjamin wrote: 2025. 02. 04. 1:38 keltezéssel, Simon Glass írta: Hi Benjamin, On Mon, 3 Feb 2025 at 09:33, wrote: From: Benjamin Szőke Save "bootseq" environment variable in decimal format. Signed-off-by: Benjamin Szőke ---   board/xilinx/zynqmp/zynqmp.c | 2 +-

Re: [PATCH 00/19] vbe: Series part G

2025-02-03 Thread Tom Rini
On Sun, Jan 26, 2025 at 11:43:10AM -0700, Simon Glass wrote: > This includes the VBE ABrec (A/B/recovery) implementation as well as a > number of patches needed to make it work: > > - marking some code as used by SPL_RELOC > - selection of images from a FIT based on the boot phase > - removal of

Re: [PATCH] cmd: ufetch: use 3-bit colour ANSI codes

2025-02-03 Thread Alexey Minnekhanov
t;\033[0m" static const char * const logo_lines[] = { --- base-commit: 2b1c8d3b2da46ce0f7108f279f04bc66f1d8d09a change-id: 20250203-ufetch-vidconsole-colours-0e6a9ebe2475 Best regards, I can see colors on my framebuffer now, thanks! Tested-by: Alexey Minnekhanov

Re: [PATCH RFC v2 2/8] arm: dts: k3-j784s4-binman.dtsi: Clean up and templatize boot binaries

2025-02-03 Thread Manorit Chawdhry
Hi Andrew, On 14:44-20250203, Andrew Davis wrote: > On 1/6/25 3:34 AM, Manorit Chawdhry wrote: > > From: Neha Malcom Francis > > > > Clean up templatized boot binaries for j784s4 soc. This includes > > modifying the k3-j784s4-binman.dtsi to use SPL_BOARD_DTB

Re: [PATCH 31/32] efi: arm: Simplify the crt0 file and update link script

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 05:38:16PM -0700, Simon Glass wrote: > Hi Tom, > > On Mon, 3 Feb 2025 at 13:10, Tom Rini wrote: > > > > On Mon, Feb 03, 2025 at 10:42:24AM -0700, Simon Glass wrote: > > > We don't need to manually add the PE header, since binutils has support > > > for this now. Remove it

Re: [PATCH 15/32] efi: lmb: Avoid access to _start

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 05:38:44PM -0700, Simon Glass wrote: > Hi Tom, > > On Mon, 3 Feb 2025 at 13:09, Tom Rini wrote: > > > > On Mon, Feb 03, 2025 at 10:42:08AM -0700, Simon Glass wrote: > > > > > The app does not have this symbol. Also the memory where the app is > > > loaded is not under U-Bo

Re: [PATCH 11/32] efi: x86: Rework VENDOR_EFI option to permit other archs

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 05:38:27PM -0700, Simon Glass wrote: > Hi Tom, > > On Mon, 3 Feb 2025 at 13:08, Tom Rini wrote: > > > > On Mon, Feb 03, 2025 at 10:42:04AM -0700, Simon Glass wrote: > > > > > At present only x86 supports the EFI app and (apart from Qualcomm) the > > > payload. In preparati

Re: [PATCH 21/32] efi: arm: Drop exception code when running as an EFI app

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 05:38:52PM -0700, Simon Glass wrote: > Hi Tom, > > On Mon, 3 Feb 2025 at 13:09, Tom Rini wrote: > > > > On Mon, Feb 03, 2025 at 10:42:14AM -0700, Simon Glass wrote: > > > > > This code cannot be used since EFI is in charge of managing exceptions. > > > Drop it. > > > > > >

Re: [PATCH] zynqmp: Save "bootseq" environment variable in dec format

2025-02-03 Thread Szőke Benjamin
2025. 02. 04. 1:38 keltezéssel, Simon Glass írta: Hi Benjamin, On Mon, 3 Feb 2025 at 09:33, wrote: From: Benjamin Szőke Save "bootseq" environment variable in decimal format. Signed-off-by: Benjamin Szőke --- board/xilinx/zynqmp/zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH 21/32] efi: arm: Drop exception code when running as an EFI app

2025-02-03 Thread Simon Glass
Hi Tom, On Mon, 3 Feb 2025 at 13:09, Tom Rini wrote: > > On Mon, Feb 03, 2025 at 10:42:14AM -0700, Simon Glass wrote: > > > This code cannot be used since EFI is in charge of managing exceptions. > > Drop it. > > > > Signed-off-by: Simon Glass > > --- > > > > arch/arm/cpu/armv8/Makefile | 2 +-

Re: [PATCH] zynqmp: Save "bootseq" environment variable in dec format

2025-02-03 Thread Simon Glass
Hi Benjamin, On Mon, 3 Feb 2025 at 09:33, wrote: > > From: Benjamin Szőke > > Save "bootseq" environment variable in decimal format. > > Signed-off-by: Benjamin Szőke > --- > board/xilinx/zynqmp/zynqmp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/board/xilinx/zynq

Re: [PATCH 15/32] efi: lmb: Avoid access to _start

2025-02-03 Thread Simon Glass
Hi Tom, On Mon, 3 Feb 2025 at 13:09, Tom Rini wrote: > > On Mon, Feb 03, 2025 at 10:42:08AM -0700, Simon Glass wrote: > > > The app does not have this symbol. Also the memory where the app is > > loaded is not under U-Boot's control. Disable this reservation for > > the EFI app. > > > > Signed-of

Re: [PATCH 11/32] efi: x86: Rework VENDOR_EFI option to permit other archs

2025-02-03 Thread Simon Glass
Hi Tom, On Mon, 3 Feb 2025 at 13:08, Tom Rini wrote: > > On Mon, Feb 03, 2025 at 10:42:04AM -0700, Simon Glass wrote: > > > At present only x86 supports the EFI app and (apart from Qualcomm) the > > payload. In preparation for supporting ARM more generally, rename the > > existing VENDOR_EFI opti

Re: [PATCH 31/32] efi: arm: Simplify the crt0 file and update link script

2025-02-03 Thread Simon Glass
Hi Tom, On Mon, 3 Feb 2025 at 13:10, Tom Rini wrote: > > On Mon, Feb 03, 2025 at 10:42:24AM -0700, Simon Glass wrote: > > We don't need to manually add the PE header, since binutils has support > > for this now. Remove it to simplify the file. > > > > Set the link-target to efi-app-aarch64 so tha

Re: [PATCH v2 3/4] bloblist: add support for CONFIG_BLOBLIST_PASSAGE

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 12:28:25PM +, Harrison Mutai wrote: > On 31/01/2025 00:10, Tom Rini wrote: > > On Mon, Jan 27, 2025 at 12:42:30PM +, Harrison Mutai wrote: > > > Hi Tom, > > > > > > Thanks for the additional details, that helped! > > > > > > On 23/01/2025 17:12, Tom Rini wrote: > >

[PATCH v2 3/3] mbedtls: refactor mbedtls build for XPL

2025-02-03 Thread Raymond Mao
Refactor the entire kconfig page for mbedtls, adapt mbedtls makefile and default config file using 'XPL_', in order to have independent mbedtls kconfig options in U-Boot Proper, SPL, TPL and VPL. User can choose legacy or mbedtls libraries for them independently. Set mbedtls native hashing librari

[PATCH v2 2/3] mbedtls: access mbedtls private members in mscode and pkcs7 parser

2025-02-03 Thread Raymond Mao
U-Boot requires to access x509_internal.h, mbedtls_sha256_context and mbedtls_sha1_context in the porting layer, and this requires to enable MBEDTLS_ALLOW_PRIVATE_ACCESS. Enable it to mscode and pkcs7_parser to fix a mbedtls internal building error when X509 is selected. Moreover, Move it to a se

[PATCH v2 1/3] mbedtls: fix incorrect kconfig dependencies on mbedtls

2025-02-03 Thread Raymond Mao
Fixed the building failures when WGET_HTTPS,NET_LWIP and MBEDTLS_LIB are selected due to a few incorrect kconfig dependencies. Signed-off-by: Raymond Mao --- Changes in v2: - Remove the renaming to patch 3/3 and update the commit message accordingly. cmd/Kconfig | 1 - lib/mbedtls/Kconf

[PATCH 2/2] board: remove capsule update support in set_dfu_alt_info()

2025-02-03 Thread Jonathan Humphreys
Now that capsule update sets the dfu_alt_info environment variable explicitly, there is no need to support it in the set_dfu_alt_info() function. Decouple SET_DFU_ALT_INFO from EFI_CAPSULE_FIRMWARE_FIT and EFI_CAPSULE_FIRMWARE_RAW. For many boards, this was the only use of set_dfu_alt_info() so rem

[PATCH 0/2] EFI Capsule update explicitly sets dfu_alt_info

2025-02-03 Thread Jonathan Humphreys
For capsule update, explicitly set the dfu_alt_info environment variable before the DFU operation, and then restore it to the original value. Previously, the dfu_alt_info environment variable was set with the set_dfu_alt_info() function. The problem with setting the capsule update's dfu_alt_info s

[PATCH 1/2] efi_firmware: set EFI capsule dfu_alt_info env explicitly

2025-02-03 Thread Jonathan Humphreys
The current implementation of EFI capsule update uses set_dfu_alt_info() to set the dfu_alt_info environment variable with the settings it requires. However, set_dfu_alt_info() is doing this for all DFU operations, even those unrelated to capsule update. Thus other uses of DFU, such as DFU boot wh

Re: [PATCH] scripts: Fix potential null-deref

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 07:50:08PM +0300, Maks Mishin wrote: > After having been compared to a NULL value at menu.c:799, > pointer 'sym' is dereferenced at menu.c:812. > > Signed-off-by: Maks Mishin > --- > scripts/kconfig/menu.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) >

Re: [PATCH] dfu: Prevent set_dfu_alt_info() from overwriting a previous value

2025-02-03 Thread Jon Humphreys
Ilias Apalodimas writes: > Hi Jon, > > On Fri, 17 Jan 2025 at 00:02, Jon Humphreys wrote: >> >> Sughosh Ganu writes: >> >> > On Thu, 16 Jan 2025 at 14:07, Mattijs Korpershoek >> > wrote: >> >> >> >> Hi Jon, >> >> >> >> Sorry for the (very) late reply. I had some long holidays in between and >>

Re: [GIT PULL] u-boot-riscv/master

2025-02-03 Thread Tom Rini
On Mon, 03 Feb 2025 16:17:45 +0800, Leo Liang wrote: > The following changes since commit 2b1c8d3b2da46ce0f7108f279f04bc66f1d8d09a: > > cmd: Fix Kconfig coding style (2025-01-31 11:29:05 -0600) > > are available in the Git repository at: > > https://source.denx.de/u-boot/custodians/u-boot-r

Re: [PATCH v2 0/4] FAT file renaming

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:24:47AM +, Daniel Venzin wrote: > > Rework of v1 posted by Burak Gerz [1]. > > [1] https://lore.kernel.org/u-boot/20241212221427.GM1505244@bill-the-cat/ > > Changes in v2: > - Adapt variable names for better consistency > - Add missing rename hooks > - Use EFI_ACC

Re: [PATCH RFC v2 2/8] arm: dts: k3-j784s4-binman.dtsi: Clean up and templatize boot binaries

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 02:44:57PM -0600, Andrew Davis wrote: > On 1/6/25 3:34 AM, Manorit Chawdhry wrote: > > From: Neha Malcom Francis > > > > Clean up templatized boot binaries for j784s4 soc. This includes > > modifying the k3-j784s4-binman.dtsi to use SPL_BOARD_DTB, > > BOARD_DESCRIPTION and

Re: [PATCH RFC v2 2/8] arm: dts: k3-j784s4-binman.dtsi: Clean up and templatize boot binaries

2025-02-03 Thread Andrew Davis
On 1/6/25 3:34 AM, Manorit Chawdhry wrote: From: Neha Malcom Francis Clean up templatized boot binaries for j784s4 soc. This includes modifying the k3-j784s4-binman.dtsi to use SPL_BOARD_DTB, BOARD_DESCRIPTION and UBOOT_BOARD_DESCRIPTION from the files that include it to further reuse code. k3

Re: [PATCH 32/32] efi: arm: Add an EFI app for arm64

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:25AM -0700, Simon Glass wrote: > Introduce an EFI app for arm64 and update the documentation. > > Provide a value for LOAD_ADDR to avoid a link error. What's the link error? [snip] > diff --git a/board/efi/Kconfig b/board/efi/Kconfig > index 33bc364861a..75d272d241

Re: [PATCH] Add Kconfig option for altbootcmd when using CONFIG_BOOTCOUNT_LIMIT

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 03:56:18PM +, Tomáš Peterka wrote: > Hello Tom, > > sorry for the formatting of the first email. As you might have figured > out, the it was not send using git send-email. I tried to do better > later and I had to use different SMTP server and account > (athei...@se

Re: [PATCH 16/32] efi: arm: Don't do the EL2 switch when running under EFI

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:09AM -0700, Simon Glass wrote: > The previous bootloader has likely done this already, so avoid trying to > do it again. This fixes a crash in QEMU when booting from EDK2 > > Signed-off-by: Simon Glass > --- > > arch/arm/lib/bootm.c | 7 +-- > 1 file changed,

Re: [PATCH 31/32] efi: arm: Simplify the crt0 file and update link script

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:24AM -0700, Simon Glass wrote: > We don't need to manually add the PE header, since binutils has support > for this now. Remove it to simplify the file. > > Set the link-target to efi-app-aarch64 so that binutils knows what to > do. Add rules to pick up the arm64 file

Re: [PATCH 30/32] efi: arm: Use EFI flags for all compilation with the app

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:23AM -0700, Simon Glass wrote: > As opposed to the payload, which is built normally with just an EFI > stub, the app is build homogenously using EFI flags. Update > PLATFORM_CPPFLAGS to enable this. > > Signed-off-by: Simon Glass > --- > > arch/arm/cpu/armv8/confi

Re: [PATCH 28/32] efi: Generate the app as a shared library

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:21AM -0700, Simon Glass wrote: > The app should be built as a shared library, with position-independent > code and the -shared flags. Update the Makefile to handle this. > > Signed-off-by: Simon Glass > --- > > Makefile | 4 > 1 file changed, 4 insertions(+) >

Re: [PATCH 27/32] efi: arm: Provide startup and relocation code

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:20AM -0700, Simon Glass wrote: > Build in the EFI-app startup code as well as the code to relocate U-Boot > to the loaded position, since this is under the control of the previous > firmware. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signatur

Re: [PATCH 26/32] efi: arm: Select the EFI linker script for the app

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:19AM -0700, Simon Glass wrote: > The app needs a special linker script, so select that for the app. > > Signed-off-by: Simon Glass > --- > > arch/arm/cpu/armv8/config.mk | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/cpu/armv8/config.mk b/a

Re: [PATCH 25/32] efi: arm: Adjust how the monitor length is calculated

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:18AM -0700, Simon Glass wrote: > Adjust the conditions to support the EFI app when running on ARM. > > Signed-off-by: Simon Glass > --- > > common/board_f.c | 4 ++-- > common/board_r.c | 4 +++- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a

Re: [PATCH 24/32] efi: arm: Drop startup code from the app

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:17AM -0700, Simon Glass wrote: > The EFI app uses different startup and relocation code and the existing > code uses symbols not present in the app. Drop it. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 23/32] efi: arm: Disable --gc-sections for the app

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:16AM -0700, Simon Glass wrote: > This option cannot be used with a shared library, since it results in > everything being removed. Disable it. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH 21/32] efi: arm: Drop exception code when running as an EFI app

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:14AM -0700, Simon Glass wrote: > This code cannot be used since EFI is in charge of managing exceptions. > Drop it. > > Signed-off-by: Simon Glass > --- > > arch/arm/cpu/armv8/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Why is SPL on in this

Re: [PATCH 20/32] efi: arm: Omit the ARM start-up code in the EFI app

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:13AM -0700, Simon Glass wrote: > This code is not used with the EFI app, since it enters through a call > to efi_main(). Remove start.S and crt files from the build. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP sig

Re: [PATCH 15/32] efi: lmb: Avoid access to _start

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:08AM -0700, Simon Glass wrote: > The app does not have this symbol. Also the memory where the app is > loaded is not under U-Boot's control. Disable this reservation for > the EFI app. > > Signed-off-by: Simon Glass > --- > > lib/lmb.c | 3 ++- > 1 file changed, 2

Re: [PATCH 14/32] efi: Rename ImageBase to image_base

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:07AM -0700, Simon Glass wrote: > It is confusing to have a camel-case indentifier in the link scripts. > Rename it to fit with U-Boot's snake-case style. > > Signed-off-by: Simon Glass This isn't the linker script, it's the crt0 file. Given that this is intended t

Re: [PATCH 11/32] efi: x86: Rework VENDOR_EFI option to permit other archs

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:04AM -0700, Simon Glass wrote: > At present only x86 supports the EFI app and (apart from Qualcomm) the > payload. In preparation for supporting ARM more generally, rename the > existing VENDOR_EFI option to VENDOR_EFI_X86, using that to define a > generic VENDOR_EFI

Re: [PATCH 09/32] efi: Allow board/efi Kconfig to be used outside x86

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:02AM -0700, Simon Glass wrote: > So far only x86 supports the EFI app. Sadly ARM is going the same way, > so allow these options to be enabled for ARM too. Please omit "Sadly", that's tone wording we don't need here. > Signed-off-by: Simon Glass Reviewed-by: Tom R

Re: [PATCH 10/32] efi: x86: Move EFI SDRAM-handling into a common file

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:03AM -0700, Simon Glass wrote: > This code is not actually x86-specific, so move it into the lib/efi dir > where other archs can use it. > > Drop inclusion of the unnecessary x86-specific header. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom sig

Re: [PATCH 08/32] efi: Rename app and payload to include x86

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:42:01AM -0700, Simon Glass wrote: > Since we plan to support the EFI app and payload on ARM too, rename the > x86 target. > > Adjust the Kconfig rules to allow non-x86 builds to be added. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc

Re: [PATCH 05/32] lib: Provide fdtdec_get_pci_bar32() only with PCI enabled

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:41:58AM -0700, Simon Glass wrote: > This function calls dm_pci_read_bar32() which is only available if PCI > is enabled. Add this condition here too, so that the EFI app can build > without needing --gc-sections > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -

Re: [PATCH 03/32] video: Move vesa_setup_video_priv() into its own file

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:41:56AM -0700, Simon Glass wrote: > This helper is used by the EFI driver and we would like to use that on > ARM. Move the helper function into its own file, separate from PCI ROMs, > which are an x86 thing. > > Add a forward declaration for struct udevice so that the he

Re: [PATCH 02/32] Makefile: Avoid using TEXT_BASE if not present

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:41:55AM -0700, Simon Glass wrote: > This value is only available if CONFIG_HAVE_TEXT_BASE is enabled. Add > conditions to avoid introducing errors in link scripts when it is not. > > Signed-off-by: Simon Glass > --- > > Makefile | 4 +++- > 1 file changed, 3 insertio

Re: [PATCH 01/32] Convert build-efi script to Python

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 10:41:54AM -0700, Simon Glass wrote: > Before this gets any longer, convert it to Python so it is easier to > maintain. > > Signed-off-by: Simon Glass > --- > > MAINTAINERS| 2 +- > doc/develop/uefi/u-boot_on_efi.rst | 4 +- > scripts/build-e

Re: [PATCH] cmd: ufetch: use 3-bit colour ANSI codes

2025-02-03 Thread Ferass El Hafidi
Hi, > Currently, the 8-bit escapes are being used, which aren't supported by > vidconsole_escape_char. Since the current usage maps directly to the > 3-bit equivalents anyway, let's use those instead. > > With this change, the fetch output looks as fetching in the vidconsole > as it does over ser

[PATCH 00/32] arm: Support building as an EFI app

2025-02-03 Thread Simon Glass
The original x86 EFI-app was written back in 2015, about a year before the EFI-loader was introduced. At that point, ARM mostly used U-Boot and FIT (Flat Image Tree). Today, sadly, there are a few efforts to re-invent FIT poorly, to cater to more primitive boot-environments than U-Boot. One justif

[PATCH 32/32] efi: arm: Add an EFI app for arm64

2025-02-03 Thread Simon Glass
Introduce an EFI app for arm64 and update the documentation. Provide a value for LOAD_ADDR to avoid a link error. Signed-off-by: Simon Glass --- Kconfig | 1 + MAINTAINERS | 4 ++- arch/arm/dts/efi-arm_app.dts | 31

[PATCH 31/32] efi: arm: Simplify the crt0 file and update link script

2025-02-03 Thread Simon Glass
We don't need to manually add the PE header, since binutils has support for this now. Remove it to simplify the file. Set the link-target to efi-app-aarch64 so that binutils knows what to do. Add rules to pick up the arm64 files. Make some updates to the link-script for arm64, so this all works:

[PATCH 30/32] efi: arm: Use EFI flags for all compilation with the app

2025-02-03 Thread Simon Glass
As opposed to the payload, which is built normally with just an EFI stub, the app is build homogenously using EFI flags. Update PLATFORM_CPPFLAGS to enable this. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/cpu/armv8/co

[PATCH 29/32] efi: arm: Disable STATIC_RELA for the EFI app

2025-02-03 Thread Simon Glass
This feature should not be used with the app, since we don't know where U-Boot will be loaded. Disable it. Signed-off-by: Simon Glass --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b032aac4caa..26168670e5c 10064

[PATCH 28/32] efi: Generate the app as a shared library

2025-02-03 Thread Simon Glass
The app should be built as a shared library, with position-independent code and the -shared flags. Update the Makefile to handle this. Signed-off-by: Simon Glass --- Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 3958ea45b9a..990114731b4 100644 --- a/

[PATCH 27/32] efi: arm: Provide startup and relocation code

2025-02-03 Thread Simon Glass
Build in the EFI-app startup code as well as the code to relocate U-Boot to the loaded position, since this is under the control of the previous firmware. Signed-off-by: Simon Glass --- arch/arm/lib/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/lib/Makefile b/arch/arm/

[PATCH 26/32] efi: arm: Select the EFI linker script for the app

2025-02-03 Thread Simon Glass
The app needs a special linker script, so select that for the app. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/config.mk | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/cpu/armv8/config.mk b/arch/arm/cpu/armv8/config.mk index 1ee31680106..d2d1a8d2bc2 100644 --- a/arch/arm

[PATCH 24/32] efi: arm: Drop startup code from the app

2025-02-03 Thread Simon Glass
The EFI app uses different startup and relocation code and the existing code uses symbols not present in the app. Drop it. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/Makefile | 2 ++ arch/arm/lib/Makefile | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/

[PATCH 25/32] efi: arm: Adjust how the monitor length is calculated

2025-02-03 Thread Simon Glass
Adjust the conditions to support the EFI app when running on ARM. Signed-off-by: Simon Glass --- common/board_f.c | 4 ++-- common/board_r.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 8baaa2341a3..6426a17edc6 100644 --- a/c

[PATCH 23/32] efi: arm: Disable --gc-sections for the app

2025-02-03 Thread Simon Glass
This option cannot be used with a shared library, since it results in everything being removed. Disable it. Signed-off-by: Simon Glass --- arch/arm/config.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index e0045e22271..20f4d41f2c3 100644 --- a

[PATCH 22/32] efi: arm: Allow use of the EFI table in the app

2025-02-03 Thread Simon Glass
It isn't worth the hassle of omitting this field for the app, since code is shared between the payload and the app. Adjust the condition to avoid a build error in the 'efi' command with the app on ARM. Signed-off-by: Simon Glass --- arch/arm/include/asm/global_data.h | 2 +- 1 file changed, 1 i

[PATCH 21/32] efi: arm: Drop exception code when running as an EFI app

2025-02-03 Thread Simon Glass
This code cannot be used since EFI is in charge of managing exceptions. Drop it. Signed-off-by: Simon Glass --- arch/arm/cpu/armv8/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile index 2e71ff2dc97..7bd6cf21b1

[PATCH 20/32] efi: arm: Omit the ARM start-up code in the EFI app

2025-02-03 Thread Simon Glass
This code is not used with the EFI app, since it enters through a call to efi_main(). Remove start.S and crt files from the build. Signed-off-by: Simon Glass --- arch/arm/Makefile | 2 ++ arch/arm/lib/Makefile | 6 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/a

[PATCH 19/32] efi: arm: Implement access to global_data for EFI

2025-02-03 Thread Simon Glass
The EFI app likes to use a simple variable for global data. Implement this for ARM. Signed-off-by: Simon Glass --- arch/arm/include/asm/global_data.h | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/gl

[PATCH 18/32] efi: arm: Avoid enabling caches when running under EFI

2025-02-03 Thread Simon Glass
The previous bootloader has already set up the cache, so don't try to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- common/board_r.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/board_r.c b/common/board_r.c inde

[PATCH 16/32] efi: arm: Don't do the EL2 switch when running under EFI

2025-02-03 Thread Simon Glass
The previous bootloader has likely done this already, so avoid trying to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- arch/arm/lib/bootm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/

[PATCH 17/32] efi: arm: Avoid allocating page tables when running under EFI

2025-02-03 Thread Simon Glass
The previous bootloader has already set up the page tables, so don't try to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- arch/arm/lib/cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c inde

[PATCH 15/32] efi: lmb: Avoid access to _start

2025-02-03 Thread Simon Glass
The app does not have this symbol. Also the memory where the app is loaded is not under U-Boot's control. Disable this reservation for the EFI app. Signed-off-by: Simon Glass --- lib/lmb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lmb.c b/lib/lmb.c index 588787d2

[PATCH 14/32] efi: Rename ImageBase to image_base

2025-02-03 Thread Simon Glass
It is confusing to have a camel-case indentifier in the link scripts. Rename it to fit with U-Boot's snake-case style. Signed-off-by: Simon Glass --- arch/arm/lib/crt0_aarch64_efi.S | 26 +- arch/riscv/lib/crt0_riscv_efi.S | 28 ++-- include/asm-g

[PATCH 13/32] efi: Tidy up setup of global_data

2025-02-03 Thread Simon Glass
Use the available functions for setting and getting the global_data pointer so that EFI-startup can operate on ARM as well as x86. Signed-off-by: Simon Glass --- lib/efi/efi_app.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/efi/efi_app.c b/lib/efi/efi_a

[PATCH 12/32] efi: x86: Allow setting the global_data pointer with EFI

2025-02-03 Thread Simon Glass
Provide a function which sets this pointer, for use in the EFI app. Signed-off-by: Simon Glass --- arch/x86/include/asm/global_data.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 06bd80ccc13..1bd1fa9207

[PATCH 11/32] efi: x86: Rework VENDOR_EFI option to permit other archs

2025-02-03 Thread Simon Glass
At present only x86 supports the EFI app and (apart from Qualcomm) the payload. In preparation for supporting ARM more generally, rename the existing VENDOR_EFI option to VENDOR_EFI_X86, using that to define a generic VENDOR_EFI which will be enabled for all architectures. Signed-off-by: Simon Gla

[PATCH 10/32] efi: x86: Move EFI SDRAM-handling into a common file

2025-02-03 Thread Simon Glass
This code is not actually x86-specific, so move it into the lib/efi dir where other archs can use it. Drop inclusion of the unnecessary x86-specific header. Signed-off-by: Simon Glass --- arch/x86/cpu/efi/Makefile | 1 - lib/efi/Makefile | 1 + {arch/x86/cpu => lib}/ef

[PATCH 09/32] efi: Allow board/efi Kconfig to be used outside x86

2025-02-03 Thread Simon Glass
So far only x86 supports the EFI app. Sadly ARM is going the same way, so allow these options to be enabled for ARM too. Signed-off-by: Simon Glass --- arch/Kconfig | 2 ++ arch/x86/Kconfig | 1 - board/efi/Kconfig | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/a

[PATCH 08/32] efi: Rename app and payload to include x86

2025-02-03 Thread Simon Glass
Since we plan to support the EFI app and payload on ARM too, rename the x86 target. Adjust the Kconfig rules to allow non-x86 builds to be added. Signed-off-by: Simon Glass --- board/efi/Kconfig | 12 board/efi/efi-x86_payload/Kconfig | 2 +- configs/efi-x86_a

[PATCH 07/32] scripts: Update build-efi to support arm64

2025-02-03 Thread Simon Glass
Provide a -A flag to select ARM instead of x86. For now, only the app is supported and only for 64-bit ARM. Signed-off-by: Simon Glass --- scripts/build-efi.py | 49 +++- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/scripts/build-efi.py

[PATCH 06/32] scripts: Update build-efi to support building U-Boot

2025-02-03 Thread Simon Glass
Build U-Boot by default, so we can select the correct board and make the process of trying different boards less error-prone. Signed-off-by: Simon Glass --- scripts/build-efi.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/scripts/build-efi.py b/scripts/build-efi.py index

[PATCH 05/32] lib: Provide fdtdec_get_pci_bar32() only with PCI enabled

2025-02-03 Thread Simon Glass
This function calls dm_pci_read_bar32() which is only available if PCI is enabled. Add this condition here too, so that the EFI app can build without needing --gc-sections Signed-off-by: Simon Glass --- lib/fdtdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fdtdec.c b/lib/fdtdec

[PATCH 04/32] video: Use a local mode_info struct in the EFI driver

2025-02-03 Thread Simon Glass
There is no need to use the global struct provided by PCI. Declare a local structure instead, so this can be used on ARM without including support for PCI ROMs. Signed-off-by: Simon Glass --- drivers/video/efi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/efi.c b/drivers/v

[PATCH 02/32] Makefile: Avoid using TEXT_BASE if not present

2025-02-03 Thread Simon Glass
This value is only available if CONFIG_HAVE_TEXT_BASE is enabled. Add conditions to avoid introducing errors in link scripts when it is not. Signed-off-by: Simon Glass --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2f7614191a1..3958

[PATCH 03/32] video: Move vesa_setup_video_priv() into its own file

2025-02-03 Thread Simon Glass
This helper is used by the EFI driver and we would like to use that on ARM. Move the helper function into its own file, separate from PCI ROMs, which are an x86 thing. Add a forward declaration for struct udevice so that the header can be included directly. Signed-off-by: Simon Glass --- drive

[PATCH 01/32] Convert build-efi script to Python

2025-02-03 Thread Simon Glass
Before this gets any longer, convert it to Python so it is easier to maintain. Signed-off-by: Simon Glass --- MAINTAINERS| 2 +- doc/develop/uefi/u-boot_on_efi.rst | 4 +- scripts/build-efi.py | 258 + scripts/build-efi.sh

Re: [PATCH RFC 00/14] efi: implement EFISTUB support for ARM64 and Qualcomm

2025-02-03 Thread Simon Glass
Hi again, On Mon, 3 Feb 2025 at 05:54, Simon Glass wrote: > > Hi Caleb, > > On Sun, 24 Nov 2024 at 13:27, Caleb Connolly > wrote: > > > > This series implements support for launching U-Boot as an EFI payload on > > ARM64 devices that already have an EFI capable bootloader. > > > > Patches 9 thr

[PATCH] scripts: Fix potential null-deref

2025-02-03 Thread Maks Mishin
After having been compared to a NULL value at menu.c:799, pointer 'sym' is dereferenced at menu.c:812. Signed-off-by: Maks Mishin --- scripts/kconfig/menu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 0fe7f3255a

[PATCH] tools: image-host: Fix potential memory leaks

2025-02-03 Thread Maks Mishin
For a variable `info.name` memory is allocated when calling the `fit_image_setup_sig` function and is lost when the error code is returned. The situation is similar for the `region_prop` variable, the memory for which is allocated by calling the function `fit_config_get_regions`. Signed-off-by

Re: [PATCH] Add Kconfig option for altbootcmd when using CONFIG_BOOTCOUNT_LIMIT

2025-02-03 Thread Tomáš Peterka
Hello Tom, sorry for the formatting of the first email. As you might have figured out, the it was not send using git send-email. I tried to do better later and I had to use different SMTP server and account (athei...@seznam.cz) because our company email provider is too much ahead in the future

Re: [PATCH] CI: Use different containers for concurrent runner

2025-02-03 Thread Tom Rini
On Mon, Feb 03, 2025 at 09:25:54AM -0700, Simon Glass wrote: > When running multiple runners on the same machine, each should be in its > own container to avoid them interfering with either other. > > Add a container name for this. Ensure it is removed after use. > > Signed-off-by: Simon Glass

[PATCH] cmd: ufetch: use 3-bit colour ANSI codes

2025-02-03 Thread Sam Day
[0m" static const char * const logo_lines[] = { --- base-commit: 2b1c8d3b2da46ce0f7108f279f04bc66f1d8d09a change-id: 20250203-ufetch-vidconsole-colours-0e6a9ebe2475 Best regards, -- Sam Day

[PATCH] zynqmp: Save "bootseq" environment variable in dec format

2025-02-03 Thread egyszeregy
From: Benjamin Szőke Save "bootseq" environment variable in decimal format. Signed-off-by: Benjamin Szőke --- board/xilinx/zynqmp/zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 8cdd9d8600..820fb252a

[PATCH 4/4] u_boot_pylib: Add a function to run a single command

2025-02-03 Thread Simon Glass
Add a helper to avoid needing to use a list within a list for this simple case. Update existing users of runpipe() to use this where possible. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 5 +-- tools/buildman/boards.py| 4 +-- tools/buildman/builder.py | 11

[PATCH 3/4] u_boot_pylib: Fix pylint warnings in command

2025-02-03 Thread Simon Glass
This file has a lot of warnings. Before adding any more features, fix those which are straightforward to resolve. Signed-off-by: Simon Glass --- tools/u_boot_pylib/command.py | 107 +- 1 file changed, 80 insertions(+), 27 deletions(-) diff --git a/tools/u_boot_p

[PATCH 2/4] u_boot_pylib: Add an exception-class for errors

2025-02-03 Thread Simon Glass
Throwing an Exception is not very friendly since it is the top-level class of all exceptions. Declare a new class instead. Signed-off-by: Simon Glass --- tools/patman/gitutil.py | 2 +- tools/u_boot_pylib/command.py | 20 ++-- 2 files changed, 19 insertions(+), 3 deletion

[PATCH 1/4] u_boot_pylib: Correct case for test_result

2025-02-03 Thread Simon Glass
This should be in capitals and defined at the start of the file. Update it. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 14 +++--- tools/buildman/func_test.py | 10 +- tools/u_boot_pylib/command.py | 23 +++ 3 files changed, 23 insertions

[PATCH 0/4] tools: Minor clean-ups for the command library

2025-02-03 Thread Simon Glass
This series adds comments and fixes pylint warnings in the command library. It also introduces a new, simpler way of running a single command. Simon Glass (4): u_boot_pylib: Correct case for test_result u_boot_pylib: Add an exception-class for errors u_boot_pylib: Fix pylint warnings in com

[PATCH] CI: Use different containers for concurrent runner

2025-02-03 Thread Simon Glass
When running multiple runners on the same machine, each should be in its own container to avoid them interfering with either other. Add a container name for this. Ensure it is removed after use. Signed-off-by: Simon Glass --- .gitlab-ci.yml | 4 1 file changed, 4 insertions(+) diff --git

  1   2   >