From patchwork Tue Mar 26 20:07:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 782636 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp1867492wrt; Tue, 26 Mar 2024 13:08:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUOD+QEPvXJZRPTaTsSw6O+EduXSKc1XhbusFZpuU0XsPFtVyb/U21c8lvdVdcT0MWCC80KhMNTH/cpOktaCd0H X-Google-Smtp-Source: AGHT+IFu3TKZOnG7o041dyLhyVSEo7C4TNiDBUBaQZvfSCmj4hqXau3KQmU1MrGEvDR9aYv4g9Kc X-Received: by 2002:a2e:a7d5:0:b0:2d6:b528:9cfe with SMTP id x21-20020a2ea7d5000000b002d6b5289cfemr1721451ljp.3.1711483739249; Tue, 26 Mar 2024 13:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711483739; cv=none; d=google.com; s=arc-20160816; b=MIIriy3HXzvftHO6z4Sf3wqo/5ZOGJH3dMvUCPvgetN9BgvquPZ6EHRl+m6MF9DbId x0ddUfVlrxO1Ar66poIfqhPQMOWkhmBnpXq4iX+nhhgmPgiGBtk4zi8/boQp/s4alTJC IJKAcUnrg2kEia0/fCzlHIqLiQ9WpoPnVEBCHk2sqNuw0ogGiX6kjUnEQRu2NZLzzXhz Q9PMmBRdRXKv1OQYdiUJLvXnS544TjdVjExVzY4jJTX4KAZ91lJ6P2AyoNWnMrig9lmQ KDDItJfeEC4mW0ent0LUP1zJSPp5YOMsoPBaQt3zEsFbIWx+iDNSWKYfQGY1KJ/xSv/b HlLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=DWARSdG1/WVxaMWgoIIBdQ9+zRkgGhT/s0zts5mueJ0=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=C3pJt+D9U9tKOvEa56QjM+5eyhJaiYjI7nfmJSf3LDFYtLu7zZU/B73/kJN0r6Hy/m 4TkxqayXZaU3IaAutouavDtsDEImTOcj07p0N/HIAJuUYdzRqwfswG/Xqn4dY6k2w5J+ IuzGBd0UmI9yDUnRBx+XDKFcDjztQlk3xHf0kP40o2VFGO4DnGSlzhylL5htnutpw8an Vs5362QYYQ+PjiuxE7r5Pe7Hsb2gsY37H5s53/F8vyRM/D4Tzw1DtqDffTgzMghD0hnQ 4CHEGZ1uTPsSfO63xd51vabNF9RHbeoIWxG2YStM973it5OifkqDbOxXwHmGoppLcbPt QBlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id w12-20020a05600c474c00b0041490c10001si644452wmo.110.2024.03.26.13.08.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 13:08:59 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 42BB387D6B; Tue, 26 Mar 2024 21:08:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 235E387F78; Tue, 26 Mar 2024 21:08:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 40BB787C62 for ; Tue, 26 Mar 2024 21:08:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 59D3A2F4; Tue, 26 Mar 2024 13:08:57 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8F4763F64C; Tue, 26 Mar 2024 13:08:21 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH 1/4] sandbox: capsule: remove capsule related configs Date: Wed, 27 Mar 2024 01:37:55 +0530 Message-Id: <20240326200758.833689-2-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240326200758.833689-1-sughosh.ganu@linaro.org> References: <20240326200758.833689-1-sughosh.ganu@linaro.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 capsule update testing is carried out only on the sandbox and sandbox_flattree variants. Remove the capsule update related configs from the other sandbox variants. This ensures that the capsule files are generated only on variants which are used for the feature's testing. Signed-off-by: Sughosh Ganu --- configs/sandbox64_defconfig | 5 ----- configs/sandbox_noinst_defconfig | 2 -- configs/sandbox_spl_defconfig | 2 -- configs/sandbox_vpl_defconfig | 2 -- 4 files changed, 11 deletions(-) diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index 3be9a00a85..a67f9f0265 100644 --- a/configs/sandbox64_defconfig +++ b/configs/sandbox64_defconfig @@ -134,7 +134,6 @@ CONFIG_CPU=y CONFIG_DM_DEMO=y CONFIG_DM_DEMO_SIMPLE=y CONFIG_DM_DEMO_SHAPE=y -CONFIG_DFU_SF=y CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=0 CONFIG_ARM_FFA_TRANSPORT=y @@ -267,12 +266,8 @@ CONFIG_CMD_DHRYSTONE=y CONFIG_TPM=y CONFIG_ERRNO_STR=y CONFIG_GETOPT=y -CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y -CONFIG_EFI_CAPSULE_ON_DISK=y -CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y CONFIG_EFI_SECURE_BOOT=y CONFIG_TEST_FDTDEC=y -CONFIG_FWU_MULTI_BANK_UPDATE=y CONFIG_UNIT_TEST=y CONFIG_UT_TIME=y CONFIG_UT_DM=y diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig index 137b3c6b82..f37230151a 100644 --- a/configs/sandbox_noinst_defconfig +++ b/configs/sandbox_noinst_defconfig @@ -281,8 +281,6 @@ CONFIG_TPM=y CONFIG_ZSTD=y CONFIG_SPL_LZMA=y CONFIG_ERRNO_STR=y -CONFIG_EFI_CAPSULE_ON_DISK=y -CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y CONFIG_UNIT_TEST=y CONFIG_SPL_UNIT_TEST=y CONFIG_UT_TIME=y diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index d0cd91ef4f..f7b92dc844 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -249,8 +249,6 @@ CONFIG_ZSTD=y CONFIG_SPL_LZMA=y CONFIG_ERRNO_STR=y CONFIG_SPL_HEXDUMP=y -CONFIG_EFI_CAPSULE_ON_DISK=y -CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y CONFIG_UNIT_TEST=y CONFIG_SPL_UNIT_TEST=y CONFIG_UT_TIME=y diff --git a/configs/sandbox_vpl_defconfig b/configs/sandbox_vpl_defconfig index b138b352de..72483d8ba1 100644 --- a/configs/sandbox_vpl_defconfig +++ b/configs/sandbox_vpl_defconfig @@ -252,8 +252,6 @@ CONFIG_TPM=y CONFIG_ZSTD=y # CONFIG_VPL_LZMA is not set CONFIG_ERRNO_STR=y -CONFIG_EFI_CAPSULE_ON_DISK=y -CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y CONFIG_UNIT_TEST=y CONFIG_SPL_UNIT_TEST=y CONFIG_UT_TIME=y From patchwork Tue Mar 26 20:07:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 782639 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp1867582wrt; Tue, 26 Mar 2024 13:09:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU89Jyvr2QW/rsELW+wftYC7MKojfm3BQzPFcTwXa1b6DzCOgcZCLK1l1bnP+rFYkD7A8zwMeb+JIInR4EnIO82 X-Google-Smtp-Source: AGHT+IGTx8Ow/Qx38ndp0e0dnD7qe0udQTVDHst62AantMx0QRPpnaaqjzH6B4shIYYZzO67KpP7 X-Received: by 2002:a5d:6144:0:b0:341:c15c:64d2 with SMTP id y4-20020a5d6144000000b00341c15c64d2mr7358274wrt.32.1711483751874; Tue, 26 Mar 2024 13:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711483751; cv=none; d=google.com; s=arc-20160816; b=TOY8dQkOmxXur+AorQBx7LkoCSAYrdiWRZ3RcO5K375Z4v55h3pYyySvsb8wZLm8Sy xzFzbXDjTdykHxvM34g/zkN5WnZn6eP3NBduSaMc1gW8oyTN37SO7bv/8ATszGlGkaHK TPYLX4iNsEC4foTXYSM3/O28/xRaz1qzp5/pLU1IzT3j/Hai9mkQLzpF/83VU4bAg3kM IaMNadUa1XPYVQrv9SIsgXN88IBcR0CBP/Mx1JOTEtqHFspwYYT/9g0K3z37z2W5atIt BMvVvKdMIjIgjIUZn0hr6VeUdnUhOhKO3qsuTGHnhXRnnbk8l2zNjV8OhrZmYu6i5SDI eWYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=fUIzw0hdT6TBeQhYqR6GhCYNQsuZld1P/XoCc9ZsB14=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=OFU+Yh0ntfh0LIKVkkr/MYfC/WNPu4wrTOYbJpc+JO1HR5SYDJUDaRgzzsA+nI5bA8 wTWIV10APSh+p3in8jVfDvjlD5zAsMIYikRGPTKRUPuwArPzVA4KfG+CFmcrer/jRWUY AACqF6beRr/QrM5fVR8bVka4ZDb8+/EsxYTrvGScTtw6ODrR+PYMXOPT6EYiiSkgCd1e 7RpcpSscXSLVjD2TwotVDqtd7gAJAwkdpklBIxfHoz+mdTkKRU23KW6OFtPXnWfR4dW4 zRcVjGhefq1VhcCNU7zt8gVzBCsJLAkN539WgNzDg3ayYO7Y2XN0/9AUUvihx6Yfak6Y /uaA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id w7-20020adfe047000000b0033e77510cf8si5592710wrh.440.2024.03.26.13.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 13:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B265C87FB6; Tue, 26 Mar 2024 21:08:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C5FB388035; Tue, 26 Mar 2024 21:08:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 3C5B188003 for ; Tue, 26 Mar 2024 21:08:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 773BB2F4; Tue, 26 Mar 2024 13:09:01 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 28CD13F64C; Tue, 26 Mar 2024 13:08:23 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH 2/4] sandbox: capsule: binman: generate some capsules as part of build Date: Wed, 27 Mar 2024 01:37:56 +0530 Message-Id: <20240326200758.833689-3-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240326200758.833689-1-sughosh.ganu@linaro.org> References: <20240326200758.833689-1-sughosh.ganu@linaro.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 Currently, all the capsules for the sandbox platform are generated at the time of running the capsule tests. To showcase generation of capsules through binman, generate all signed capsules needed for the sandbox platform as part of the build. This acts as an illustrative example for generating capsules as part of a platform's build. Make corresponding change in the capsule test's configuration to get these signed capsules from the build directory. Signed-off-by: Sughosh Ganu --- arch/sandbox/dts/sandbox.dts | 4 + arch/sandbox/dts/sandbox_capsule.dtsi | 169 ++++++++++++++++++ arch/sandbox/dts/test.dts | 4 + .../test_efi_capsule/capsule_gen_binman.dts | 167 +---------------- test/py/tests/test_efi_capsule/conftest.py | 1 + 5 files changed, 185 insertions(+), 160 deletions(-) create mode 100644 arch/sandbox/dts/sandbox_capsule.dtsi diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 12d3eff5fa..8392206eea 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -106,3 +106,7 @@ #if IS_ENABLED(CONFIG_SUPPORT_VPL) #include "sandbox_vpl.dtsi" #endif + +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) +#include "sandbox_capsule.dtsi" +#endif diff --git a/arch/sandbox/dts/sandbox_capsule.dtsi b/arch/sandbox/dts/sandbox_capsule.dtsi new file mode 100644 index 0000000000..34d29916b3 --- /dev/null +++ b/arch/sandbox/dts/sandbox_capsule.dtsi @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Devicetree file with binman nodes needed for generating EFI + * capsules. + * + */ + +#include + +/ { + binman: binman { + multiple-images; + }; +}; + +&binman { + capsule1 { + filename = "Test01"; + efi-capsule { + image-index = <0x1>; + image-guid = SANDBOX_UBOOT_IMAGE_GUID; + + text { + text = "u-boot:New"; + }; + }; + }; + + capsule2 { + filename = "Test02"; + efi-capsule { + image-index = <0x2>; + image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID; + + text { + text = "u-boot-env:New"; + }; + }; + }; + + capsule3 { + filename = "Test03"; + efi-capsule { + image-index = <0x1>; + image-guid = SANDBOX_INCORRECT_GUID; + + text { + text = "u-boot:New"; + }; + }; + }; + + capsule4 { + filename = "Test101"; + efi-capsule { + image-index = <0x1>; + fw-version = <0x5>; + image-guid = SANDBOX_UBOOT_IMAGE_GUID; + + text { + text = "u-boot:New"; + }; + }; + }; + + capsule5 { + filename = "Test102"; + efi-capsule { + image-index = <0x2>; + fw-version = <0xa>; + image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID; + + text { + text = "u-boot-env:New"; + }; + }; + }; + + capsule6 { + filename = "Test103"; + efi-capsule { + image-index = <0x1>; + fw-version = <0x2>; + image-guid = SANDBOX_UBOOT_IMAGE_GUID; + + text { + text = "u-boot:New"; + }; + }; + }; + + capsule7 { + filename = "Test11"; + efi-capsule { + image-index = <0x1>; + image-guid = SANDBOX_UBOOT_IMAGE_GUID; + private-key = CAPSULE_PRIV_KEY; + public-key-cert = CAPSULE_PUB_KEY; + monotonic-count = <0x1>; + + text { + text = "u-boot:New"; + }; + }; + }; + + capsule8 { + filename = "Test12"; + efi-capsule { + image-index = <0x1>; + image-guid = SANDBOX_UBOOT_IMAGE_GUID; + private-key = CAPSULE_INVAL_KEY; + public-key-cert = CAPSULE_INVAL_PUB_KEY; + monotonic-count = <0x1>; + + text { + text = "u-boot:New"; + }; + }; + }; + + capsule9 { + filename = "Test111"; + efi-capsule { + image-index = <0x1>; + fw-version = <0x5>; + image-guid = SANDBOX_UBOOT_IMAGE_GUID; + private-key = CAPSULE_PRIV_KEY; + public-key-cert = CAPSULE_PUB_KEY; + monotonic-count = <0x1>; + + text { + text = "u-boot:New"; + }; + }; + }; + + capsule10 { + filename = "Test112"; + efi-capsule { + image-index = <0x2>; + fw-version = <0xa>; + image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID; + private-key = CAPSULE_PRIV_KEY; + public-key-cert = CAPSULE_PUB_KEY; + monotonic-count = <0x1>; + + text { + text = "u-boot-env:New"; + }; + }; + }; + + capsule11 { + filename = "Test113"; + efi-capsule { + image-index = <0x1>; + fw-version = <0x2>; + image-guid = SANDBOX_UBOOT_IMAGE_GUID; + private-key = CAPSULE_PRIV_KEY; + public-key-cert = CAPSULE_PUB_KEY; + monotonic-count = <0x1>; + + text { + text = "u-boot:New"; + }; + }; + }; +}; diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index e264b29554..a012f5c4c9 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -1990,4 +1990,8 @@ #include "sandbox_vpl.dtsi" #endif +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) +#include "sandbox_capsule.dtsi" +#endif + #include "cedit.dtsi" diff --git a/test/py/tests/test_efi_capsule/capsule_gen_binman.dts b/test/py/tests/test_efi_capsule/capsule_gen_binman.dts index e8a1858509..1a62c26047 100644 --- a/test/py/tests/test_efi_capsule/capsule_gen_binman.dts +++ b/test/py/tests/test_efi_capsule/capsule_gen_binman.dts @@ -55,42 +55,6 @@ }; capsule1 { - filename = "Test01"; - efi-capsule { - image-index = <0x1>; - image-guid = SANDBOX_UBOOT_IMAGE_GUID; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule2 { - filename = "Test02"; - efi-capsule { - image-index = <0x2>; - image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID; - - text { - text = "u-boot-env:New"; - }; - }; - }; - - capsule3 { - filename = "Test03"; - efi-capsule { - image-index = <0x1>; - image-guid = SANDBOX_INCORRECT_GUID; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule4 { filename = "Test04"; efi-capsule { image-index = <0x1>; @@ -102,7 +66,7 @@ }; }; - capsule5 { + capsule2 { filename = "Test05"; efi-capsule { image-index = <0x1>; @@ -114,46 +78,7 @@ }; }; - capsule6 { - filename = "Test101"; - efi-capsule { - image-index = <0x1>; - fw-version = <0x5>; - image-guid = SANDBOX_UBOOT_IMAGE_GUID; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule7 { - filename = "Test102"; - efi-capsule { - image-index = <0x2>; - fw-version = <0xa>; - image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID; - - text { - text = "u-boot-env:New"; - }; - }; - }; - - capsule8 { - filename = "Test103"; - efi-capsule { - image-index = <0x1>; - fw-version = <0x2>; - image-guid = SANDBOX_UBOOT_IMAGE_GUID; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule9 { + capsule3 { filename = "Test104"; efi-capsule { image-index = <0x1>; @@ -166,7 +91,7 @@ }; }; - capsule10 { + capsule4 { filename = "Test105"; efi-capsule { image-index = <0x1>; @@ -179,37 +104,7 @@ }; }; - capsule11 { - filename = "Test11"; - efi-capsule { - image-index = <0x1>; - image-guid = SANDBOX_UBOOT_IMAGE_GUID; - private-key = CAPSULE_PRIV_KEY; - public-key-cert = CAPSULE_PUB_KEY; - monotonic-count = <0x1>; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule12 { - filename = "Test12"; - efi-capsule { - image-index = <0x1>; - image-guid = SANDBOX_UBOOT_IMAGE_GUID; - private-key = CAPSULE_INVAL_KEY; - public-key-cert = CAPSULE_INVAL_PUB_KEY; - monotonic-count = <0x1>; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule13 { + capsule5 { filename = "Test13"; efi-capsule { image-index = <0x1>; @@ -224,7 +119,7 @@ }; }; - capsule14 { + capsule6 { filename = "Test14"; efi-capsule { image-index = <0x1>; @@ -239,55 +134,7 @@ }; }; - capsule15 { - filename = "Test111"; - efi-capsule { - image-index = <0x1>; - fw-version = <0x5>; - image-guid = SANDBOX_UBOOT_IMAGE_GUID; - private-key = CAPSULE_PRIV_KEY; - public-key-cert = CAPSULE_PUB_KEY; - monotonic-count = <0x1>; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule16 { - filename = "Test112"; - efi-capsule { - image-index = <0x2>; - fw-version = <0xa>; - image-guid = SANDBOX_UBOOT_ENV_IMAGE_GUID; - private-key = CAPSULE_PRIV_KEY; - public-key-cert = CAPSULE_PUB_KEY; - monotonic-count = <0x1>; - - text { - text = "u-boot-env:New"; - }; - }; - }; - - capsule17 { - filename = "Test113"; - efi-capsule { - image-index = <0x1>; - fw-version = <0x2>; - image-guid = SANDBOX_UBOOT_IMAGE_GUID; - private-key = CAPSULE_PRIV_KEY; - public-key-cert = CAPSULE_PUB_KEY; - monotonic-count = <0x1>; - - text { - text = "u-boot:New"; - }; - }; - }; - - capsule18 { + capsule7 { filename = "Test114"; efi-capsule { image-index = <0x1>; @@ -303,7 +150,7 @@ }; }; - capsule19 { + capsule8 { filename = "Test115"; efi-capsule { image-index = <0x1>; diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py index dd41da9284..80b12977d6 100644 --- a/test/py/tests/test_efi_capsule/conftest.py +++ b/test/py/tests/test_efi_capsule/conftest.py @@ -85,6 +85,7 @@ def efi_capsule_data(request, u_boot_config): check_call('cd %s; ' './tools/binman/binman --toolpath %s/tools build -u -d %s/capsule_binman.dtb -O %s -m --allow-missing -I %s -I ./board/sandbox -I ./arch/sandbox/dts' % (u_boot_config.source_dir, u_boot_config.build_dir, data_dir, data_dir, data_dir), shell=True) + check_call('cp %s/Test* %s' % (u_boot_config.build_dir, data_dir), shell=True) os.environ['PYTHONPATH'] = pythonpath # Create a disk image with EFI system partition From patchwork Tue Mar 26 20:07:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 782637 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp1867498wrt; Tue, 26 Mar 2024 13:08:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCULcZehtuX+cNq+kWxugHJKPUShaOWj/Z0oikkQaLmfAy3fQ5kmbMsj1Gfb2UUUA8gwcZ8kTh7OFOqOACO4nurQ X-Google-Smtp-Source: AGHT+IEE6Jx/50fovWeGWSUyPbsik3/NI186/Hg0cDJvulUa6/nII7MRS/Wl0/vf89Obt1Oo2PE4 X-Received: by 2002:a2e:7a0e:0:b0:2d6:cb40:e0a2 with SMTP id v14-20020a2e7a0e000000b002d6cb40e0a2mr2689091ljc.53.1711483739741; Tue, 26 Mar 2024 13:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711483739; cv=none; d=google.com; s=arc-20160816; b=tbyzq3CqhpSNgDTkETDRvAaNEMN7rs5YkPeR4tUUSiDf7WWo5twyQM+CEyzuGurGCB Q0Ybi698lTnu8G1pP+AHtuWopA+Vk94kym8g1XTbrGIxGwTFvkin7+5QxK9WHoWaxZNi fdbJ+BRCkB0KkaPUPSzJ9/Lu/FWFyj8kaUynJBzmZrlpzqzn1Ad+bHDIYGiS6ZvpLlqW C5usq5FdZde2BO5pmYJLIuzeX+k/rTIV0eRVoxjpSEq1BLudN9slE4T9FONtpwya2315 xeBg+0BYy0USu+NJrrXjNgVeZx72vci9jDQF8wKi31crJ9TiZ/7AhMq7Od8UFcap9a94 djOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=1m2BIRBFqP+yy99bhbFmkd4qbJUvY8jGB55fD/7MJno=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=FX9F0PTn92vJDbQAZugSCjVLyXWjZ64x6isthosq8gmypoZMtUPHuikYTRKehK2HOQ Vg7S3XToq1FGeIVmauJYemgh34rMNn7n4L5IuZ7gXfWMRCmA9wctc9Cg6BnpFdHGPgwH 76rvMTXsHuIYg7bvz2UFnta8h42DCEkNbcY1zEqHUlBAVr9CUJEpovyCJYR4IcqKouzA 2Tp4O7mpuUpg2DbiF5XEpgMDhvqjXLgn75cl0jUcp6d+696jFZEWktT+9C4VRauqRZe6 2ch05aE1ZMeMWvqk2EhS4gGDN5JdUsC01+Ecfx4TmHTLWb+LlsMBTqVjrX//8xcY081k JruA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id t41-20020a05600c32a900b004147a9e0a6fsi4463723wmp.78.2024.03.26.13.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 13:08:59 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C9ED287FAC; Tue, 26 Mar 2024 21:08:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 4AA3E87E3D; Tue, 26 Mar 2024 21:08:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 64EE387C62 for ; Tue, 26 Mar 2024 21:08:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 92DC82F4; Tue, 26 Mar 2024 13:09:04 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 463853F64C; Tue, 26 Mar 2024 13:08:28 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH 3/4] capsule: add the generated capsules to gitignore Date: Wed, 27 Mar 2024 01:37:57 +0530 Message-Id: <20240326200758.833689-4-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240326200758.833689-1-sughosh.ganu@linaro.org> References: <20240326200758.833689-1-sughosh.ganu@linaro.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 sandbox platform build now generates a set of capsules. Put the related files generated into gitignore. Signed-off-by: Sughosh Ganu --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3301481192..94dbeb053c 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ fit-dtb.blob* /spl/ /tpl/ /defconfig +/Test* +/capsule.*.efi-capsule +/capsule*.map # # Generated include files From patchwork Tue Mar 26 20:07:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 782638 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp1867568wrt; Tue, 26 Mar 2024 13:09:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVXTs5Ptro7GPkrT7HqklCEtoWmk+cQ390+dl/1tNh8me+A+CzzuLFSZ8lKDQLH/3zIs+Pv4g96M/ssDfalrS4L X-Google-Smtp-Source: AGHT+IGf7oTaijJAXIwN4hQMQ3zIR22xukEjmMU/2K21agS8qdtTF0txpl0kOpd87fTglVfAsgKy X-Received: by 2002:a05:600c:4751:b0:414:9101:7a64 with SMTP id w17-20020a05600c475100b0041491017a64mr911830wmo.25.1711483750521; Tue, 26 Mar 2024 13:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711483750; cv=none; d=google.com; s=arc-20160816; b=zgB//nZzh8TMnGCBH8EFYz/RxK17LlPaKzWSyTw3W9Cvm6YLipq8ovbM3cFEu+WqF5 ZE7MH5sM6JKexcgMu+q+FNHEgIbAV1jUJJeZqSFlNVkOm0XrxZKxrk7lJ3bmCV9z0hv/ GTnPwINkdyEjiiglUejxF3WKDJWWkzL7PVw/7e+N7biSA1rGYTS348rn1R2+utaO5s4i 6A9IJ+Si4EHjT853ypgQlK1y/3BEigc7oRKrg3N4pkOnwa572a79ZU/qL2tsn+oQkZTW 25dMCBgCuypBgY6w7ZZWO19sqrv3On/PN7BOXeEvLzgZc9ZIzWKG1I9iJDdQYTAHaBLy 0q/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=zMtVyyU5ofA7OdBgM31H01pDXgTly3DCYIQeKI1RKSo=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=PT8/jspkjPWzGV0eyPBmCEuhA2MxVpElYKDZEQL0KabTDIMcC4wXRHGWgdhGuJv6tn IpNhQnI95l6GHjKfGfrNQ1zYsoozdEYQ4VufSveUUzKVNArE8pYNIjkzvMB6hTwfpwYn zMj94zbr/wLGgaxtuz+ysrZ2Cp9n9v044wgotg0OTGj8Zm/Cs3xgNkBMno3uAG4Gc+kz OPhfAHRjz1py3h7haWlcDvKDd6bon0R+BvDyz+dgtIDdXCazaDdMiCyUjWzJt4N3zdGy dRzFtQVonMODABPoP2m9iERdO4Cf8l0N2rNwqLgDhvJgjGCaVoiVAsQl6P+0TwJjsWuj 7vJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id o7-20020a05600002c700b00341c99468f4si3250436wry.398.2024.03.26.13.09.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 13:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5A5FB88003; Tue, 26 Mar 2024 21:08:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id B220187E3D; Tue, 26 Mar 2024 21:08:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id D3FC88802E for ; Tue, 26 Mar 2024 21:08:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0E7962F4; Tue, 26 Mar 2024 13:09:09 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 61E0B3F64C; Tue, 26 Mar 2024 13:08:31 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH 4/4] capsule: Makefile: add the generated files to CLEAN_FILES list Date: Wed, 27 Mar 2024 01:37:58 +0530 Message-Id: <20240326200758.833689-5-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240326200758.833689-1-sughosh.ganu@linaro.org> References: <20240326200758.833689-1-sughosh.ganu@linaro.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 A certain set of capsule files are now generated as part of the sandbox build. Add these files to the CLEAN_FILES list for deletion on invoking any of the cleanup targets. Signed-off-by: Sughosh Ganu --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ff003a5ad8..1df2e81654 100644 --- a/Makefile +++ b/Makefile @@ -2166,7 +2166,8 @@ CLEAN_FILES += include/autoconf.mk* include/bmp_logo.h include/bmp_logo_data.h \ mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \ itb.fit.fit itb.fit.itb itb.map spl.map mkimage-out.rom.mkimage \ mkimage.rom.mkimage mkimage-in-simple-bin* rom.map simple-bin* \ - idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb + idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb \ + Test* capsule.*.efi-capsule capsule*.map # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated spl tpl vpl \