From patchwork Sun Mar 14 19:05:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 400116 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2862360jai; Sun, 14 Mar 2021 12:07:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT8eKHeRjqFh7VuLJn3cw7IKeLA98GC0OWDYAsiQ/HIo5wKhg8F880s+z9xzUy6jIbE/Dz X-Received: by 2002:aa7:cd54:: with SMTP id v20mr26376020edw.80.1615748830643; Sun, 14 Mar 2021 12:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615748830; cv=none; d=google.com; s=arc-20160816; b=w/J4WJoHbvKGCaCrVQysvl76IDI14QST2wKsMpCWvoXXemlyAHG192JgJ/6YeNWLL3 M3p7CNUUxJuxuTIWlQeXntMRNitFq78yHk6+2KKK7+MIgPWSmn6WDCtZsowW139R/NUe Yrhoq8VTGe1R34R5dXUeMlHVTGDd7QhSmGzivhl95w/eaBhqwLRlzgub+4XmHq2bDVV4 Web5h2sIA9AjTNksnVtj6Pygj5str/6dE9DpQE42FbVUhpUOINdXqa7PvXvaQallBbxa Ch8xUnqPu/6O2d5JA5+4CayWwn5EscEhJjPEQVsTijqpsWZxZtx5qSqw89lfLJvx1okq 6Bvw== 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=Zcnc4Csc/Cb9M8ebE50UaYFVb7EIM3whKfT6EldxJWQ=; b=S/n6yx6qidTYhX6TQu8KsJrA4tQnkBFB7Jg637NdljKSkQHW4FwbXl67eN7yaZZaBo VbC85oOPd/237RKqYwq3e16NRnghsyFmrXgIg/dnifKAuu8lJLBKLc21uLYXun7FBRG2 yJGdB3Y5iiQ4pQy96FvaIzWhV6saDDeJVzvpOvo1LJWofzrGxIBq3NFKJzGQAMlF6NvD zf+yQJs85ny/PcgjQIuZehUEhDCGghZunndy7erJwVkmwJrj/+wkkv/2qDbI6CGwu/0y C1VXY3UOi/FzS5WEL3Hncjm6nWnRiaLpZqLp44YQQ68T1FqK58e6Sla6Hg0QSwvyVOwJ ISAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yfhnd3Sw; 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 hb37si9617006ejc.81.2021.03.14.12.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 12:07:10 -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=Yfhnd3Sw; 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 2551282999; Sun, 14 Mar 2021 20:06:20 +0100 (CET) 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="Yfhnd3Sw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 09A46829A0; Sun, 14 Mar 2021 20:06:17 +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=-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-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 396D282995 for ; Sun, 14 Mar 2021 20:06:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x432.google.com with SMTP id y16so7611610wrw.3 for ; Sun, 14 Mar 2021 12:06:12 -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=Zcnc4Csc/Cb9M8ebE50UaYFVb7EIM3whKfT6EldxJWQ=; b=Yfhnd3SwNyIm3aK/9Rh5fafCqNXhu3DdJsep0Xqf98Ac+lj9QuAJUdr1kcWGjuzLR3 xLyhxiNzgofjEAA1rYqL60vWhQNDwApew2hMYeZ+fXA7UZXS4T8L4fG79rhh2v+AxE/b nmoC4GxRbbOKmzjH7DoSWV/W2/pJ9LyxtSJQNy9ZLIf6GSedPA22ltpvbOTU8K0uEpQ4 sTUgTaysJ6KIjFzWWKsnF+eCTvB7wqxAEX0LbjavVGgqXiFH0akdKWkhK+mfr+f00gsm pldSFTl4C8vswNzwTSsjd0wZiuxV3+F1Ur9qPJXGGdPE00vHCzDCyVUkGQpSXOzSzStK rT5w== 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=Zcnc4Csc/Cb9M8ebE50UaYFVb7EIM3whKfT6EldxJWQ=; b=nnxMgAJkGK8B004EW766uGXag0lulGrYkR9XL6FWPZGXlI3dBw3nKyqw39s2S9VgHb KHtXUyIJnExnDbpHllIZrLfsC7Xqu8PpX7QdOCh4LIR1UfRYRBK28k0/bHDpZQGyx5D/ diLo2rxF37DQ5XhpPU+58SRKGtCmMvnmao+K9amem/9UQdnSneiXpltGssSxysiP1fFt MtGXuQe3cZ60OzWpt9aJi6xv0WW3Y5kOmF+raV7oqu+6FTPVGOuZAkhNqnA3diA6ahoD OEJfpRxyX97CyuKTLVCNCjBmn9WxSdRH7GARVVCQo+16WWDzeEP+Zk6iRLf3LixeKN0N BIAw== X-Gm-Message-State: AOAM533imCheaKloAFX+r56HFROAoehojXaWrUzZUQdFhgTo6wamSpDY WUj+j8L79wKOEUGGVKmIdrXOd6TwdRzilYfO X-Received: by 2002:adf:9f54:: with SMTP id f20mr24149215wrg.362.1615748771834; Sun, 14 Mar 2021 12:06:11 -0700 (PDT) Received: from localhost.localdomain (ppp-94-64-113-158.home.otenet.gr. [94.64.113.158]) by smtp.gmail.com with ESMTPSA id 3sm18718029wry.72.2021.03.14.12.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 12:06:11 -0700 (PDT) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: takahiro.akashi@linaro.org, Ilias Apalodimas , Alexander Graf , Sughosh Ganu , u-boot@lists.denx.de Subject: [PATCH 6/6 v3] doc: Update uefi documentation for initrd loading options Date: Sun, 14 Mar 2021 21:05:38 +0200 Message-Id: <20210314190541.129687-7-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210314190541.129687-1-ilias.apalodimas@linaro.org> References: <20210314190541.129687-1-ilias.apalodimas@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.102.4 at phobos.denx.de X-Virus-Status: Clean Document the command line options for efidebug and initrd loading Signed-off-by: Ilias Apalodimas --- doc/uefi/uefi.rst | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) -- 2.30.2 diff --git a/doc/uefi/uefi.rst b/doc/uefi/uefi.rst index b3494c22e073..d92a32016ec0 100644 --- a/doc/uefi/uefi.rst +++ b/doc/uefi/uefi.rst @@ -180,6 +180,12 @@ Set up boot parameters on your board:: efidebug boot add -b 1 HELLO mmc 0:1 /helloworld.efi.signed "" +Since kernel 5.7 there's an alternative way of loading an initrd using +LoadFile2 protocol if CONFIG_EFI_LOAD_FILE2_INITRD is enabled. +The initrd path can be specified with:: + + efidebug boot add -b ABE0 'kernel' mmc 0:1 Image -i mmc 0:1 initrd + Now your board can run the signed image via the boot manager (see below). You can also try this sequence by running Pytest, test_efi_secboot, on the sandbox @@ -484,7 +490,21 @@ The load file 2 protocol can be used by the Linux kernel to load the initial RAM disk. U-Boot can be configured to provide an implementation with:: EFI_LOAD_FILE2_INITRD=y - EFI_INITRD_FILESPEC=interface dev:part path_to_initrd + +When the option is enabled the user can add the initrd path with the efidebug +command. + +Load options Boot#### have a FilePathList[] member. The first element of +the array (FilePathList[0]) is the EFI binary to execute. When an initrd +is specified the Device Path for the initrd is denoted by a VenMedia node +with the EFI_INITRD_MEDIA_GUID. Each entry of the array is terminated by the +'end of entire device path' subtype (0xff). If a user wants to define multiple +initrds, those must by separated by the 'end of this instance' identifier of +the end node (0x01). + +So our final format of the FilePathList[] is:: + + Loaded image - end node (0xff) - VenMedia - initrd_1 - [end node (0x01) - initrd_n ...] - end node (0xff) Links -----