From patchwork Wed Sep 5 17:25:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 146012 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5210912ljw; Wed, 5 Sep 2018 10:25:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaGzAlUpzo0tXfwyndqiR5iDWoo3i+792JOEPYlPBEFJ3VMFrdz7H/o9nYERshJyPl3myW9 X-Received: by 2002:a63:e811:: with SMTP id s17-v6mr37631630pgh.176.1536168354347; Wed, 05 Sep 2018 10:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536168354; cv=none; d=google.com; s=arc-20160816; b=m6OX8/Y16XRpCVk80HnLe8eqPQ0VvNevhsUp09zv5p9W9aegtKP8Rc5C2kpCu+YwLc hd6ZGsRaDH0jqf4NWA4oLeaem3xl9Y0kiJHVf/alQ9LQxozWK0hm/aELQLCs3h0HePYn 7BeI6VQD/0c9sYwF2vzRMurjX1Li/h6eCfGM4t9LY7H4lqzxXEBkP1ZOeEy/XUOgG/Ck 8rKu1Ar5JJpAb2oxqkobKc7ERyOlXpm/7eVP34Q2QGIZbPy/PPtEvzCFbJuhUX56+eVU RZhuE6U9xJXSs3hP6/HKFuUROIQ/7PM6mjIfQ0R7hAAgzEazsxSkYnIIIWkVsUpFt13+ Msuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:user-agent:content-disposition:mime-version :message-id:to:from:date:dkim-signature:delivered-to; bh=hdkZymQ6+paNXIFdQsC1PZomwhcP6ro6J1sBDve3IHM=; b=TAhkrkZvHeBwWlIeq54XXzDCJbV6o4PL7FxnlnoDQyoVZEZMhQaAKzhhptTl00p4WW byiTTfjpYdgi/ZeIYs5Odyghb0VYYXGcXTOAWUf2rDl8rDf2N5iL3CC8mM65Uwkl4qgq 7woDyF+Jpg6CM1v3LbuT95KkvB7oSwmP5ZjvyqNx3mMJ6lCV6vB7eLt3YPRN93I+ggHp E3LEbdh9YgewWWu0J7+6ctaF0RlogA/O4fumGaVyQLL5/LxON9WptuRx8kFrNHRtqD2H L6sr2zTyIHAgTZL6BwJ0Uh048hapUoBh2E5Wml84hrTqtFXG369en/SspCXkUHblKCg0 lG8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VVu0jq6X; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id a186-v6si2362506pge.408.2018.09.05.10.25.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 10:25:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VVu0jq6X; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1CB152111B77A; Wed, 5 Sep 2018 10:25:53 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::42f; helo=mail-wr1-x42f.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 A16502110BD6A for ; Wed, 5 Sep 2018 10:25:51 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id n2-v6so8515047wrw.7 for ; Wed, 05 Sep 2018 10:25:51 -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:mime-version:content-disposition :user-agent; bh=bYLmh0uL4uc8W7hMhN1URSySB8BgPuwtg9CTbzDZ1QI=; b=VVu0jq6XuMYC8SP21LMLWRtbZRQK54HM2M7P20vkr8dAxZ6YwVaN1QQ3eY2AMYH/oE qPlJmTK7G//QDBUfoZI2ME58oZHY94Mym/4XxfR7iHJvL+Nk8zonnCpscNbSSEp6SwPN KuQ7tV8BAA+OZSb8oooPoZ/VNmM/WlgxSqz3w= 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:mime-version :content-disposition:user-agent; bh=bYLmh0uL4uc8W7hMhN1URSySB8BgPuwtg9CTbzDZ1QI=; b=UGgghK2jArxjR2E+RUFDUTcijvQbzu6qgxhNUhDgrIpK6T2YeC8NTEIUjK6DVa8HRr LfMWL/2iXThRThZpXo31lU/A2H6RJaKHCjSZEUlOqJi+Mpc5HC6aNDUZLwDKL+g2Lf5f v+JmUZVVA4yanYcpvBIgp9LuxE9pIfs+nzrA1Dv0nkGdVGdTx+MC7+EDDl9xBRBb3d5Y zwoSbVtVoZQHFkkoiu8Gpw/a4uMGqUu2ml8+D4hu1Dryn7acybUenrpkpiXzqUlKSlVN VryRXZ4HekeCSn8me3o0A9tr2N/K3q4Ox4DyeK6DnEopcV7AIetjqaQAYDRTd8fOgLj7 MhEg== X-Gm-Message-State: APzg51DA9+bDFf5sTGmP4g1CJ5E7qBjNrt32CuB/LcKjBjHQRzTQY2ct UsvsYg+MniRQ/IaJxpyZgEwAjQisWuU= X-Received: by 2002:a5d:5450:: with SMTP id w16-v6mr28772965wrv.4.1536168349339; Wed, 05 Sep 2018 10:25:49 -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 1-v6sm4042948wmf.47.2018.09.05.10.25.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Sep 2018 10:25:48 -0700 (PDT) Date: Wed, 5 Sep 2018 18:25:46 +0100 From: Leif Lindholm To: edk2-devel@lists.01.org Message-ID: <20180905172546.hxc2vqn6pgmr2zqs@bivouac.eciton.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Subject: [edk2] 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: , Cc: Ruiyu Ni , Michael D Kinney , Heinrich Schuchardt , Alexander Graf , Andrew Fish , AKASHI Takahiro , Jaben Carsey , Laszlo Ersek Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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): 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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