From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp03.apple.com (ma1-aaemail-dr-lapp03.apple.com [17.171.2.72]) by mx.groups.io with SMTP id smtpd.web09.2752.1581730265694985170 for ; Fri, 14 Feb 2020 17:31:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=FwFEmUXV; spf=pass (domain: apple.com, ip: 17.171.2.72, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp03.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp03.apple.com (8.16.0.27/8.16.0.27) with SMTP id 01F1HJNh036357; Fri, 14 Feb 2020 17:31:03 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=6lkntdDcxyBQEim+dUq5yR8jKSxVfCyCzh+iSOsuUbE=; b=FwFEmUXV3MlGqHifjZlI+ct7B1zrUAvZlnIdJE2nFI9nZQrmLpLykkGlUSa0vRzOineM T64WxEG5tdbMTT8sVuOISBV3txKmcHC/AxSUrmtW8Hlyicp43c7E/6MR6xea6rbsiT4T yGILRdMDA2R9RV86TQk2FOsHgSVpKxB7+ubieQEJFuCD2b0xcJ23pQiNmdlx8EijLbvO iAqL4Z26rPUbPEfdqvj3Wh3tsekJNo12P+LF94iGaqtx5U5jzOlRkl0wQMSWkafzyeQj TJ1FAA5tlne9ru0VW0m15dd9BAHhxBSbSI81TjrTOyjRdUoUPZ7kGG9lCSr/S9Je2GoP Vw== Received: from rn-mailsvcp-mta-lapp03.rno.apple.com (rn-mailsvcp-mta-lapp03.rno.apple.com [10.225.203.151]) by ma1-aaemail-dr-lapp03.apple.com with ESMTP id 2y5bd5cxkx-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 14 Feb 2020 17:31:03 -0800 Received: from rn-mailsvcp-mmp-lapp04.rno.apple.com (rn-mailsvcp-mmp-lapp04.rno.apple.com [17.179.253.17]) by rn-mailsvcp-mta-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) with ESMTPS id <0Q5P010NBYVQXY40@rn-mailsvcp-mta-lapp03.rno.apple.com>; Fri, 14 Feb 2020 17:31:02 -0800 (PST) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp04.rno.apple.com by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) id <0Q5P00500YTLDA00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Fri, 14 Feb 2020 17:31:02 -0800 (PST) X-Va-A: X-Va-T-CD: 8fb6bc009c13b9fef93856a5cc2ecd1a X-Va-E-CD: 91db522e7388f410379e3fe8b4f1f0e3 X-Va-R-CD: bf9a8acd8921a8c75f1f92d3890dc214 X-Va-CD: 0 X-Va-ID: 68238071-8a8a-4610-9e61-f5cc3b3de793 X-V-A: X-V-T-CD: 8fb6bc009c13b9fef93856a5cc2ecd1a X-V-E-CD: 91db522e7388f410379e3fe8b4f1f0e3 X-V-R-CD: bf9a8acd8921a8c75f1f92d3890dc214 X-V-CD: 0 X-V-ID: 59e1306c-7442-46b2-9517-7c6b4f1b3214 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-14_09:2020-02-14,2020-02-14 signatures=0 Received: from [17.235.48.232] by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) with ESMTPSA id <0Q5P006OCYVO1X70@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Fri, 14 Feb 2020 17:31:01 -0800 (PST) Sender: afish@apple.com From: "Andrew Fish" Message-id: <72892367-4F1E-4C2F-A1FC-120E89052926@apple.com> MIME-version: 1.0 (Mac OS X Mail 13.0 \(3594.4.17\)) Subject: Re: [edk2-devel] Shell feature? Date: Fri, 14 Feb 2020 17:30:59 -0800 In-reply-to: <8A8C80EA-FDD7-4AF6-896C-7A7263446D62@apple.com> Cc: tim.lewis@insyde.com To: devel@edk2.groups.io, jim.dailey@dell.com References: <003b01d5e119$d2806700$77813500$@insyde.com> <9e939668b35c41feabb0b2590577dcfd@ausx13mps335.AMER.DELL.COM> <8A8C80EA-FDD7-4AF6-896C-7A7263446D62@apple.com> X-Mailer: Apple Mail (2.3594.4.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2020-02-14_09:,, signatures=0 Content-type: multipart/alternative; boundary="Apple-Mail=_BE2925BF-B371-407A-91D0-12033673F459" --Apple-Mail=_BE2925BF-B371-407A-91D0-12033673F459 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Jim, Sorry I forgot to hit send on this.... We have scripts that run under OS and the EFI Shell that we use for debugg= ing. So like Python in the OS you can just type the name of the script and = it works, so folks expect the same behavior at the EFI shell :).=20 Also as I mentioned in our case the interpreter was built into the shell. = In that case you don't have pathing issues to launch Python. It is a lot ea= sier to just distribute the UEFI Shell binary vs. forcing folks to have a b= unch of files in specific directories to get things to work.=20 Maybe we should futz around with the UEFI Python and wrap it in a lib so i= t can optionally get built into the UEFI Shell binary.=20 Thanks, Andrew Fish > On Feb 11, 2020, at 1:54 PM, Andrew Fish wrote: >=20 >=20 >=20 >> On Feb 11, 2020, at 1:30 PM, Jim Dailey wrote: >>=20 >> Andrew, >>=20 >> Granted such a feature would be nice, but it seems like it might be a >> fair amount of trouble just to avoid typing "python3", which could be >> aliased to something as short a "p". >>=20 >> Jim >>=20 >> -----Original Message----- >> From: devel@edk2.groups.io > On Behalf Of Tim Lewis >> Sent: Tuesday, February 11, 2020 2:28 PM >> To: devel@edk2.groups.io ; afish@apple.com= >> Subject: Re: [edk2-devel] Shell feature? >>=20 >>=20 >> [EXTERNAL EMAIL]=20 >>=20 >> Andrew -- >>=20 >> I think this is a good idea, but I think this is probably a shell spec = issue >> because I don't want competing, incompatible implementations. >>=20 >> A few other issues: I think there is a persistence issue (similar to sh= ell >> variables) so that the change could be installed and survive a reboot. = I >> also think there can be a simple shell command that manages extensions = (so >> that they can be installed by a script) >>=20 >> Tim >>=20 >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Andrew F= ish >> via Groups.Io >> Sent: Monday, February 10, 2020 12:12 PM >> To: devel@edk2.groups.io >> Subject: [edk2-devel] Shell feature? >>=20 >> I wanted to start a conversation on the mailing list prior to writing u= p a >> BZ, to make sure I'm not missing anything, or in case there is a better= way >> to implement this.=20 >>=20 >> I was thinking it would be good to have a Shell API that lets you assoc= iate >> a file type with an internal or external shell command. The Idea would = be to >> pre-pend the internal/external shell command to the file name and also = pass >> the arguments. >>=20 >> So this: >> fs0:>dump.py 1 2 3 >>=20 >> Becomes: >> fs0:>python3.efi dump.py 1 2 3 >>=20 >> Basically you just need an API like: >>=20 >> ShellAddScriptingLanguage (L".py", L"python3.efi"); >>=20 >> Seems like this could just plug into the Shell via a ShellExecute(). So= for >> example you could make Python a UEFI Shell command via a library and th= at >> library constructor could also teach the shell that a .py file could be= an >> executable? >>=20 >> Thanks, >>=20 >> Andrew Fish >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >=20 --Apple-Mail=_BE2925BF-B371-407A-91D0-12033673F459 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Jim,
Sorry I forgot to hit send on this....

We have scripts th= at run under OS and the EFI Shell that we use for debugging. So like Python= in the OS you can just type the name of the script and it works, so folks = expect the same behavior at the EFI shell :). 
Also as I mentioned in our case the inte= rpreter was built into the shell. In that case you don't have pathing issue= s to launch Python. It is a lot easier to just distribute the UEFI Shell bi= nary vs. forcing folks to have a bunch of files in specific directories to = get things to work. 

Maybe we should futz around with the UEFI Python and wrap it in a = lib so it can optionally get built into the UEFI Shell binary. 
<= div class=3D"">
Thanks,

Andrew Fish
=
On Feb = 11, 2020, at 1:54 PM, Andrew Fish <afish@apple.com> wrote:



On Feb 11, 2020, at 1:30 PM, J= im Dailey <jim.dailey@= dell.com> wrote:

Andrew,

Granted such a feature would be ni= ce, but it seems like it might be a
fair amount of trouble just to avoid typing "python3", which = could be
aliased to som= ething as short a "p".

Jim

-----Original Me= ssage-----
From: devel@edk2.gr= oups.io <devel@edk2.groups.io> On Behalf Of Tim Lewis<= /span>
Sent: Tuesday, February= 11, 2020 2:28 PM
To:=  devel@= edk2.groups.io; afish@apple.com
Subject: Re: [edk2-devel] Shell feature?



[EXTERNAL EMAIL] 

Andrew --

I think thi= s is a good idea, but I think this is probably a shell spec issuebecause I don't want competing, = incompatible implementations.
=
A few other issues: I think t= here is a persistence issue (similar to shell
variables) so that the change could be installed and= survive a reboot. I
al= so think there can be a simple shell command that manages extensions (so
that they can be installe= d by a script)

Tim

-----Original Message-= ----
From: devel@edk2.groups.io <devel@edk2.groups.io> O= n Behalf Of Andrew Fish
via Groups.Io
Sent: Mo= nday, February 10, 2020 12:12 PM
To: devel@edk2= .groups.io
Subject:= [edk2-devel] Shell feature?
<= br style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 1= 2px; font-style: normal; font-variant-caps: normal; font-weight: normal; le= tter-spacing: normal; text-align: start; text-indent: 0px; text-transform: = none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0p= x; text-decoration: none;" class=3D"">I wanted to start a conversati= on on the mailing list prior to writing up a
BZ, to make sure I'm not missing anything, or in case= there is a better way
= to implement this. 

I was thinking it would be good to have a Shell API that lets= you associate
a file t= ype with an internal or external shell command. The Idea would be to=
pre-pend the internal/externa= l shell command to the file name and also pass
the arguments.

So this:
fs0:>dump.py 1  2 3=

Becomes:
fs0= :>python3.efi dump.py 1  2 3

Basically you just nee= d an API like:

ShellAddScriptingLanguage (L".py", L"python3= .efi");

Seems like this could just plug into the Shell via = a ShellExecute(). So for
example you could make Python a UEFI Shell command via a library and that=

library constructor co= uld also teach the shell that a .py file could be an
executable?

Thanks,
= Andrew Fish








--Apple-Mail=_BE2925BF-B371-407A-91D0-12033673F459--