Discussion:
Inclusion of UEFI shell in Linux distro iso
(too old to reply)
Keshav P R
2012-01-18 02:47:11 UTC
Permalink
Hi,
Few questions (in no particular order) -

1. Is it ok for me to bundle UEFI Shell in Arch Linux distro iso? I
guess the BSD license does not cause an issue here.

2. If yes, which one to use - newer ShellBinPkg (better?) or old
EdkShellBinPkg (Full Shell in either case)?

3. The shell binaries are not tied to Tianocore firmwares (DUET,
OVMF), right? The shell will be used in real hardware firmware (mostly
SandyBridge) like Asus and MSI motherboards (AMI Aptio UEFI 2.3) and
Lenovo/Dell (Phoenix SecureCore Tiano UEFI 2.1+)

4. Which shell better supports "bcfg" and "edit" commands?

5. How do I access the help text of bcfg command? "help bcfg" or "bcfg
-?" simply list what the command is used for. "bcfg --help", "bcfg -h"
(unix style) or "bcfg /?" (windows style) shows nothing. (in
ShellBinPkg Full shell).

The only documentation regarding the shell commands is the UEFI Shell
specification. It would be nice if the command help text were included
in the shell binaries. Thanks in advance.

Regards.

Keshav
Richardson, Brian
2012-01-18 16:47:18 UTC
Permalink
The BSD license used for TianoCore should not restrict distribution of the shell.

I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).

The shell binary is compiled to run independent of the firmware. You can test this by putting the shell on a FAT file system (USB stick, hard drive partition) as /efi/boot/bootx64.efi and then booting to it on a UEFI BIOS.

Help text for any shell utility is "help utilname". Just using "help" produces a list of all available shell commands.

Thanks ... br
---
Brian Richardson -- ***@intel.com -- Twitter: intel_brian
Office: (253) 371 9978 -- Cell: (678) 234-3215

-----Original Message-----
From: Keshav P R [mailto:***@gmail.com]
Sent: Tuesday, January 17, 2012 9:47 PM
To: edk2-***@lists.sourceforge.net
Subject: [edk2] Inclusion of UEFI shell in Linux distro iso

Hi,
Few questions (in no particular order) -

1. Is it ok for me to bundle UEFI Shell in Arch Linux distro iso? I guess the BSD license does not cause an issue here.

2. If yes, which one to use - newer ShellBinPkg (better?) or old EdkShellBinPkg (Full Shell in either case)?

3. The shell binaries are not tied to Tianocore firmwares (DUET, OVMF), right? The shell will be used in real hardware firmware (mostly
SandyBridge) like Asus and MSI motherboards (AMI Aptio UEFI 2.3) and Lenovo/Dell (Phoenix SecureCore Tiano UEFI 2.1+)

4. Which shell better supports "bcfg" and "edit" commands?

5. How do I access the help text of bcfg command? "help bcfg" or "bcfg -?" simply list what the command is used for. "bcfg --help", "bcfg -h"
(unix style) or "bcfg /?" (windows style) shows nothing. (in ShellBinPkg Full shell).

The only documentation regarding the shell commands is the UEFI Shell specification. It would be nice if the command help text were included in the shell binaries. Thanks in advance.

Regards.

Keshav
Keshav P R
2012-01-18 17:32:29 UTC
Permalink
On Wed, Jan 18, 2012 at 22:17, Richardson, Brian
Post by Richardson, Brian
The BSD license used for TianoCore should not restrict distribution of the shell.
I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).
The shell binary is compiled to run independent of the firmware. You can test this by putting the shell on a FAT file system (USB stick, hard drive partition) as /efi/boot/bootx64.efi and then booting to it on a UEFI BIOS.
Help text for any shell utility is "help utilname". Just using "help" produces a list of all available shell commands.
Not for many commands. Only few commands like memmap actually show the
help text. For other commands (including bcfg) only a single line
description of what the command does is printed. I obtained the
command options from
http://software.intel.com/en-us/articles/efi-shells-and-scripting/ ,
http://www.hpuxtips.es/?q=node/293 , and the UEFI Shell Specification
2.0 .

Thanks.

Keshav
Richardson, Brian
2012-01-18 18:05:32 UTC
Permalink
If the help text is omitted, that means the developer did not properly define it in the program. If it is inserted into the program properly then it is automatically part of the help system. Items like this can be reported as bugs at tianocore.org. Thanks ... br

-----Original Message-----
From: Keshav P R [mailto:***@gmail.com]
Sent: Wednesday, January 18, 2012 12:32 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso
Post by Richardson, Brian
The BSD license used for TianoCore should not restrict distribution of the shell.
I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).
The shell binary is compiled to run independent of the firmware. You can test this by putting the shell on a FAT file system (USB stick, hard drive partition) as /efi/boot/bootx64.efi and then booting to it on a UEFI BIOS.
Help text for any shell utility is "help utilname". Just using "help" produces a list of all available shell commands.
Not for many commands. Only few commands like memmap actually show the help text. For other commands (including bcfg) only a single line description of what the command does is printed. I obtained the command options from http://software.intel.com/en-us/articles/efi-shells-and-scripting/ ,
http://www.hpuxtips.es/?q=node/293 , and the UEFI Shell Specification
2.0 .

Thanks.

Keshav
El-Haj-Mahmoud, Samer
2012-01-18 18:11:28 UTC
Permalink
In Shell 2.0 you need to do "help utilname -v" or "help utilname -verbose" to get the full help



-----Original Message-----
From: Richardson, Brian [mailto:***@intel.com]
Sent: Wednesday, January 18, 2012 12:06 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso

If the help text is omitted, that means the developer did not properly define it in the program. If it is inserted into the program properly then it is automatically part of the help system. Items like this can be reported as bugs at tianocore.org. Thanks ... br

-----Original Message-----
From: Keshav P R [mailto:***@gmail.com]
Sent: Wednesday, January 18, 2012 12:32 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso
Post by Richardson, Brian
The BSD license used for TianoCore should not restrict distribution of the shell.
I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).
The shell binary is compiled to run independent of the firmware. You can test this by putting the shell on a FAT file system (USB stick, hard drive partition) as /efi/boot/bootx64.efi and then booting to it on a UEFI BIOS.
Help text for any shell utility is "help utilname". Just using "help" produces a list of all available shell commands.
Not for many commands. Only few commands like memmap actually show the help text. For other commands (including bcfg) only a single line description of what the command does is printed. I obtained the command options from http://software.intel.com/en-us/articles/efi-shells-and-scripting/ ,
http://www.hpuxtips.es/?q=node/293 , and the UEFI Shell Specification
2.0 .

Thanks.

Keshav

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Richardson, Brian
2012-01-18 20:25:43 UTC
Permalink
Yes, that is an important distinction for UEFI Shell 2.0. You can also do "help utilname -v -b" to break on each screen (similar to the 'more' command).

-----Original Message-----
From: El-Haj-Mahmoud, Samer [mailto:samer.el-haj-***@hp.com]
Sent: Wednesday, January 18, 2012 1:11 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso

In Shell 2.0 you need to do "help utilname -v" or "help utilname -verbose" to get the full help



-----Original Message-----
From: Richardson, Brian [mailto:***@intel.com]
Sent: Wednesday, January 18, 2012 12:06 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso

If the help text is omitted, that means the developer did not properly define it in the program. If it is inserted into the program properly then it is automatically part of the help system. Items like this can be reported as bugs at tianocore.org. Thanks ... br

-----Original Message-----
From: Keshav P R [mailto:***@gmail.com]
Sent: Wednesday, January 18, 2012 12:32 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso
Post by Richardson, Brian
The BSD license used for TianoCore should not restrict distribution of the shell.
I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).
The shell binary is compiled to run independent of the firmware. You can test this by putting the shell on a FAT file system (USB stick, hard drive partition) as /efi/boot/bootx64.efi and then booting to it on a UEFI BIOS.
Help text for any shell utility is "help utilname". Just using "help" produces a list of all available shell commands.
Not for many commands. Only few commands like memmap actually show the help text. For other commands (including bcfg) only a single line description of what the command does is printed. I obtained the command options from http://software.intel.com/en-us/articles/efi-shells-and-scripting/ ,
http://www.hpuxtips.es/?q=node/293 , and the UEFI Shell Specification
2.0 .

Thanks.

Keshav

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Keshav P R
2012-01-19 16:35:51 UTC
Permalink
Post by Richardson, Brian
-----Original Message-----
Sent: Wednesday, January 18, 2012 12:32 PM
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso
Post by Richardson, Brian
The BSD license used for TianoCore should not restrict distribution of the shell.
I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).
One Archlinux user reported this with the ShellBinPkg (Shell 2.0) in
Lenovo x121e (Phoenix SecureCore Tiano)

ASSERT_EFI_ERROR (Status = Device Error)
ASSERT c:\dev\shellbindev\Build\Shell\RELEASE_VS2005\X64\ShellPkg\Application\Shell\Shell\DEBUG\AutoGen.c(403):
!EFI_ERROR (Sta

(No other output)

The EdkShellBinPkg shell works fine.

Any idea?

Regards.

Keshav
Sergey Isakov
2012-01-19 17:01:16 UTC
Permalink
I can confirm. Don't remember exactly but ShellBinPkg never works for me.
Also compiled version of ShellPkg crashes same way. Last my attempt was at November.
Now I am using old but stable GccShellPkg.

Hope some day sources of newer ShellPkg will be refined.

Sergey.
Post by Keshav P R
Post by Richardson, Brian
-----Original Message-----
Sent: Wednesday, January 18, 2012 12:32 PM
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso
Post by Richardson, Brian
The BSD license used for TianoCore should not restrict distribution of the shell.
I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).
One Archlinux user reported this with the ShellBinPkg (Shell 2.0) in
Lenovo x121e (Phoenix SecureCore Tiano)
ASSERT_EFI_ERROR (Status = Device Error)
!EFI_ERROR (Sta
(No other output)
The EdkShellBinPkg shell works fine.
Any idea?
Regards.
Keshav
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Andrew Fish
2012-01-19 17:01:16 UTC
Permalink
One issue with the edk2 shell is requires a minimum of UEFI 2.3 (not sure on exact version). It will not run on older systems. I think you get this ASSERT() if you run on a system that does not support the required Hii version.

I was able to get the edk2 shell to work on older systems, but I had to load the edk2 Hii and DevicePathToText drivers by hand first to get it to work.

To fix the ASSERT some one would need to implement an instance of the Hii Services lib that installs the protocol if it does not exist, and a NULL library that adds DevicePathToText if it does not exist would also be required.

Andrew Fish

PS For those playing at home.... I'm guessing the ASSERT is one of the dependent libraries failing. Maybe the Hii one in the build generated AutoGen.c code:

VOID
EFIAPI
ProcessLibraryConstructorList (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;

Status = UefiBootServicesTableLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = UefiRuntimeServicesTableLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = UefiHiiServicesLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = UefiLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = ShellLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = HandleParsingLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = ShellCommandLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = ShellLevel2CommandsLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = ShellLevel1CommandsLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = ShellLevel3CommandsLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = UefiShellDriver1CommandsLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = UefiShellDebug1CommandsLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = ShellInstall1CommandsLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

Status = ShellNetwork1CommandsLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);

}
Post by Keshav P R
Post by Richardson, Brian
-----Original Message-----
Sent: Wednesday, January 18, 2012 12:32 PM
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso
Post by Richardson, Brian
The BSD license used for TianoCore should not restrict distribution of the shell.
I recommend the newer ShellBinPkg, using the "full shell" profile of UEFI Shell 2.0 (supports the most commands). You can also rebuild a custom shell using the ShellPkg (build standalone or include it in the OVMF package to generate a x64 version).
One Archlinux user reported this with the ShellBinPkg (Shell 2.0) in
Lenovo x121e (Phoenix SecureCore Tiano)
ASSERT_EFI_ERROR (Status = Device Error)
!EFI_ERROR (Sta
(No other output)
The EdkShellBinPkg shell works fine.
Any idea?
Regards.
Keshav
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Keshav P R
2012-01-19 17:53:34 UTC
Permalink
Post by Andrew Fish
One issue with the edk2 shell is requires a minimum of UEFI 2.3 (not sure on exact version). It will not run on older systems. I think you get this ASSERT() if you run on a system that does not support the required Hii version.
I believe this user's current firmware (Phoenix SecureCore Tiano) is
UEFI 2.1 . Shell 2.0 works for many other uses who have AMI Aptio
firmware in Sandy Bridge desktop motherboards (which I think uses UEFI
2.3).

Anyway how to test UEFI Secure Boot using DuetPkg X64?

Regards.

Keshav
Richardson, Brian
2012-01-19 18:50:15 UTC
Permalink
I don't think DUET will work for Secure Boot testing. The variable stores in NVRAM won't be present and the system needs to be UEFI Class 3 (no legacy BIOS).

-----Original Message-----
From: Keshav P R [mailto:***@gmail.com]
Sent: Thursday, January 19, 2012 12:54 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Inclusion of UEFI shell in Linux distro iso
Post by Andrew Fish
One issue with the edk2 shell is requires a minimum of UEFI 2.3 (not sure on exact version). It will not run on older systems. I think you get this ASSERT() if you run on a system that does not support the required Hii version.
I believe this user's current firmware (Phoenix SecureCore Tiano) is UEFI 2.1 . Shell 2.0 works for many other uses who have AMI Aptio firmware in Sandy Bridge desktop motherboards (which I think uses UEFI 2.3).

Anyway how to test UEFI Secure Boot using DuetPkg X64?

Regards.

Keshav

Loading...