From patchwork Tue Nov 21 07:00:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 745682 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1725798wrt; Mon, 20 Nov 2023 23:01:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0OBUr3Z5p8VH3f9vILotJO5Aj6Vxl0witwiuBizKXah7av06Pp7jkQI7KH7t/3w8ZEtYZ X-Received: by 2002:aa7:c90d:0:b0:548:6247:e23b with SMTP id b13-20020aa7c90d000000b005486247e23bmr1072766edt.29.1700550071228; Mon, 20 Nov 2023 23:01:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700550071; cv=none; d=google.com; s=arc-20160816; b=wS4ZqboUXxq7idAOO02mHrXNG+WvK4Zlj3YXWzBtnr5yMUEC2ayvS2I/kI/YNzY85p H0xZvD8g8LFDJlVT2okQS+QhpXqqbNdbMA6oyrwmOMWdRwngte5Y9BigBLdDQ4oSyVlx Hc+0FqBx7s9S3a+XaUP8jL/sLbuT1lw1LiLj+bg7AuSiy0cffytCsaXKEK0ulcfUKRKr BFffSa3UUs1POEDpBGYikv81L5csYXBTqAqJSB8ch2imf+lR22/pQKKvjWr8yOlK9371 LHtSEC6J2v+iWLbLzBcqTnYB/s1k9+IjddK7QbWIZc8BIbTB8d+fXbUJZ/r79fLeSN8F wneA== 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=HCKFLAyVOo38qxTcQTiN/4cLulaI69IFscIMlR1Q/0M=; fh=OiwEO3ecU/ysFuwJ4p/ZzPF8Vl0eoEBcm4GPxH0hI7s=; b=oCUSqyv8+98CNREuq7vSNqVMfp7eIWlRwsut4ImlLgjjjN+e6kZjffMxvilQA7TvoW fT49v2XAEIVNxRs7hLTJeDRFIUETUdFWcHkxu9Tb7ZGypKLMwY704K+ptc2UmrncQdXG uTOds4GiUIQXmpS76Cb1sDX6Dp/lV6aGZelyDLMWy8XqWmOaZEeUye5cJzpKirZiUn97 X9UGvqCxQIRwKYBXk6uQv0xovZbW6jMKXu/xcJD2U0fFRFoc75xdGwyxtnSsHPqaznFs Qxuy5llJ5idi6YZrUNNmMjlyiJ8/bw55EgCUdJ8xqEzwezzM54HUnQMvoW8wlUyGZOju MT0A== 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 x8-20020aa7dac8000000b0053ecb1c3ca6si5128200eds.261.2023.11.20.23.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 23:01:11 -0800 (PST) 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 F30A087440; Tue, 21 Nov 2023 08:00:59 +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 7D3D0870BE; Tue, 21 Nov 2023 08:00:58 +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,T_SCC_BODY_TEXT_LINE 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 D2AB0867E2 for ; Tue, 21 Nov 2023 08:00:53 +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 BA828FEC; Mon, 20 Nov 2023 23:01:39 -0800 (PST) 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 193043F7CE; Mon, 20 Nov 2023 23:00:50 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Tom Rini , Masahisa Kojima , Sughosh Ganu Subject: [PATCH 2/4] doc: Document capsule generation through a config file Date: Tue, 21 Nov 2023 12:30:26 +0530 Message-Id: <20231121070028.2614095-3-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231121070028.2614095-1-sughosh.ganu@linaro.org> References: <20231121070028.2614095-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 UEFI capsule can now be generate by specifying the capsule parameters through a config file. Additionally, the capsules can be generated as part of u-boot build, through binman. Highlight these changes in the documentation. Signed-off-by: Sughosh Ganu --- doc/develop/uefi/uefi.rst | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index fb16ac743a..b9a9ed5491 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -318,6 +318,76 @@ Run the following command --guid \ +Alternatively, the capsules can be generated through a config +file. When generating the capsules through a config file, the Kconfig +symbol CONFIG_EFI_CAPSULE_CFG_FILE is to be used for specifying the +path to the config file. + +The config file describes the parameters that are used for generating +one or more capsules. The parameters for a given capsule file are +specified within curly braces, in the form of "key:value" pairs. All +the parameters that are currently supported by the mkeficapsule tool +can be specified through the config file. + +The following are some example payload parameters specified through +the config file. + +.. code-block:: none + + { + image-guid: 02f4d760-cfd5-43bd-8e2d-a42acb33c660 + hardware-instance: 0 + monotonic-count: 1 + payload: u-boot.bin + image-index: 1 + fw-version: 2 + private-key: /path/to/priv/key + pub-key-cert: /path/to/pub/key + capsule: u-boot.capsule + } + { + image-guid: 4ce292da-1dd8-428d-a1c2-77743ef8b96e + hardware-instance: 0 + payload: u-boot.itb + image-index: 2 + fw-version: 7 + oemflags: 0x8000 + capsule: fit.capsule + } + { + capsule-type: accept + image-guid: 4ce292da-1dd8-428d-a1c2-77743ef8b96e + capsule: accept.capsule + } + { + capsule-type: revert + capsule: revert.capsule + } + +The following are the keys that specify the capsule parameters + +..code-block:: none + + image-guid: Image GUID + image-index: Image index value + fw-version: Image version + private-key: Path to the private key file used for capsule signing + pub-key-cert: Path to the public key crt file used for capsule signing + payload: Path to the capsule payload file + capsule: Path to the output capsule file that is generated + hardware-instance: Hardware Instance value + monotonic-count: Monotonic count value + capsule-type: Specifies capsule type. normal(default), accept or revert + oemflags: 16bit Oemflags value to be used(populated in capsule header) + +When generating capsules through a config file, the command would look +like + +.. code-block:: console + + $ mkeficapsule --cfg-file + + Capsule with firmware version *****************************