From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: ANB0VdazhsYVZqB0xsW+kPpZJvoCE7wjTOLYT3rXWse6kiBYRc/DsTZAatgoUXJ+eywilIPDxESmKg== 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 Cc: Jaben Carsey , Ruiyu Ni , Alexander Graf , Heinrich Schuchardt , AKASHI Takahiro , Michael D Kinney , Andrew Fish , Laszlo Ersek Message-ID: <20180905172546.hxc2vqn6pgmr2zqs@bivouac.eciton.net> MIME-Version: 1.0 User-Agent: NeoMutt/20170113 (1.7.2) Subject: 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:25:52 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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