From patchwork Tue Jul 27 09:10:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 486668 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:1185:0:0:0:0 with SMTP id f5csp37687jas; Tue, 27 Jul 2021 02:12:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiM9P6Ljw53FVPVzsdQecn0SBRt57P45trO3XPhgNi5LZuMWysd09oh4QU3StLNOuk6hjo X-Received: by 2002:a17:906:6011:: with SMTP id o17mr20434782ejj.157.1627377168391; Tue, 27 Jul 2021 02:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627377168; cv=none; d=google.com; s=arc-20160816; b=TkquWqNEL9lzC4JPghCsGK3e34Ru4l+aW6nJ5HiNLmH0ZbDmdrSiCrujLi6yMOrLym lOPL8EBMYCA8BwqTIvdvRr1bUJN2TlLaPf/ZupHdDg1M12h7Z2ZMcEbgoe5T/GtYAJ38 A61zgb3Ogu6hzjcgZkL/0mVLYp3Eun4PPAqYKeKCf8ieU03HR4GW/JUpMNaRHUoJDt1Y 5a7EDnmtBEv7Ke4KJF5+nFfibVxA9qMt2qmUDTnCkPOJMxpdRSdxsIq014VH3swIRbsG pyH4QUQm4Ewmema9LsgIuOPKR2L+AfGwSDurbeoAqtKK+JQtCCfTOmKziGXDv3UXT/Qx cedA== 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:dkim-signature; bh=E0CmJji2nnTKGZRTV6KvvICjwddAW4DDOZEG5c+nP84=; b=PPMX8UXphGM7Mt3fbn0uSGSnuftTnSxxgO0TKaLv/jYrZnrzDjEWfEMF/ShdM+44JA ++vooXCoB1u0j9wkXLx2UIXYkctKrCDsy7oARWuOZah5oc4HISRZsiM5L1oby0PLWRTQ sF3q+qKbeHNDGcrhwwa6cg9LoDQ91afvFqRMvGBlpUeV3XfrnHxb4FfzB+gn4V3NdTdZ sp3Iiie8slJfnJ2Bjq6DQGV1lIw3pl5O/yTWe3HwFgp63usU/x1TEq4rMTp4tW/jbhrm MzYWRagpme9/n+bhix+mYgD1fpUgViThVqHgNJHIrCBKSWG2Mu9uFQ7P9D/qg/d81aVu yDbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=grTBzvv8; 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=pass (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 jw8si2497456ejc.78.2021.07.27.02.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 02:12:48 -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; dkim=pass header.i=@linaro.org header.s=google header.b=grTBzvv8; 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=pass (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 C3A3383459; Tue, 27 Jul 2021 11:12:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="grTBzvv8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C4EE8345F; Tue, 27 Jul 2021 11:12:31 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 755DD83455 for ; Tue, 27 Jul 2021 11:12:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x102a.google.com with SMTP id mz5-20020a17090b3785b0290176ecf64922so3198565pjb.3 for ; Tue, 27 Jul 2021 02:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E0CmJji2nnTKGZRTV6KvvICjwddAW4DDOZEG5c+nP84=; b=grTBzvv8Y4pjIuveNfdc0IRy4JZQ3xJQ5S3harSvywkh95Bwa/KBW2407DL3dxjsPt kYvD0InyQ0jumh3KOuditvUbgpCuXJUk6LDCZApInR65gQHX3YhRia2fwdlZpXtLgizP 8t4DroG1mhZUuy6wfEzTAO1B8/4Z3wUJ7rW3JJo/jvBWX0yX9LxpfRXY7hpvxizMHtJZ e+Z/Z0A+Ece/kdryIK72wvz84emT4CmcIWz40Uix9gRh+/cRks+t29qxBFr2AMDGEVDZ ixhXdlmvkMU89HaKhXVokrhRvHxTLuR3GqYD5x3E8nPmDWfPxP+XfXtTuhlTWi5PQxhx peZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E0CmJji2nnTKGZRTV6KvvICjwddAW4DDOZEG5c+nP84=; b=Xq8K62WgBLTyLehpSxArlcw7aofLksQkpSAL+7l3bnfLBUPPH/KqB0qVbmPYmMsrPp AD/s1lIJoAS/geWnOTmagnpFXo8IKe7xUOt3q+iB7chZcYLmBGekmSvdYedRcrP8hnbg yiXTMpFcPLTAGOE3kGY29llZd93l/RgkuIEWtruWfWPXiLQLKQeZOl3iA0orWWq4ZQqf OQef0auTZmHkfLo/TQIJjSuRz6QGi9e403aNFKt4FgBXoqz6zOrivT/tU4CvFli4J+hL BHr4MFmYQQ7gHcBb7eAPKI7ifNcRUdKNGrg/FTBfiByeOr76DCQTsVFE6dr7J6Fmd6MM 2sNA== X-Gm-Message-State: AOAM5317HxtFAGiWl+SCz0cyoNNOz7YRHeILt1Ru3VAjgteiD7ASTviR 7Yibe7yTsfwWxNjp5pIMhkcA6w== X-Received: by 2002:a05:6a00:785:b029:2f7:dcbe:c292 with SMTP id g5-20020a056a000785b02902f7dcbec292mr7605436pfu.63.1627377139724; Tue, 27 Jul 2021 02:12:19 -0700 (PDT) Received: from localhost.localdomain (pdb6272ed.tkyea130.ap.so-net.ne.jp. [219.98.114.237]) by smtp.gmail.com with ESMTPSA id q13sm2008218pjq.10.2021.07.27.02.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 02:12:19 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, trini@konsulko.com, sjg@chromium.org Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v2 3/9] doc: update UEFI document for usage of mkeficapsule Date: Tue, 27 Jul 2021 18:10:48 +0900 Message-Id: <20210727091054.512050-4-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210727091054.512050-1-takahiro.akashi@linaro.org> References: <20210727091054.512050-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Now we can use mkeficapsule command instead of EDK-II's script to create a signed capsule file. So update the instruction for capsule authentication. Signed-off-by: AKASHI Takahiro --- doc/develop/uefi/uefi.rst | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) -- 2.31.0 Acked-by: Heinrich Schuchardt diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index 64fe9346c7f2..5ccb455da984 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -347,23 +347,20 @@ and used by the steps highlighted below:: -keyout CRT.key -out CRT.crt -nodes -days 365 $ cert-to-efi-sig-list CRT.crt CRT.esl - $ openssl x509 -in CRT.crt -out CRT.cer -outform DER - $ openssl x509 -inform DER -in CRT.cer -outform PEM -out CRT.pub.pem - - $ openssl pkcs12 -export -out CRT.pfx -inkey CRT.key -in CRT.crt - $ openssl pkcs12 -in CRT.pfx -nodes -out CRT.pem - -The capsule file can be generated by using the GenerateCapsule.py -script in EDKII:: - - $ ./BaseTools/BinWrappers/PosixLike/GenerateCapsule -e -o \ - --monotonic-count --fw-version \ - --lsv --guid \ - e2bb9c06-70e9-4b14-97a3-5a7913176e3f --verbose \ - --update-image-index --signer-private-cert \ - /path/to/CRT.pem --trusted-public-cert \ - /path/to/CRT.pub.pem --other-public-cert /path/to/CRT.pub.pem \ - +The signed capsule file can be generated by using tools/mkeficapsule. +To build this tool, enable:: + + CONFIG_TOOLS_MKEFICAPSULE=y + CONFIG_TOOLS_LIBCRYPTO=y + +To generate and sign the capsule file:: + + $ mkeficapsule --monotonic-count 1 \ + --private-key CRT.key \ + --certificate CRT.crt \ + --index 1 --instance 0 \ + [--fit | --raw ] \ + Place the capsule generated in the above step on the EFI System Partition under the EFI/UpdateCapsule directory