From patchwork Wed Mar 27 10:48:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 783121 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2128035wrt; Wed, 27 Mar 2024 03:49:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUR27Oqkdq3PDMfCZKh0iLwTJgvNZDxVNNHeTfCkFEgVtFgy/Yn+lAq6GVYViglBYjQb9AFvOyh70jXpg4nX/dT X-Google-Smtp-Source: AGHT+IGkXIi9/EHZkLw7GxTxPQfqMjregoOY0KXTaf2wuA9kfUaxUmS/89tBTVXAi5nJVuUDF6IC X-Received: by 2002:a05:600c:2157:b0:414:869b:dbd9 with SMTP id v23-20020a05600c215700b00414869bdbd9mr1717581wml.9.1711536566774; Wed, 27 Mar 2024 03:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711536566; cv=none; d=google.com; s=arc-20160816; b=m5P46mPG/vuFl6oZpJjfk3LLVZUCuZGTuapMnced7/jCfnru5P6U4ndhK8WNf8cre5 br0uT0yNG83reN1c3gFRj0OdPh03UWmtacC9yvqBVfqPa24ZxLkXak1+Vc+WwXGghx6/ s/idasp10wwxRkOrAN+c7+7N6hkawtk/v6wfig+kxZZNEsC6vjCFm04NCSJd8TJxB+F8 G13YHT8R9Pf7HxfFqUNPV1LPFhKdcYNCOUbBja0Lap7olka/fP5+IBpqp7UUR2rtZT3m +iFIKAcr0EXbkkxghn2SbNLUV/R6E82GsLSfWniX5ZTh+ibMcgYw1mXqfKunX8TcHkSY UuIQ== 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=ufnH01iN7VLL5SlldBoDkUzZSlpUmJ3IR8c6qNIlNrU=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=OmJblic+d0Qge+TPRVWw5XcUiBawOb0hecPYx4uI7q3ZgEhjSRBqQpPAuo99AW/PZd 2RpDOH5vDGESjALRmJt3mGDnY9y5+wVGCU+gw4wse+n5LwsdqQXeuN8fIStViYI/mBcR NW0W1XPNezqnuX43Qw+z1z0hd92mzCTt7cvC7GZoD04m5Iqk5SwHRcfvV/ZNtqv4zYyD ia0WP4G/DiV8DA5z+208nbUm13LHnENHZEH+83h1JtzWMy2GV05Ku/HXOOXfSpPZ2KCu +Hy/QMRCfLynJ3OrSR45erdT6kfOPUg3WoI2eJrWU3cgWPzy2DCE4tnI66iGSkItUwSP co1g==; 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 p8-20020a05600c418800b004148b8a2801si676208wmh.217.2024.03.27.03.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 03:49:26 -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 AB67A8808A; Wed, 27 Mar 2024 11:49:20 +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 41B4988089; Wed, 27 Mar 2024 11:49:19 +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 06AA08780A for ; Wed, 27 Mar 2024 11:49:17 +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 6F7922F4; Wed, 27 Mar 2024 03:49:50 -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 686783F694; Wed, 27 Mar 2024 03:49:14 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH v2 1/4] sandbox: capsule: remove capsule related configs Date: Wed, 27 Mar 2024 16:18:59 +0530 Message-Id: <20240327104902.905144-2-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327104902.905144-1-sughosh.ganu@linaro.org> References: <20240327104902.905144-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 --- Changes since V1: None 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 Wed Mar 27 10:49:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 783122 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2128090wrt; Wed, 27 Mar 2024 03:49:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVAD8BMFYrQkuu98/4VnF6kzgPSMn8fXdFSX0u4oeNmliUpbEW71WjPbELd5bzYHOV++oYxnUPeD15JsRFD8fXm X-Google-Smtp-Source: AGHT+IHzC8UBrHqVX61Npr3mbmoI56ynFJa0PAxD7f0lCBmrsrZAUj1QWgWaUtqXiIaP+GCPlV7W X-Received: by 2002:a5d:5245:0:b0:341:c15c:64d2 with SMTP id k5-20020a5d5245000000b00341c15c64d2mr803250wrc.32.1711536575257; Wed, 27 Mar 2024 03:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711536575; cv=none; d=google.com; s=arc-20160816; b=zrDqNezKmDQKcTr57cwCOikEZS6KA9Nb1yDOP1icrQ66furqASgMTvfb/kqahL9IS2 m8eqzjbEVBiMorclzG9jnhNGbdmSWmzx8KCGwXBTmJRFTIudhGk54CvhLbkYC+NtwGEx lu4F63BJKBdO/xoXEN2pmHbT2uVHuOEJXA8beF0iRLzB7qm/o8zq6veG5PRKi8wig0ak bR2CUYUNZvcO4ccQ2wM/T5IYKIuNUzbOnAvRBRyoTAW2N4UWwpM8rHKNdxaQaewro21f KaVb6wf9YLMpPMUEwEiODN4GJ9tvZ1BVJpL4YoMwQ6PBXvyS/6modTVHnv0SatVoi9Z1 GaaQ== 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=WG108d4+rm4YWJrOz5oREpH3YRfsv8pIxkm9YyPousU=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=JZ8Z0fOaidaeNRaK3P93Ua/1tD3kUynkElyff3ToKQ7lZq2NXgNo+g/04zW0+WzOzA 9jd34g8qdX7uWQSHcVURlIrDOl9E2iTxXVlS9JOyZDRK/V/yATM2wpyxCRH+xxPAlx8b f+Ksg5IxHhKb9xtyUClwIft4tjWSUOtBz3xX0MnwhzPdVz2s7PpXbuCpnkz2nAeXgdAJ eYhQwYfhfRvgRTbXnA29g3k/Hcy23RU2j0r6kS80mQJM70T7piK2kseMtvQ+NQifSffK 1tUWc7M4pzf0IKMfZ+EUtetbYGAzL2XAsRGHeRkDkcV4AgNtaVLzsas+F2t8s8TBGbf8 tPtA==; 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 g12-20020a5d540c000000b0033edbd5d130si6182015wrv.617.2024.03.27.03.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 03:49:35 -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 1F4B988096; Wed, 27 Mar 2024 11:49:23 +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 DF5DF880A1; Wed, 27 Mar 2024 11:49:21 +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 A98468780A for ; Wed, 27 Mar 2024 11:49:19 +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 32E352F4; Wed, 27 Mar 2024 03:49:53 -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 E2BB93F694; Wed, 27 Mar 2024 03:49:16 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH v2 2/4] sandbox: capsule: binman: generate some capsules as part of build Date: Wed, 27 Mar 2024 16:19:00 +0530 Message-Id: <20240327104902.905144-3-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327104902.905144-1-sughosh.ganu@linaro.org> References: <20240327104902.905144-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 raw(non FIT payload) 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 capsules from the build directory. Signed-off-by: Sughosh Ganu --- Changes since V1: * Fix the typo in the commit message about raw capsules being generated as part of the build, and not signed capsules. 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 Wed Mar 27 10:49:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 783123 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2128160wrt; Wed, 27 Mar 2024 03:49:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfkbtNX4IswHs9nmpAxzZgxopt7uyqUpd+tEAy/gmp3+LGkH9dOeMblMD+dfGwc6KVPCULICP3DKgn4FMSnzAa X-Google-Smtp-Source: AGHT+IGNT4Qd7ClTcHzMF4v/YPo/vbhZuCUN8dWVGoUenP0jeQcX0fh6wJdQgl4iDIeJcYfE+MrC X-Received: by 2002:adf:f686:0:b0:33d:873a:616 with SMTP id v6-20020adff686000000b0033d873a0616mr697767wrp.64.1711536584623; Wed, 27 Mar 2024 03:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711536584; cv=none; d=google.com; s=arc-20160816; b=llbbwg6fhQv+3TZWZH13zTiwClIfEGWkoFkw5Afb+Yz5gq+CHcqIvIuG3es8JVKagG iDz7whBRSJbCF2WYdz8rsBm68aOYnf/RK7V7l/MzarS3qa1mgefg/IYF7tMiJipzVt2G eljCBOj1JED3MtingzWX7IaUhGFt0/dytpb0a36+29Fek6mi0Ck04XA6aJKVor0slrrC hKRd54Y83zH1WIa7RmWmIWcZ9oJruhR06VuLCfm8+eaFKaKOCNRvlioCSvGXZ60/NJb9 ZsvhsBUudX3oUvg3yqUB7kqxB/vNheLAHYrKQPJJ8R1dlrseI+sQ+aKtbTN65g75Hp4E 17vg== 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=yDrBWIm8MOhvrjmoz6RbnYM9zDhpiaRNVPQ456ejV4U=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=J5VU4lvF97egZZB7ETqDO1plbhaCi6y3KAtwEMScPBHThGMDP/JE+SA75393fyVIGu sIB9cRiGzdHQAIHypqWdT696I3NAeePlWCGzRpVIp/gE6gbNLqn5rNMJQVIenBWpG578 DyQLtKtgqcoDKnieAGa9UpN+FirYeuKLM/4sT+3vkbmRP1uLz4HmA19G6b8K6xd6j8zg jZm1RuaVADLsWeQCSJvqQ941xdu1KaBohfWHaItb31Wz6UZ2uhShvcyA+vWyzkJzvZje f8uHaGtRGbD3DrNxUDwUE8yjWT/6UcbwJRDJy/ouwDNWNT9xJhZers+e/NvobKVs1G+r a0Rw==; 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 c7-20020adfc6c7000000b0033e10ba9717si6216738wrh.727.2024.03.27.03.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 03:49:44 -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 845728804C; Wed, 27 Mar 2024 11:49:24 +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 086028780A; Wed, 27 Mar 2024 11:49:24 +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 26012880A1 for ; Wed, 27 Mar 2024 11:49:22 +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 ACBC72F4; Wed, 27 Mar 2024 03:49:55 -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 A5E693F694; Wed, 27 Mar 2024 03:49:19 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Tom Rini , Sughosh Ganu Subject: [PATCH v2 3/4] capsule: add the generated capsules to gitignore Date: Wed, 27 Mar 2024 16:19:01 +0530 Message-Id: <20240327104902.905144-4-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327104902.905144-1-sughosh.ganu@linaro.org> References: <20240327104902.905144-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 --- Changes since V1: None .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 Wed Mar 27 10:49:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 783124 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2128207wrt; Wed, 27 Mar 2024 03:49:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXZoSn2yTmG0EqFC4uaFB4EuiEMak5G5vtZRpsEbeq3S/LC9rk/cvVRHI976LZW/jCQiELHLbFrGmJrqOZ6k7v/ X-Google-Smtp-Source: AGHT+IEqwg+BwSiN62CN4H+TtcjROF2e8kU/Ci7dJCHPmQg9EQazCQxz4MuEPrE3dNTdbE8QTsRs X-Received: by 2002:a5d:5988:0:b0:33d:b014:9e3a with SMTP id n8-20020a5d5988000000b0033db0149e3amr917132wri.56.1711536593832; Wed, 27 Mar 2024 03:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711536593; cv=none; d=google.com; s=arc-20160816; b=c1/uI7Z1j4ZwEzSPn2s/ONPE2b6s+t6Oh9SbufQICmRV+ATKx+DW2ifbne29wuKd8e HjqmcpVpupu/rCxEPAsKWdT/Fv7QYPdCkMjtLjvc9uBOrBP67SHi1hxSr1BzPyE+jUMH coMk2MAMmXeJCQ1XlXPl+98yLSk5UFE9tKjZJzXXg6mq2eJy5HW2hxhIXQ6wpCeOWrgZ AqQfw7mdnsoyAVbYsdmu2A1Md5mC7cxt4Ig6f7r5VC5N0hevrHkd0dhZWdgBRz0GT6Cw 8gB41tzlT9oeixL+u4MqT0wCKl1O3/glQFSVByFl9/Y2P5eJKFg/BE3bwhhEU6XFh4rQ Pesw== 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=RB/JR5KtO0nmIrJACr4NtpUeYbCb+NgLa6ys3EzIMkk=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=AkPmhmVZ+84QwjAlc1KvfFJqUVgDTpe6od/ZiP5sEVmvMPE+HHNNxkVTuAGFw9yf2E 2vGNeRnDRMy/4VnMcCws/JQTSfIM2igHUG57hFMMSoCGpNCGTI8He1tNs8GGAqA7AfLu /ND9j7plZG6fg57iroday1LT0/sNphvO1bXxCT96uC4XmqMXwJY5QSBoaiknggmCwOzw 0lS4CxYJPgj2pSCw1SEH15wGXREG/Qbq0yf8AHXw9OTRXFVGAHpO0iJmrbHmdGN/wPms 4hIK9O7P1GBqMkgCGg6jGi8ZxXTVLe0QLUOBlujxbwJrigZjKHNYCsgNyXpGRld9yiZH 1Q5Q==; 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 m1-20020a5d4a01000000b0033dc2c4d179si6290117wrq.856.2024.03.27.03.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 03:49:53 -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 EBF8A88089; Wed, 27 Mar 2024 11:49: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 7E538880AA; Wed, 27 Mar 2024 11:49: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 A0B2D880A3 for ; Wed, 27 Mar 2024 11:49: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 333702F4; Wed, 27 Mar 2024 03:49:58 -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 2BCFB3F694; Wed, 27 Mar 2024 03:49: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 v2 4/4] capsule: Makefile: add the generated files to CLEAN_FILES list Date: Wed, 27 Mar 2024 16:19:02 +0530 Message-Id: <20240327104902.905144-5-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327104902.905144-1-sughosh.ganu@linaro.org> References: <20240327104902.905144-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 --- Changes since V1: None 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 \