From patchwork Thu Sep 26 21:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989964 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Nm6FLrtt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6wt2ZBxz1xt8 for ; Fri, 27 Sep 2024 08:00:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3908188EA3; Fri, 27 Sep 2024 00:00:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Nm6FLrtt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 33C6F88EC9; Fri, 27 Sep 2024 00:00:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4063F88E9F for ; Fri, 27 Sep 2024 00:00:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6c582ca168fso10171076d6.2 for ; Thu, 26 Sep 2024 15:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388035; x=1727992835; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bdGHfvTeLVKwwdq/UiDzUe4Fjcz1UVxnYN6gDvQWEj8=; b=Nm6FLrttnIHmETDT5GlLy/zP5kb46G/jO4Go7F7ctQ5B/2HCFDlEQ7jZ/JHCypa5Zy p5kCpP2Zq2NQaKVwXRxIka/RPwekbLB2P3qFo+VM2uyi+vvgTPBHeky6UGTaLvavswkQ fvcjMIIfRBhI1UqwsGY7fwPEH0amVrdsWEYW0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388035; x=1727992835; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bdGHfvTeLVKwwdq/UiDzUe4Fjcz1UVxnYN6gDvQWEj8=; b=g0ooHJAWVi6K9AbHdG2qPYMVQgbbj2ZH/kxrAXh8abyDOgWulrMS3EUxNCisrg6rcz 7CRCQTCP+Y12IICraqq/biPGo+6Xq2CPl0Z6OmYpqtpQReK/Ow0RkUNo037vwOVkphpE RcgSk+BGDiNrWachTadRC+ppYugZ1mWarQj3/FX+WcCZ/vVGw7sN4bJrqx6ndYnfU23T 5aHtQBA8jAeVeSfCP50JO6dgXFF5vwSav74lV2Qpzlx4bTLehCORkWbgv35MMUvi5wji 1EvV4IKDMmbSJHitxso+MdkYzBMkjUKjabrknGmMYnZAePRdnfU2dNxJB3FERxZT2VBh F4Ew== X-Gm-Message-State: AOJu0Yx4/Ygfj2PSEG8Kz3jMBg96lI2J39VYpuP5ulbr9NrFm7XBxyv6 x8aAA7c6XP1oWndNnayoAxIvFUWPCJfBaOflFjYxRBuYDTBI5pqDuFWe/L0mk2owcYtcM1hN+3V voUr3ic4= X-Google-Smtp-Source: AGHT+IGr145yIf8/bfw3aNpGQony2t6fs3UQafmc8uPGwK0Vn2B/459FT1sV/l/jRXRKcobwhyNRzQ== X-Received: by 2002:a05:6214:3b86:b0:6c5:5088:e39a with SMTP id 6a1803df08f44-6cb3b5fae96mr14770506d6.29.1727388035381; Thu, 26 Sep 2024 15:00:35 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:00:34 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v6 01/12] efi_loader: Rename and move CMD_BOOTEFI_HELLO_COMPILE Date: Thu, 26 Sep 2024 23:59:31 +0200 Message-ID: <20240926215950.1265143-2-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This is not actually a command so the name is confusing. Use BOOTEFI_HELLO_COMPILE instead. Put it in the efi_loader directory with the other such config options. The link rule (for $(obj)/%_efi.so) in scripts/Makefile.lib handles pulling in efi_crt0.o and efi_reloc.o so drop the 'extra' rules. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- (no changes since v3) Changes in v3: - Drop the extra- rules since scripts/Makefile.lib takes care of it arch/arm/lib/Makefile | 1 - arch/riscv/lib/Makefile | 1 - arch/x86/lib/Makefile | 2 +- cmd/Kconfig | 14 +------------- configs/octeontx2_95xx_defconfig | 2 +- configs/octeontx2_96xx_defconfig | 2 +- configs/octeontx_81xx_defconfig | 2 +- configs/octeontx_83xx_defconfig | 2 +- doc/develop/uefi/uefi.rst | 2 +- lib/efi_loader/Kconfig | 12 ++++++++++++ lib/efi_loader/Makefile | 2 +- test/py/tests/test_efi_fit.py | 2 +- test/py/tests/test_efi_loader.py | 2 +- 13 files changed, 22 insertions(+), 24 deletions(-) diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 67275fba616..4e54c577cc3 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -130,7 +130,6 @@ CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI) CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI) CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI) -extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC) # TODO: As of v2019.01 the relocation code for the EFI application cannot # be built on ARMv7-M. ifndef CONFIG_CPU_V7M diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile index 65dc49f6fa5..4f6272aab6e 100644 --- a/arch/riscv/lib/Makefile +++ b/arch/riscv/lib/Makefile @@ -36,7 +36,6 @@ CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI) CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI) CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI) -extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC) extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC) extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC) diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 8fc35e1b51e..8bc8d92172b 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -97,7 +97,7 @@ endif else ifndef CONFIG_SPL_BUILD -ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),) +ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),) extra-y += $(EFI_CRT0) $(EFI_RELOC) endif endif diff --git a/cmd/Kconfig b/cmd/Kconfig index 5ef3c8a8748..74afedd5b5a 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -438,21 +438,9 @@ config CMD_BOOTEFI_BOOTMGR This subcommand will allow you to select the UEFI binary to be booted via UEFI variables Boot####, BootOrder, and BootNext. -config CMD_BOOTEFI_HELLO_COMPILE - bool "Compile a standard EFI hello world binary for testing" - default y - help - This compiles a standard EFI hello world application with U-Boot so - that it can be used with the test/py testing framework. This is useful - for testing that EFI is working at a basic level, and for bringing - up EFI support on a new architecture. - - No additional space will be required in the resulting U-Boot binary - when this option is enabled. - config CMD_BOOTEFI_HELLO bool "Allow booting a standard EFI hello world for testing" - depends on CMD_BOOTEFI_BINARY && CMD_BOOTEFI_HELLO_COMPILE + depends on CMD_BOOTEFI_BINARY && BOOTEFI_HELLO_COMPILE default y if CMD_BOOTEFI_SELFTEST help This adds a standard EFI hello world application to U-Boot so that diff --git a/configs/octeontx2_95xx_defconfig b/configs/octeontx2_95xx_defconfig index c5dc4f4dfa6..23c313375ac 100644 --- a/configs/octeontx2_95xx_defconfig +++ b/configs/octeontx2_95xx_defconfig @@ -38,7 +38,7 @@ CONFIG_SYS_PBSIZE=1050 CONFIG_BOARD_EARLY_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Marvell> " -# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set +# CONFIG_BOOTEFI_HELLO_COMPILE is not set CONFIG_CMD_MD5SUM=y CONFIG_MD5SUM_VERIFY=y CONFIG_CMD_MX_CYCLIC=y diff --git a/configs/octeontx2_96xx_defconfig b/configs/octeontx2_96xx_defconfig index ad61b80300f..197e72acd1f 100644 --- a/configs/octeontx2_96xx_defconfig +++ b/configs/octeontx2_96xx_defconfig @@ -38,7 +38,7 @@ CONFIG_SYS_PBSIZE=1050 CONFIG_BOARD_EARLY_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Marvell> " -# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set +# CONFIG_BOOTEFI_HELLO_COMPILE is not set CONFIG_CMD_MD5SUM=y CONFIG_MD5SUM_VERIFY=y CONFIG_CMD_MX_CYCLIC=y diff --git a/configs/octeontx_81xx_defconfig b/configs/octeontx_81xx_defconfig index 1d39bce6abd..b501d653c27 100644 --- a/configs/octeontx_81xx_defconfig +++ b/configs/octeontx_81xx_defconfig @@ -39,7 +39,7 @@ CONFIG_SYS_PBSIZE=1050 CONFIG_BOARD_EARLY_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Marvell> " -# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set +# CONFIG_BOOTEFI_HELLO_COMPILE is not set CONFIG_CMD_MD5SUM=y CONFIG_MD5SUM_VERIFY=y CONFIG_CMD_MX_CYCLIC=y diff --git a/configs/octeontx_83xx_defconfig b/configs/octeontx_83xx_defconfig index ba9fc5f9553..4a537f5cbbe 100644 --- a/configs/octeontx_83xx_defconfig +++ b/configs/octeontx_83xx_defconfig @@ -37,7 +37,7 @@ CONFIG_SYS_PBSIZE=1050 CONFIG_BOARD_EARLY_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Marvell> " -# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set +# CONFIG_BOOTEFI_HELLO_COMPILE is not set CONFIG_CMD_MD5SUM=y CONFIG_MD5SUM_VERIFY=y CONFIG_CMD_MX_CYCLIC=y diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index 94482758573..0760ca91d4f 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -720,7 +720,7 @@ Executing the built in hello world application A hello world UEFI application can be built with:: - CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y + CONFIG_BOOTEFI_HELLO_COMPILE=y It can be embedded into the U-Boot binary with:: diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index e58b8825605..6f6fa8d629d 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -552,6 +552,18 @@ config EFI_HTTP_BOOT directly boot from network. endmenu +config BOOTEFI_HELLO_COMPILE + bool "Compile a standard EFI hello world binary for testing" + default y + help + This compiles a standard EFI hello world application with U-Boot so + that it can be used with the test/py testing framework. This is useful + for testing that EFI is working at a basic level, and for bringing + up EFI support on a new architecture. + + No additional space will be required in the resulting U-Boot binary + when this option is enabled. + endif source "lib/efi/Kconfig" diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 2af6f2066b5..27dbd9e760d 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -27,7 +27,7 @@ always += boothart.efi targets += boothart.o endif -ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),) +ifneq ($(CONFIG_BOOTEFI_HELLO_COMPILE),) always += helloworld.efi targets += helloworld.o endif diff --git a/test/py/tests/test_efi_fit.py b/test/py/tests/test_efi_fit.py index 0ad483500f8..550058a30fd 100644 --- a/test/py/tests/test_efi_fit.py +++ b/test/py/tests/test_efi_fit.py @@ -119,7 +119,7 @@ FDT_DATA = ''' ''' @pytest.mark.buildconfigspec('bootm_efi') -@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') +@pytest.mark.buildconfigspec('BOOTEFI_HELLO_COMPILE') @pytest.mark.buildconfigspec('fit') @pytest.mark.notbuildconfigspec('generate_acpi_table') @pytest.mark.requiredtool('dtc') diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py index 5f3b448a066..707b2c9e795 100644 --- a/test/py/tests/test_efi_loader.py +++ b/test/py/tests/test_efi_loader.py @@ -170,7 +170,7 @@ def do_test_efi_helloworld_net(u_boot_console, proto): assert expected_text not in output @pytest.mark.buildconfigspec('of_control') -@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') +@pytest.mark.buildconfigspec('bootefi_hello_compile') @pytest.mark.buildconfigspec('cmd_tftpboot') def test_efi_helloworld_net_tftp(u_boot_console): """Run the helloworld.efi binary via TFTP. From patchwork Thu Sep 26 21:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989965 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=D2ReB4WE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6x51zZlz1xt8 for ; Fri, 27 Sep 2024 08:00:57 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B45EB88ED1; Fri, 27 Sep 2024 00:00:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="D2ReB4WE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 881B088EC9; Fri, 27 Sep 2024 00:00:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5E8F788E9F for ; Fri, 27 Sep 2024 00:00:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-e22531db3baso1514588276.3 for ; Thu, 26 Sep 2024 15:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388046; x=1727992846; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mpghxRb9gXK6ZpZvSrEIS0pABSRGGJJzjUN0aGDhTNA=; b=D2ReB4WEsAjEqNDfuocoqxgp9IrTb+wh6s6rsIs6G1dHqggSFciHlBSXoGUzh4acoP 3qsPn5FLqZMXCmtdLBzauEYX6UMMapC2s0l5bvUZhkz1Pjo14+X07JN8rgid2hSCbAi4 0SsGdGnSxrU09VOHorVYMOCE9Fn/LK7L9BVss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388046; x=1727992846; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mpghxRb9gXK6ZpZvSrEIS0pABSRGGJJzjUN0aGDhTNA=; b=HR6KwDZou8bs5mQtQDwBumB77E5Jvwau0iMjmSvqOluTWm5/NNeM/6408oBCVJzFOL P8dWx/KKJYTwciY1Iyas3sx6/YUo31biFLdPiSDfjQy8B3wn1xywRqb27eUHXcHcxSia toaDvxAN4DBXgimaMcIoWHrl8g6gz/f1d4L4e3s/r9NyVFPESMfyKPurIP2rp2z3ZQQp pymjZWYhJyWSdc0LuagNoD9TMylnhd+c3npAFGXU7wHXVHcch47HxDXqaEnmT6IRGJo9 R1IPJMhs+vAVzBZS2Ju4A8UhvwsNzXMssz9Os1XAaZubh3MjraLthETkN+4sRm7dsuaF tT5Q== X-Gm-Message-State: AOJu0YwkARhxf4725FikYStfHXePeEA7OJXznGlmyN1Dln6uQMF0EaLA nl8IcCghXXvdgSAGZeDhblDZVN+ZVkJTZJVKkDsrz/N4EEFBjKUWKnPqq2RMKAupDNM/F2HA26p rIJS1tlw= X-Google-Smtp-Source: AGHT+IFtJ1wIIgdX0pAVG2J0y3FuYc99BLAiLTBysVPZLJEBo4lOQqywhklsdlaBvKql047MDhEZZw== X-Received: by 2002:a05:6902:102f:b0:e20:26cf:2eda with SMTP id 3f1490d57ef6-e2604b80adbmr848483276.32.1727388045609; Thu, 26 Sep 2024 15:00:45 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:00:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass , Albert Aribaud , Bin Meng Subject: [PATCH v6 02/12] efi: arm: x86: riscv: Drop crt0/relocal extra- rules Date: Thu, 26 Sep 2024 23:59:32 +0200 Message-ID: <20240926215950.1265143-3-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The link rule (for $(obj)/%_efi.so) in scripts/Makefile.lib handles pulling in efi_crt0.o and efi_reloc.o so drop the 'extra' rules. Signed-off-by: Simon Glass Suggested-by: Heinrich Schuchardt --- (no changes since v3) Changes in v3: - Add new patch to drop crt0/relocal extra- rules arch/arm/lib/Makefile | 7 ------- arch/riscv/lib/Makefile | 3 --- arch/x86/lib/Makefile | 16 ---------------- 3 files changed, 26 deletions(-) diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 4e54c577cc3..87000d1609b 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -129,10 +129,3 @@ CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI) CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI) CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI) - -# TODO: As of v2019.01 the relocation code for the EFI application cannot -# be built on ARMv7-M. -ifndef CONFIG_CPU_V7M -#extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC) -endif -extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC) diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile index 4f6272aab6e..bcfdb516b76 100644 --- a/arch/riscv/lib/Makefile +++ b/arch/riscv/lib/Makefile @@ -36,9 +36,6 @@ CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI) CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI) CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI) -extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC) -extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC) - obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMMOVE) += memmove.o obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy.o diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 8bc8d92172b..d6ea9c955f8 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -87,19 +87,3 @@ extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o endif - -ifdef CONFIG_EFI_STUB - -ifeq ($(CONFIG_$(SPL_)X86_64),) -extra-y += $(EFI_CRT0) $(EFI_RELOC) -endif - -else - -ifndef CONFIG_SPL_BUILD -ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),) -extra-y += $(EFI_CRT0) $(EFI_RELOC) -endif -endif - -endif From patchwork Thu Sep 26 21:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989966 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=GQ/7IeQZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6xK6C6rz1xt8 for ; Fri, 27 Sep 2024 08:01:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2416588E9F; Fri, 27 Sep 2024 00:00:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="GQ/7IeQZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF5C188EC9; Fri, 27 Sep 2024 00:00:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A6D4988E9F for ; Fri, 27 Sep 2024 00:00:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-6cb2458774dso9788696d6.3 for ; Thu, 26 Sep 2024 15:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388054; x=1727992854; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u0fE4v1/zhNDvHrzRjK/HlTmtUOa9OFPgm96GahDpEo=; b=GQ/7IeQZiDGQZpM7ttDvHxuBhTCYQoRyzvVd0H/LMkDJTxbvQtKWhK80sF7VENxkRY 60x5tKEb6pAs3wjIDwZXWX/7OEVA+r6K2BAtdEXuKsJ9u5QtQHD3JOU3PWUuqRkF8b8S 84kvQrLS+bgYHoSHLaDGF+09jL5tAJ1X24vv4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388054; x=1727992854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u0fE4v1/zhNDvHrzRjK/HlTmtUOa9OFPgm96GahDpEo=; b=dovlEI7DCfDWWNMl9n1PxOCzlwQGS6BChtiW5EGdjoRSvxJUaunBk/roEtiW8SanLS 7bWFRSndkaEF/uKRxK6IcMpPMEKkjga6u/hoMfwv15y6xVArSWVVr/Kc+B0xFLR05ucm fNhogIgCjBVEUiwz+UbeRxdk5pdJZDSY5Q+wDhX7hsQ0xLNJJl6XnwCFnN5NvAe0/I9H odAZfNGQpbHyrNP0qmtv+1+/3fQE9S/CffB0Rq+NiUb48bbBzAc5zXnLR088uXfOJhTP XTRNX49yskB/vnBJDrrE1eD0aj/U4otqCrzcKOsqmi0m7FJpJ8qixhWgMGEJxUhpWTZp NCQQ== X-Gm-Message-State: AOJu0YxyksHb8CfMyCzxAoIy9br2taQBcovOWcPu8yzmEFKni88BPTmZ 2seHNUh0AkUp9q4PubRiKEuA0Tn+N4x7TWADumy5Av/sMnocPE6+/aO0xPLEK9z1d6vdNtTcRgs /HYO3zBY= X-Google-Smtp-Source: AGHT+IFwJmHAbWwxHCh++mHksLZdNx3xBVm4wFbE7TVVGTJA2cc7X4ooIwsOJ06EcYiYCGFgqRD8tw== X-Received: by 2002:a05:6214:5b09:b0:6c3:5c39:45e1 with SMTP id 6a1803df08f44-6cb3b5d8f96mr14448986d6.12.1727388053897; Thu, 26 Sep 2024 15:00:53 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:00:53 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v6 03/12] efi_loader: Shorten the app rules Date: Thu, 26 Sep 2024 23:59:33 +0200 Message-ID: <20240926215950.1265143-4-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean We have quite a few apps now, so create a way to specify them as a list rather than repeating the same rules again and again. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- (no changes since v1) lib/efi_loader/Makefile | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 27dbd9e760d..660368b9d8f 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -22,29 +22,13 @@ CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI) CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI) -ifdef CONFIG_RISCV -always += boothart.efi -targets += boothart.o -endif - -ifneq ($(CONFIG_BOOTEFI_HELLO_COMPILE),) -always += helloworld.efi -targets += helloworld.o -endif - -ifneq ($(CONFIG_GENERATE_SMBIOS_TABLE),) -always += smbiosdump.efi -targets += smbiosdump.o -endif - +# These are the apps that are built +apps-$(CONFIG_RISCV) += boothart +apps-$(CONFIG_BOOTEFI_HELLO_COMPILE) += helloworld +apps-$(CONFIG_GENERATE_SMBIOS_TABLE) += smbiosdump +apps-$(CONFIG_EFI_LOAD_FILE2_INITRD) += initrddump ifeq ($(CONFIG_GENERATE_ACPI_TABLE),) -always += dtbdump.efi -targets += dtbdump.o -endif - -ifdef CONFIG_EFI_LOAD_FILE2_INITRD -always += initrddump.efi -targets += initrddump.o +apps-y += dtbdump endif obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o @@ -95,3 +79,6 @@ obj-$(CONFIG_EFI_ECPT) += efi_conformance.o EFI_VAR_SEED_FILE := $(subst $\",,$(CONFIG_EFI_VAR_SEED_FILE)) $(obj)/efi_var_seed.o: $(srctree)/$(EFI_VAR_SEED_FILE) + +always += $(foreach f,$(apps-y),$(f).efi) +targets += $(foreach f,$(apps-y),$(f).o) From patchwork Thu Sep 26 21:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989967 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=mSWpq7j7; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6xY0rQqz1xt8 for ; Fri, 27 Sep 2024 08:01:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7ED1488EE0; Fri, 27 Sep 2024 00:01:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mSWpq7j7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 42E4088EE2; Fri, 27 Sep 2024 00:01:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2F26F88EE0 for ; Fri, 27 Sep 2024 00:01:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6cb2c5128d5so9931386d6.0 for ; Thu, 26 Sep 2024 15:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388063; x=1727992863; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zILTwi5mQXhaEo7onWN3pBa95BZkAMxEkeivqeC9TpQ=; b=mSWpq7j7x1K+cyqOuuQbTIk6pCdhIcgQDIBzPa/3jkZtMoA5a8MgwSpYWCb4N5jOSS onhWX7uOaKNCaFJmHIrs6C/Tm8gRJc4tiS2mBt9HQsYR8y4Vd6yCQ82Zid9ybV2ta+PL cROxhIBuNqY0Q2QmtsG4PwSu0jczcQn06dtWo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388063; x=1727992863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zILTwi5mQXhaEo7onWN3pBa95BZkAMxEkeivqeC9TpQ=; b=CjUGnxeFK1o2X2caA0zkVWqiE4UaMLUpkZD9MUSdtO1W8IXvX3Z1tudIB8WG4ez7Bk Z5KFQQ8DCnMr209H5dAhGjrjTNcDGFQJtO7KbtSe+4eby6ukHpzOGrIkF4MWSUWaL/Qe YyjX3TSd5lMVDgqmLEKp6Hqsu6UKi6Q3bCIFaMpE1ILw/2m7UQkXgwx1d4Ah0K5l2Gi7 T88rcT99OLamCalWD1XadcpxPIPdlorTyFtt4tNPdtmeeNFmGxmuQ60+3KFJpmadVE47 j/On4tlcXLL3RqiH+FziGpcAWAkn1CiXsT870jcsqvJ9OvS7DFF67dmnI5T4tiOUePpK 35Bg== X-Gm-Message-State: AOJu0YybJsNiOKjINKG5yB/0HjN4ng/jd8XA+VfchxNvt+aEE6ypNHmO N776QliBgOpu5BYP3p9zbamelfJ2fdVAmw+bN36y1TX4Iy+UztCJ96B4+IGh2Oh7CTcpdhgSP0R 5Dj7lv7o= X-Google-Smtp-Source: AGHT+IFQalFVcHwyQvoyoPii19SXMGzUHLjcmaZ/kgRCCojU1zaFRss0bhA9eMPUd+XnMVtZhJw7Aw== X-Received: by 2002:ad4:4450:0:b0:6cb:3ba3:8eab with SMTP id 6a1803df08f44-6cb3ba38f1amr13091336d6.31.1727388062601; Thu, 26 Sep 2024 15:01:02 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:01:01 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v6 04/12] efi_loader: Shorten the app rules further Date: Thu, 26 Sep 2024 23:59:34 +0200 Message-ID: <20240926215950.1265143-5-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add a way to factor out the CFLAGS changes for each app, since they are all the same. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- (no changes since v1) lib/efi_loader/Makefile | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 660368b9d8f..00d18966f9e 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -11,16 +11,6 @@ asflags-y += -I. CFLAGS_efi_boottime.o += \ -DFW_VERSION="0x$(VERSION)" \ -DFW_PATCHLEVEL="0x$(PATCHLEVEL)" -CFLAGS_boothart.o := $(CFLAGS_EFI) -Os -ffreestanding -CFLAGS_REMOVE_boothart.o := $(CFLAGS_NON_EFI) -CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding -CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI) -CFLAGS_smbiosdump.o := $(CFLAGS_EFI) -Os -ffreestanding -CFLAGS_REMOVE_smbiosdump.o := $(CFLAGS_NON_EFI) -CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding -CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI) -CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding -CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI) # These are the apps that are built apps-$(CONFIG_RISCV) += boothart @@ -80,5 +70,10 @@ obj-$(CONFIG_EFI_ECPT) += efi_conformance.o EFI_VAR_SEED_FILE := $(subst $\",,$(CONFIG_EFI_VAR_SEED_FILE)) $(obj)/efi_var_seed.o: $(srctree)/$(EFI_VAR_SEED_FILE) +# Set the C flags to add and remove for each app +$(foreach f,$(apps-y),\ + $(eval CFLAGS_$(f).o := $(CFLAGS_EFI) -Os -ffreestanding)\ + $(eval CFLAGS_REMOVE_$(f).o := $(CFLAGS_NON_EFI))) + always += $(foreach f,$(apps-y),$(f).efi) targets += $(foreach f,$(apps-y),$(f).o) From patchwork Thu Sep 26 21:59:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989968 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=WwwDXyFV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6xn2ZbVz1xt8 for ; Fri, 27 Sep 2024 08:01:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFFF488EFF; Fri, 27 Sep 2024 00:01:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="WwwDXyFV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D25888E5F; Fri, 27 Sep 2024 00:01:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 12E5388E5F for ; Fri, 27 Sep 2024 00:01:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6cb2cba60e1so8740716d6.3 for ; Thu, 26 Sep 2024 15:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388071; x=1727992871; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Eyv/zA4gHms1N5judyt8wLYPxDKAopnpE2qsloDKPVQ=; b=WwwDXyFVG5tEMKVBr2SvxfaX6Dp4euytau0lwr0gopG5fpRWeBVSS43h8WdeF+AESK 2D+PJS+fWbLLEUAnpmjYZy/WI+MBDpje9yKvnsxr12e6rv8Pr0SS0xufFvwrDlPBrQgJ 6yBC9CKFvAdiBPWW8su92vT7bRXtQqsSBfHXE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388071; x=1727992871; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eyv/zA4gHms1N5judyt8wLYPxDKAopnpE2qsloDKPVQ=; b=Mw5UAVnP+MuPNlv/e+4gUWAvLZRVX+ZWS8dgej2MdISwK4UHroMMz0dPINx3zEfPEJ UeAhNmV6CNi523X84DFsU1D31jMNNGDjxCCv+xIPJj5lr5rbCBSfw8MrSs/+k++H/tMu SFjsqj6GGf4h5TyyTA7pxv0p3Xo2cS+PdQxjdinrKhIXHCiCBiwHXPMwPR28Du40r5r1 CVoEl+XnOJt6wzel8SYCOFyJIsdAI3y3iMWl/OgY0KkyX9++P7XnVldHk4eDlaC4VKVO t0PfMlfX/lLtYFblABkljhplRLfm+3avyCP9cNiFiGsXMZXvJYvdL2qdD37sxymKCOKe s2MA== X-Gm-Message-State: AOJu0YxGqr7wN08d7E+73zj0DbZwBeVLI9BsPLlp7lAQ2ybMshmuEmvY 2TUxtWu5aunUaXD5e8q7AtOZxBctwrh8xjqx2CWIduS2RmCkVbke1wisdyxk0JPy9bJhGuQHaH1 om/9xuqc= X-Google-Smtp-Source: AGHT+IFqIZeLY6XjIVuZ6FoVijPaNtVri5l+FR6Jdx5ENOQkWrnU6kFo6RATUfNORVucTyTgorfjJg== X-Received: by 2002:a05:6214:451f:b0:6cb:3690:6260 with SMTP id 6a1803df08f44-6cb3b5cb281mr14639446d6.15.1727388071294; Thu, 26 Sep 2024 15:01:11 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.01.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:01:10 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v6 05/12] efi_loader: Show the vendor in helloworld Date: Thu, 26 Sep 2024 23:59:35 +0200 Message-ID: <20240926215950.1265143-6-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Show the vendor name so it is clear which firmware is being used, e.g. whether U-Boot is providing the boot services. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Reword commit message - Use 'Firmware vendor' instead of just 'Vendor' lib/efi_loader/helloworld.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c index 586177de0c8..c4d2afcb40a 100644 --- a/lib/efi_loader/helloworld.c +++ b/lib/efi_loader/helloworld.c @@ -237,6 +237,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle, (con_out, u"Missing device path for device handle\r\n"); goto out; } + con_out->output_string(con_out, u"Firmware vendor: "); + con_out->output_string(con_out, systab->fw_vendor); + con_out->output_string(con_out, u"\n"); con_out->output_string(con_out, u"Boot device: "); ret = print_device_path(device_path, device_path_to_text); if (ret != EFI_SUCCESS) From patchwork Thu Sep 26 21:59:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989970 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=GfRuDZ+L; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6xz48ZLz1xt8 for ; Fri, 27 Sep 2024 08:01:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4846788EE5; Fri, 27 Sep 2024 00:01:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="GfRuDZ+L"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C418C88EF2; Fri, 27 Sep 2024 00:01:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A969288EEC for ; Fri, 27 Sep 2024 00:01:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-6cb2f272f8bso10972036d6.0 for ; Thu, 26 Sep 2024 15:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388080; x=1727992880; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R6LEpRQnkHzYLDHBZ8nGOQQ5vLJkYrhjalbNlynHgLA=; b=GfRuDZ+L8Kol5J3GQhzJRsSErjXs7zlef2iGFbYNgS41zQQg4Hb5tNJfVpSBn+tRcg XLaE0VWcDMSWeuJG8t6LWa8MNGNT1NnC2hNjuypOwL7C/36h7C/bvjkuNgiwPPyOMIBG ItL6l5JG4Pqt4T1Ag5It81JHQkJfPHTIP0h9g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388080; x=1727992880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R6LEpRQnkHzYLDHBZ8nGOQQ5vLJkYrhjalbNlynHgLA=; b=IlxLgvKeIP7k7tFX9fDfB0sVruhi0tD4XRUkkcG2y8gvpkmBNc7s7ru6kYD9QX+K3P isApk9SGfMWepUGTlqGMeyAdkBIAQxJa44FEJqgzZFqG6gbkdWzAmSBhY4CygzwW8kZH KQ5uEPPAUv6cNep6NGHVhy16MoNQggNLCGqfr41AZkhKkvQcSULyX89JmRgr7vzyF9Dd T6BmYEurdalInANuU7kR7uioTrTr3im14Q1azY6SkR5huAiX66QV9H3gcxk6HG4By+mJ yZwRqCB0yKvNq7CYkzevDqt83SQNdur91TrfdXrURysAG8VakRT8ih+BRE82kQM6uRtX 1Stw== X-Gm-Message-State: AOJu0YztI17hJlnKlog0qXd0/vcPI506kRdEF2O41anLfr3Ok6BzatE6 yuACjFuAOJj3nHGKIuN5jvODYSeqPjhhjUMAwYYDZwjy3MJWZQpJH16zY/xR4a0FO5kWZVynG3e K4nfc0L4= X-Google-Smtp-Source: AGHT+IF5/at2FZb3hSA2uLME8guqOoucxVuyupEgJ4kltQuPpLlDw0YcDAXj577q/1R6ol/UeCzaUQ== X-Received: by 2002:a05:6214:554a:b0:6cb:2e7c:a10e with SMTP id 6a1803df08f44-6cb3b6a3349mr14409076d6.48.1727388079985; Thu, 26 Sep 2024 15:01:19 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:01:18 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v6 06/12] efi: Use the same filename for all sandbox builds Date: Thu, 26 Sep 2024 23:59:36 +0200 Message-ID: <20240926215950.1265143-7-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Sandbox is not a real architecture, but within U-Boot it is real enough. We should not need to pretend it is x86 or ARM anywhere in the code. Also we want to be able to locate the sandbox app using a single filename, 'bootsbox.efi', to avoid needing tests to produce different files on each host architecture. Drop the confusing use of host architecture and just let sandbox be sandbox. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- (no changes since v5) Changes in v5: - Drop the Fixes tag Changes in v3: - Put back the Linaro copyright accidentally removed include/efi_default_filename.h | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/include/efi_default_filename.h b/include/efi_default_filename.h index 77932984b55..06ca8735002 100644 --- a/include/efi_default_filename.h +++ b/include/efi_default_filename.h @@ -16,26 +16,8 @@ #undef BOOTEFI_NAME #ifdef CONFIG_SANDBOX - -#if HOST_ARCH == HOST_ARCH_X86_64 -#define BOOTEFI_NAME "BOOTX64.EFI" -#elif HOST_ARCH == HOST_ARCH_X86 -#define BOOTEFI_NAME "BOOTIA32.EFI" -#elif HOST_ARCH == HOST_ARCH_AARCH64 -#define BOOTEFI_NAME "BOOTAA64.EFI" -#elif HOST_ARCH == HOST_ARCH_ARM -#define BOOTEFI_NAME "BOOTARM.EFI" -#elif HOST_ARCH == HOST_ARCH_RISCV32 -#define BOOTEFI_NAME "BOOTRISCV32.EFI" -#elif HOST_ARCH == HOST_ARCH_RISCV64 -#define BOOTEFI_NAME "BOOTRISCV64.EFI" -#else -#error Unsupported UEFI architecture -#endif - -#else - -#if defined(CONFIG_ARM64) +#define BOOTEFI_NAME "BOOTSBOX.EFI" +#elif defined(CONFIG_ARM64) #define BOOTEFI_NAME "BOOTAA64.EFI" #elif defined(CONFIG_ARM) #define BOOTEFI_NAME "BOOTARM.EFI" @@ -52,5 +34,3 @@ #endif #endif - -#endif From patchwork Thu Sep 26 21:59:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989971 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TjWF8vY+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6yB4Xbsz1xt8 for ; Fri, 27 Sep 2024 08:01:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AFCB788EEC; Fri, 27 Sep 2024 00:01:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TjWF8vY+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 32B1D88EA3; Fri, 27 Sep 2024 00:01:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1E2C288E5F for ; Fri, 27 Sep 2024 00:01:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-6cb2f271043so11797316d6.0 for ; Thu, 26 Sep 2024 15:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388090; x=1727992890; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M1zqTnyJ3uOzf0CZdE4lR7ii1MRbTGs8FlqFb9QGCFM=; b=TjWF8vY+Vp56jjNcz2IG63iAkMFKmpm+xhDgEv+xyiDFEKooBhzLMSBIhSKJdpaHye EmdqcitrvB92hY4fQnPlvRN3/+wO9pKqQX8VuhhsCMlS8D59z9ScLCTHsyNls0uJV3zt GPlesUlSzaz1R60yY7rg1U/fJ6RYJFelWQlog= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388090; x=1727992890; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M1zqTnyJ3uOzf0CZdE4lR7ii1MRbTGs8FlqFb9QGCFM=; b=tkFlaDJ5TPb/Anialgl0JgoL+YQ3fiO/U+eIcrfEs2OLlN8e++xjovK9Znn4BAfpQZ 1HzRCZFQ90AbjL1PxB21a88LXGY44JfOGpwh97AtpREX9ZR1OzwU9L6wByx9UvFyKwQI k0tWSz71z8zRUrZxIY/wr56+blMqnoR9DgEnntgl5PEF66+tcOKhYe3xXFrWdrEurvFe KAOjzMh/YcEsbBL/SDykETzviHUEPZQZ36YF3SR+U5N2NkUsasv2PPQQoPHdVd3/hAIF sjEuzEteV4C14xjJbFI0hh4syvaKK+9XIdMjrOfDF65OA9jdAg+WHhrpprzyJn3rt9sA sopg== X-Gm-Message-State: AOJu0YylI4dzwO4Uf4S1bkVcVG5eWsedVvzKvZ5WM44Ff9eZdr8jVbj6 g5+9AUIDdzrJmzfsjF2SRf6bgCIgp2RIWy6NSbb96rGVmwyJ6zvxjtM+l2Ox33/0Z0qwvKtt85A 5duD7UVI= X-Google-Smtp-Source: AGHT+IEwKh3xCc4zb8NXtUPzv/uPVgrUQ48F5g2YKKcFOd7at7OfHXjc0F8iIm/hv8G6nm86ZARhjw== X-Received: by 2002:a0c:f40c:0:b0:6cb:25f5:ec44 with SMTP id 6a1803df08f44-6cb3b5e4eadmr15801896d6.7.1727388090520; Thu, 26 Sep 2024 15:01:30 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.01.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:01:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v6 07/12] bootstd: Add debugging for efi bootmeth Date: Thu, 26 Sep 2024 23:59:37 +0200 Message-ID: <20240926215950.1265143-8-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add a little debugging so we can see what is happening. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes in v6: - Expand the debug messages to be more descriptive boot/bootmeth_efi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 6b41c0999f1..2ad6d3b4ace 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -162,8 +162,10 @@ static int distro_efi_try_bootflow_files(struct udevice *dev, int ret, seq; /* We require a partition table */ - if (!bflow->part) + if (!bflow->part) { + log_debug("no partitions\n"); return -ENOENT; + } strcpy(fname, EFI_DIRNAME); strcat(fname, BOOTEFI_NAME); @@ -171,8 +173,10 @@ static int distro_efi_try_bootflow_files(struct udevice *dev, if (bflow->blk) desc = dev_get_uclass_plat(bflow->blk); ret = bootmeth_try_file(bflow, desc, NULL, fname); - if (ret) + if (ret) { + log_debug("File '%s' not found\n", fname); return log_msg_ret("try", ret); + } /* Since we can access the file, let's call it ready */ bflow->state = BOOTFLOWST_READY; @@ -307,6 +311,8 @@ static int distro_efi_read_bootflow(struct udevice *dev, struct bootflow *bflow) { int ret; + log_debug("dev='%s', part=%d\n", bflow->dev->name, bflow->part); + /* * bootmeth_efi doesn't allocate any buffer neither for blk nor net device * set flag to avoid freeing static buffer. @@ -332,6 +338,7 @@ static int distro_efi_boot(struct udevice *dev, struct bootflow *bflow) ulong kernel, fdt; int ret; + log_debug("distro EFI boot\n"); kernel = env_get_hex("kernel_addr_r", 0); if (!bootmeth_uses_network(bflow)) { ret = efiload_read_file(bflow, kernel); From patchwork Thu Sep 26 21:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1989972 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=bFnEm/EI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XF6yQ1jbJz1xt8 for ; Fri, 27 Sep 2024 08:02:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A49B88E96; Fri, 27 Sep 2024 00:01:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="bFnEm/EI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 63BCC88E5F; Fri, 27 Sep 2024 00:01:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 22FA588E9F for ; Fri, 27 Sep 2024 00:01:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6cb2e136da3so9463166d6.1 for ; Thu, 26 Sep 2024 15:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727388099; x=1727992899; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y6rJQMOhsSwQGbiM5xIK5Rhad8fP1T84y2nnqZJna0o=; b=bFnEm/EIt+8c+g5KqggHSDNa8A3Q3av6fYOvYgklX/uCrR5CjQ1P4iJG+pBYmf+Td0 0anE9dQyrZyQP2ix9x6Ozd41qv+1x5iVWF4dHXLotyy+A7EYwuNHDPcsYpL+cQqvuMCN EEHd7IJaEZbaXrIOBSbN9bRhGTzWtCnrwN9Rk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727388099; x=1727992899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y6rJQMOhsSwQGbiM5xIK5Rhad8fP1T84y2nnqZJna0o=; b=tqmwiBFAZNE7Gj1CXsaJkRgBYkKcT3KOVUpaUbawEQIW0+/iUl2beOF61HgxUdrrUC ieRZF5lTM7bCY19Dl3Lho5JKT2J3xu3RdcI1yEHhXa2xfZG7TZ+NBm0rwMQvbv3cLo/h dYrYP7Z4r5Qlipt/shlEAQitL15vwkLWy53cd92W426gopnfGjiOhREMBp+0baaF52XT pvwEFerqWuBwYDC/XYMdMWOdgP4RkIhzfEWxsnMOZbwer6N7WbkOrOC4Wx0QeFBnNQXH NOm5rEoSSkvaHQgdy2RCf/K7lXOMpxd+d2HyXpnnjxOPmHYgGu0rozWH0w2T0U1XH/3t hx/w== X-Gm-Message-State: AOJu0YxGjF0hHr7/GYMod69xZnvkZk6bEIO9dR5NWKvlGFt5n7D/u+2H +N3Zp3xmaFbZGu1hgnZ9kp+zxY7IWMRXIJnkS7n4pa4eYqbUuvAAxVtbEOZaKLqA+J63aybv5NT czzZ/MyE= X-Google-Smtp-Source: AGHT+IFrU6skhJCY0Uv4oJqf2BzcA9F+0nEVaOSPd0DzfiCosEPmHjbPPjZbkV9BSVjo9RBRLcpcsQ== X-Received: by 2002:a05:6214:590b:b0:6cb:2a26:af89 with SMTP id 6a1803df08f44-6cb3b644060mr22625036d6.34.1727388099374; Thu, 26 Sep 2024 15:01:39 -0700 (PDT) Received: from chromium.org ([205.220.129.31]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b632366sm3079696d6.71.2024.09.26.15.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 15:01:38 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Simon Glass Subject: [PATCH v6 08/12] efi_loader: Disable ANSI output for tests Date: Thu, 26 Sep 2024 23:59:38 +0200 Message-ID: <20240926215950.1265143-9-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926215950.1265143-1-sjg@chromium.org> References: <20240926215950.1265143-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean We don't want ANSI characters written in tests since it is a pain to check the output with ut_assert_nextline() et al. Provide a way to tests to request that ANSI characters not be sent. Add a proper function comment while we are here, to encourage others. Signed-off-by: Simon Glass --- (no changes since v1) include/efi_loader.h | 21 ++++++++++++++++++++- lib/efi_loader/efi_console.c | 26 +++++++++++++++++--------- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index f84852e384f..82b90ee0f1d 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -531,8 +531,27 @@ efi_status_t efi_bootmgr_delete_boot_option(u16 boot_index); efi_status_t efi_bootmgr_run(void *fdt); /* search the boot option index in BootOrder */ bool efi_search_bootorder(u16 *bootorder, efi_uintn_t num, u32 target, u32 *index); -/* Set up console modes */ + +/** + * efi_setup_console_size() - update the mode table. + * + * By default the only mode available is 80x25. If the console has at least 50 + * lines, enable mode 80x50. If we can query the console size and it is neither + * 80x25 nor 80x50, set it as an additional mode. + */ void efi_setup_console_size(void); + +/** + * efi_console_set_ansi() - Set whether ANSI characters should be emitted + * + * These characters mess up tests which use ut_assert_nextline(). Call this + * function to tell efi_loader not to emit these characters when starting up the + * terminal + * + * @allow_ansi: Allow emitting ANSI characters + */ +void efi_console_set_ansi(bool allow_ansi); + /* Set up load options from environment variable */ efi_status_t efi_env_set_load_options(efi_handle_t handle, const char *env_var, u16 **load_options); diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index cea50c748aa..569fc9199bc 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -30,6 +30,17 @@ struct cout_mode { __maybe_unused static struct efi_object uart_obj; +/* + * suppress emission of ANSI codes for use by unit tests. Leave it as 0 for the + * default behaviour + */ +static bool no_ansi; + +void efi_console_set_ansi(bool allow_ansi) +{ + no_ansi = !allow_ansi; +} + static struct cout_mode efi_cout_modes[] = { /* EFI Mode 0 is 80x25 and always present */ { @@ -348,13 +359,6 @@ static int __maybe_unused query_vidconsole(int *rows, int *cols) return 0; } -/** - * efi_setup_console_size() - update the mode table. - * - * By default the only mode available is 80x25. If the console has at least 50 - * lines, enable mode 80x50. If we can query the console size and it is neither - * 80x25 nor 80x50, set it as an additional mode. - */ void efi_setup_console_size(void) { int rows = 25, cols = 80; @@ -362,8 +366,12 @@ void efi_setup_console_size(void) if (IS_ENABLED(CONFIG_VIDEO)) ret = query_vidconsole(&rows, &cols); - if (ret) - ret = query_console_serial(&rows, &cols); + if (ret) { + if (no_ansi) + ret = 0; + else + ret = query_console_serial(&rows, &cols); + } if (ret) return;