From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::232; helo=mail-wm0-x232.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C935F2111B77A for ; Wed, 5 Sep 2018 10:41:55 -0700 (PDT) Received: by mail-wm0-x232.google.com with SMTP id q8-v6so8641392wmq.4 for ; Wed, 05 Sep 2018 10:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=z2YJxne1GWNkRCHKmdCz1CCNLTaGclFRR5d2XGyHg6s=; b=YojevgurQuD80C8v4O0PIaGL9+awMBnFptSLhQlpd/6B2T5yYHNwq6XgzgCCfBsg+6 1Sshsc+DE0QiKfrLgXVYHZf8RYs1imJiUfgfsiczmvdIO2kYrRO64DogYAzoEr8z6rsP I1dFz2lJjX2X2tLXLxoodYkLQ74x9tDol8muQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=z2YJxne1GWNkRCHKmdCz1CCNLTaGclFRR5d2XGyHg6s=; b=GgGdnAvRXc0Qac/Ny7yVwCJXk6IfI0pbpoPdiiI4y2LUR3Yrtg9L1qRLtHbBQWqZHs +5c1JfVcart/Uu0ZpsGEMk7/Kc8qgotPrn8UZ+/O+mOBDZzJqf5CHQIQ9PoWWdf86Wri G4JR8dxLMpvgqtYASs4dkribzCFgcpIv2P2r1EaHyQKAfvTQUFcF0Ac83K4V3RHz0U6e IWUrqv59slOt6qKtYD8VSBX6HZhYdqHT1KFYbaeFILdiiR3bSZw4njhZhLBi4Z3joWfs 9iwinJ7xarZoUUMdFxF+NzvP6tX1Ol2Xz6kKvwTuRRf5Kcd5XjnWMNiXBRS5fXRAEXFL ew0g== X-Gm-Message-State: APzg51A9pPxRmwcIjTEdPl4uCYQMAIXIX9zI0/wgBPlE4tZl6ckktcFV g5X6Tm1IJj+aPSeYZnJfRze1xg== X-Google-Smtp-Source: ANB0VdYPsXfVIPj+4O1nScM0WIhWJ8ZMaYXw3+QkrBet+d38eSqvtTEBS81a+xuQL215bF6Bl9YPwA== X-Received: by 2002:a1c:2283:: with SMTP id i125-v6mr987432wmi.28.1536169313486; Wed, 05 Sep 2018 10:41:53 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id y206-v6sm3465874wmg.14.2018.09.05.10.41.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Sep 2018 10:41:52 -0700 (PDT) Date: Wed, 5 Sep 2018 18:41:50 +0100 From: Leif Lindholm To: "Carsey, Jaben" Cc: "edk2-devel@lists.01.org" , "Ni, Ruiyu" , Alexander Graf , Heinrich Schuchardt , AKASHI Takahiro , "Kinney, Michael D" , Andrew Fish , Laszlo Ersek Message-ID: <20180905174150.udtzzw3pm446dwqo@bivouac.eciton.net> References: <20180905172546.hxc2vqn6pgmr2zqs@bivouac.eciton.net> <9FF5C684-0DA6-45B0-93D8-F6358ACF1C7A@intel.com> MIME-Version: 1.0 In-Reply-To: <9FF5C684-0DA6-45B0-93D8-F6358ACF1C7A@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: portability of ShellPkg X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2018 17:41:56 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 05, 2018 at 05:30:23PM +0000, Carsey, Jaben wrote: > How does removing a lib from the components section affect the shell binary output? Maybe it doesn't and I'm barking up the wrong tree? Unfortunately, the only thing that means is we don't have a trivial workaround. / Leif > Is the asset at compile time? > > Jaben > > > On Sep 5, 2018, at 10:26 AM, Leif Lindholm wrote: > > > > Hi all, > > > > (This is partly a summary of discussions that have been held on IRC > > and offline, with Alex Graf and Mike Kinney.) > > > > The UEFI Shell, as produced by the contents of ShellPkg, is needed for > > running the UEFI SCT. This has never been problematic before - but now > > we are starting to run SCT on the U-Boot implementation of the UEFI > > interfaces, certain implicit assumptions may need to be made explicit, > > and perhaps reevaluated. > > > > My feeling is the following: > > - The MinUefiShell variant should be sufficient to run SCT. > > - The UEFI Shell as provided by ShellPkg (any flavour) should run on > > any valid UEFI implementation. Where underlying functionality is > > missing for certain commands, those commands should be > > degraded/disabled to let remaining commands function. > > > > Ideally, I would like to see a Readme.md in ShellPkg, basically > > providing a mission statement. I could write one, but I expect the > > people who actually maintain it would be better suited :) > > > > We currently have an issue with running the shell on U-Boot because > > even MinUefiShell pulls in UefiShellDebug1CommandsLib.inf. This > > appears to be inadvertent, since it is also included a few lines > > further down inside an !ifndef $(NO_SHELL_PROFILES) guard. > > So I would propose the following patch (and can send it out properly > > if the maintainers agree): > > > > diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc > > index 59dd07e0ae..c852abd3f7 100644 > > --- a/ShellPkg/ShellPkg.dsc > > +++ b/ShellPkg/ShellPkg.dsc > > @@ -101,7 +101,6 @@ [Components] > > ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf > > ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf > > ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf > > - ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf > > ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf > > ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf > > > > The reason this causes a problem is because this module has a > > dependency on HobLib, which ASSERTS if it does not find any HOBs lying > > around. Since HOBs are a PI concept rather than a UEFI concept, > > ideally we would not terminate the shell if they are missing. However, > > since the HobLib is generic to EDK2, we also shouldn't just go > > stripping ASSERTs out of it. The above patch gives us a way of > > unblocking the SCT on U-Boot UEFI while we consider what to do about > > the bigger question. > > > > Thoughts? > > > > / > > Leif