From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE632C433F5 for ; Wed, 27 Oct 2021 18:35:30 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3007C60240 for ; Wed, 27 Oct 2021 18:35:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3007C60240 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 65A8D83564; Wed, 27 Oct 2021 20:35:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="P7s2Bx7P"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 37BE283569; Wed, 27 Oct 2021 20:35:09 +0200 (CEST) Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) (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 ACE0F83542 for ; Wed, 27 Oct 2021 20:34:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ua1-x935.google.com with SMTP id q13so6785225uaq.2 for ; Wed, 27 Oct 2021 11:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9Oxs7pcwpre9JGTzg4YHvtofDKvCcwZXunP+syDS8jo=; b=P7s2Bx7PxStYO8rMrjPimIdlDKvAKht3xJhv4lI/b8cdy3XtuXv7NoP1/dyR8CQJLM BzgEC4/qdq9fvFM7Z7Jxx0EXT17v5jDaIZSZkpf13Fb7xpQ9e0L1+e7dJlRb6+JUFadd h44560ViZfi6xxib1yyl1QjCKav+2R3ESfgGY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9Oxs7pcwpre9JGTzg4YHvtofDKvCcwZXunP+syDS8jo=; b=aVnXtL4ZASxaZ0JZuU9vzZxEYwZ7hu/voHSLdQwq1/F5qsY2dmnt8h79hVHWBLicl6 H/mimsUVmbxYbpVMDLe7kJ7Tmg4z8FfyQjpklBVbjsd5yWulZE7ITnkNAHy0buAq7gyT +qCDl4C0uW6iBOgJ2Ib2whyLXAuoeGQLglE/z5RrQ+WrSq97z7Ehbv5zM/8kBG7dpQbD m7t2KEwwuqWwEp3Hix0OU3tGe7KMlHzIf3wvxtC5rJQOOvzMozfmsMTS7HOPtTco0UWR 5feHcAwjlqhkJJjFa44XbZE3wcVRL3994X6w94nskhHdUdQx6DzQqneqMEPqsU33N8Mx jQ5A== X-Gm-Message-State: AOAM532PO65g/VZUUpHBXrDYK0KlmO5s8SqSy8x/CUj1SwvMsQ0zqs3Q Nsib81OVvIZJeHhq+9XOwVBlicGhD9Di4Otrf1OVwQ== X-Google-Smtp-Source: ABdhPJzPCW++UCWgi56kZEvVQCSShKsnDibYxgvcyaIZ4M7ZwyY8hsCp8MsXSlWvwXtgM+OX2OV54OPNUxJQUfxeJVk= X-Received: by 2002:a05:6130:305:: with SMTP id ay5mr21659226uab.140.1635359691192; Wed, 27 Oct 2021 11:34:51 -0700 (PDT) MIME-Version: 1.0 References: <20211023232635.9195-1-sjg@chromium.org> <20211023232635.9195-22-sjg@chromium.org> In-Reply-To: From: Simon Glass Date: Wed, 27 Oct 2021 12:34:40 -0600 Message-ID: Subject: Re: [PATCH v2 31/41] bootstd: Add an implementation of EFI boot To: Ilias Apalodimas Cc: U-Boot Mailing List , Michal Simek , Heinrich Schuchardt , Tom Rini , Daniel Schwierzeck , Steffen Jaeckel , =?UTF-8?B?TWFyZWsgQmVow7pu?= , Lukas Auer , Dennis Gilmore Content-Type: text/plain; charset="UTF-8" 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 Hi Ilias, On Wed, 27 Oct 2021 at 08:48, Ilias Apalodimas wrote: > > Hi Simon, > > On Wed, Oct 27, 2021 at 08:09:04AM -0600, Simon Glass wrote: > > Hi Ilias, > > > > On Wed, 27 Oct 2021 at 02:36, Ilias Apalodimas > > wrote: > > > > > > Hi Simon, > > > > > > On Sun, 24 Oct 2021 at 02:27, Simon Glass wrote: > > > > > > > > Add a bootmeth driver which handles EFI boot, using EFI_LOADER. > > > > > > > > In effect, this provides the same functionality as the 'bootefi' command > > > > and shares the same code. But the interface into it is via a bootmeth, > > > > so it does not require any special scripts, etc. > > > > > > > > For now this requires the 'bootefi' command be enabled. Future work may > > > > tidy this up so that it can be used without CONFIG_CMDLINE being enabled. > > > > > > I'll leave this up to Heinrich, but personally I wouldn't include this > > > patch at all. EFI has it's bootmgr which can handle booting just fine. > > > I don't see why we should duplicate the functionality. The new boot > > > method can just have an entry called 'EFI' and then let the existing > > > EFI code to decide. > > > > This is needed so that EFI boot is actually invoked. If bootmgr starts > > being used then it can still be invoked from standard boot. The point > > is that there is a standard way of booting that supports EFI and other > > things. > > This patch tries to reason about the default naming EFI imposes on it's > boot files. distro_efi_read_bootflow() will try to find files following the > EFI naming convention (e.g bootaarch64.efi, bootarm.efi etc). If those are > found it will try to boot them right? That's not the right thing to do though. > On the EFI spec these files are tried if no Boot#### variables are found. > So we can get rid of this entirely, add a dummy entry on the bootflow that > says 'boot the efi manager' (which is what the next patch does). > > The efibootmgr then will check Boot#### variables and if none are found, > it's going to fallback into loading bootaarch64.efi, bootarm.efi etc > essentially offering identical functionality. Yes that's fine, and when EFI's boot manager is in use I have a driver for that too, as you can see in the other patch. We may need to adjust the order, by the sound of it, if it needs to run before EFI things. But that is easy enough. But we do need to provide the existing functionality for now, as I understand it. > > This series is about replacing the scripts we currently have with a > > proper C implementation that uses driver model. > > Regards, Simon