From patchwork Fri Apr 19 06:55:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 790186 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp921988wrm; Thu, 18 Apr 2024 23:56:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU6joJTS3PJgBQLM34IFpu1V0HOMjM13Jh48Vtu8IiPJggDwNMwFP17jbIRCVJ2JybdY/IbmHzQ3xzFqlVPl8xk X-Google-Smtp-Source: AGHT+IEi4Uc76/DrV7gZAm0ZB8CFR20ucqt9f9p7j54ZJV8l/yN9ySZFd4q1DdDhISJvOOoNqSUz X-Received: by 2002:a17:906:80d2:b0:a55:83e9:f990 with SMTP id a18-20020a17090680d200b00a5583e9f990mr1116967ejx.9.1713509797743; Thu, 18 Apr 2024 23:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713509797; cv=none; d=google.com; s=arc-20160816; b=KWn5k0Yp9i83oW74OfBVqFeVAuZOddTS1ApjP8QI+TV473Sj0rB+0bACBw33d9gcYN 50s/jOoomILAb+SLGgsJQuIyGA+ncwYAsoDj2ebfYGGaCj1YjiegIAgW3/glOJfQ8DYH AolvgRPGKpyjwwUZqxBnfuDrxe9RFJ7huFamLYP9DZiAqW7RJT24chB0V/ZK68iGUXca 8VgNiNcq1sZn4S6//F+lFWgjan4IZIh/THVqcKSjT6z4yGXXoNp3EsXV2wNZQKg4+RWI ZCEFBKFt927OaRvESdL8jPUvQBD01zHj4lOr0weelkwByBbGzOuc6E+VDkEtAqPyF3VT uTSQ== 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=xnomuT3jq2aOue4IEA1YbJbOPuEeZeJEyat/HuYB46c=; fh=WsxX/MtpAy/GihNoM0Uw3JmpOQd9TnDQAtsquJqrNec=; b=R7FsB7KnXkHyfJoe+EiDSAlkShYyJ/uvDlHj8Zhc2hpeAaJDzxkLDut4whEEVlgYmZ xNLAfqPOOtys4JsfapkFH7/wES/aEYp9CcSsKuj34X9DWIwkqI3+i2+bDWqFDghCpF7j p5xU/6gUM2rXBAza2KWRdB1dsOFYXH8QtvjFh9cX6G8+G3TBMhlM+TUf0dnM3Wy8uqD5 2glBCvclT0laaxIKboj8xkfrw1KI936kLJmosranixWsrTD5kV4eGY1iQVHlZNnhzBCd TVVa6TkfWRF8ORwOmICmvU8WiE9DYMTo+XHucElVZBeMO8Ed18w1Wtm1rr3/gTI64onA cMPA==; 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 mf22-20020a170906cb9600b00a51d3658a7asi1829338ejb.594.2024.04.18.23.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 23:56:37 -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 3B70C886C8; Fri, 19 Apr 2024 08:56:16 +0200 (CEST) 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 585DC886BA; Fri, 19 Apr 2024 08:56: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=-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 5E97988010 for ; Fri, 19 Apr 2024 08:56:13 +0200 (CEST) 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 EE0332F; Thu, 18 Apr 2024 23:56:40 -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 C475A3F792; Thu, 18 Apr 2024 23:56:10 -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] sandbox: capsule: Add a config file for generating capsules Date: Fri, 19 Apr 2024 12:25:41 +0530 Message-Id: <20240419065542.1160527-4-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240419065542.1160527-1-sughosh.ganu@linaro.org> References: <20240419065542.1160527-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 Support has been added to the mkeficapsule tool to generate capsules by parsing the capsule parameters through a config file. Add a config file for generating capsules. These capsules will be used for testing the capsule update feature on sandbox platform. Enable generation of capsules through the config file on the sandbox variant. Signed-off-by: Sughosh Ganu --- configs/sandbox_defconfig | 2 + .../test_efi_capsule/sandbox_capsule_cfg.txt | 73 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 93b52f2de5..b30cd394a1 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -353,6 +353,8 @@ CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y CONFIG_EFI_CAPSULE_AUTHENTICATE=y CONFIG_EFI_CAPSULE_ESL_FILE="board/sandbox/capsule_pub_esl_good.esl" +CONFIG_EFI_CAPSULE_CFG_FILE="test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt" +CONFIG_EFI_USE_CAPSULE_CFG_FILE=y CONFIG_EFI_SECURE_BOOT=y CONFIG_TEST_FDTDEC=y CONFIG_UNIT_TEST=y diff --git a/test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt b/test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt new file mode 100644 index 0000000000..01040eb6b3 --- /dev/null +++ b/test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt @@ -0,0 +1,73 @@ +{ + image-index: 1 + image-guid: 3673B45D-6A7C-46F3-9E60-ADABB03F7937 + payload: u-boot_bin_env.itb + capsule: Test04 + +} +{ + image-index: 1 + image-guid: 058B7D83-50D5-4C47-A195-60D86AD341C4 + payload: u-boot_bin_env.itb + capsule: Test05 + +} +{ + image-index: 1 + image-guid: 058B7D83-50D5-4C47-A195-60D86AD341C4 + payload: u-boot_bin_env.itb + capsule: Test05 +} +{ + image-index: 1 + monotonic-count: 1 + private-key: SIGNER.key + pub-key-cert: SIGNER.crt + image-guid: 3673B45D-6A7C-46F3-9E60-ADABB03F7937 + payload: u-boot_bin_env.itb + capsule: Test13 +} +{ + image-index: 1 + monotonic-count: 1 + private-key: SIGNER2.key + pub-key-cert: SIGNER2.crt + image-guid: 3673B45D-6A7C-46F3-9E60-ADABB03F7937 + payload: u-boot_bin_env.itb + capsule: Test14 +} +{ + image-index: 1 + fw-version: 5 + image-guid: 3673B45D-6A7C-46F3-9E60-ADABB03F7937 + payload: u-boot_bin_env.itb + capsule: Test104 +} +{ + image-index: 1 + fw-version: 2 + image-guid: 3673B45D-6A7C-46F3-9E60-ADABB03F7937 + payload: u-boot_bin_env.itb + capsule: Test105 + +} +{ + image-index: 1 + fw-version: 5 + monotonic-count: 1 + private-key: SIGNER.key + pub-key-cert: SIGNER.crt + image-guid: 3673B45D-6A7C-46F3-9E60-ADABB03F7937 + payload: u-boot_bin_env.itb + capsule: Test114 +} +{ + image-index: 1 + fw-version: 2 + monotonic-count: 1 + private-key: SIGNER.key + pub-key-cert: SIGNER.crt + image-guid: 3673B45D-6A7C-46F3-9E60-ADABB03F7937 + payload: u-boot_bin_env.itb + capsule: Test115 +}