From patchwork Fri Sep 8 11:59:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 720808 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp720404wrp; Fri, 8 Sep 2023 05:01:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhdrQj3D3VcYZk3P353/5Rd2G2/aVCiwZfTquKquM2CI+A2WYEEC4ZOKmEQG4s1km82moa X-Received: by 2002:adf:f8c9:0:b0:31d:cb67:c499 with SMTP id f9-20020adff8c9000000b0031dcb67c499mr1902981wrq.15.1694174474672; Fri, 08 Sep 2023 05:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694174474; cv=none; d=google.com; s=arc-20160816; b=BHw1dzhFo+jPkTjSpFNkC/49/Psx4jQPdNdqmRmkC/tHa8yZ7bFBBZDrRmZUp6LO1e 69QaPkUWjZHtouDXsdkUDqcyJz1lor0LMnKSYwhdXnO96Yu9d3zQnyP6Cu2RIR23MrNz axGKxhklOxXCxnneqo0ZCoWDE7eZcAG+XZDo9VzMxb9H5/idsquQBE4GaCoTFRFtn1sQ fBhi/jU2hRZgRcHqHlgSzWuXm4XCEjCq/0MObUtNo0XkzmMfe3tcbn29T+sMUzckvmIM IkOPUB7siYimKGklbJQgZUWn1HwyhOMa3XxHTcKDarAkzfmqWB8BeL94Y9fg3TnNN/Nm zhhg== 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=PaQnFVIb7NuFnkqiSd3ndzHBiJ84FSeP0xYgY12din0=; fh=lo2Vjgyv/ggZk8yIty16CtyHjEqk0MugRW6STG9XbrI=; b=BBHaD3KbGinVOJn8snj88/KPyroqZvgtXlx52MWXU2hDxnqbKVviLD+kOQItod4GRl JcoO/1gJWKAaO4XMpMInMZRA6/i6Pgx7RLoFMd8tjmgdCSKv+VylLdG0VynoVINblF2W 4R0+leGHeTMTdelHCg3gTkaqoRIpvBvbuzhzKt8WiytDqUfW51jXA75wwqti3ERjbJmG rTJ2cftwRhAayNZ2AewasfCTeneKLHj+gAPBX00N3E1eaeTWVjUdi/rR92W2bm7UKVnV MuI5r3zecFjkJJNh4v/oLtvlPPG210iGyozAGhMY18I6CDRkwOw2bs+Zd86/Id85KwMA YsYA== 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 q2-20020a5d6582000000b003197a78ea3asi722364wru.974.2023.09.08.05.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Sep 2023 05:01:14 -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 CEB1A86A3A; Fri, 8 Sep 2023 14:00:41 +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 7548A86A3A; Fri, 8 Sep 2023 14:00:40 +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 9DE1186A1D for ; Fri, 8 Sep 2023 14:00:37 +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 22266D75; Fri, 8 Sep 2023 05:01:15 -0700 (PDT) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.46.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B05C33F67D; Fri, 8 Sep 2023 05:00:34 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Tom Rini , Malte Schmidt , Sughosh Ganu Subject: [PATCH 4/8] doc: Document capsule generation through a config file Date: Fri, 8 Sep 2023 17:29:58 +0530 Message-Id: <20230908120002.29851-5-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230908120002.29851-1-sughosh.ganu@linaro.org> References: <20230908120002.29851-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 68f9b332d1..2e27ddc9c0 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 *****************************