public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* how to create environmental variable for Shell
@ 2017-11-03  5:00 Tiger Liu
  2017-11-03 11:48 ` Jim.Dailey
  0 siblings, 1 reply; 6+ messages in thread
From: Tiger Liu @ 2017-11-03  5:00 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hi, experts:
I have a question about creating shell’s environmental variable.
Such as : StartupDelay

I tried to create this variable at uefi boot phase.
……
              TmpVal = 2;
              Status =  gRT->SetVariable (
                                   L"StartupDelay",
                                   &gEfiGlobalVariableGuid,
                                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS |EFI_VARIABLE_NON_VOLATILE,
                                   sizeof (TmpVal),
                                   &TmpVal
              );
……

When boot to shell, it still delays 5 seconds.

I tried to use shell cmd ‘set’, then it’s ok, shell’s default delay switched to 2 seconds.

I used dmpstore cmd to list current system’s variables, and found 2 StartupDelay variables:
Efi:StartupDelay
SEnv:StartupDelay

So, my question is:
How to create “SEnv:StartupDelay” variable in UEFI BIOS code.

Thanks

Best wishes,


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to create environmental variable for Shell
  2017-11-03  5:00 how to create environmental variable for Shell Tiger Liu
@ 2017-11-03 11:48 ` Jim.Dailey
  2017-11-03 11:54   ` Jim.Dailey
  0 siblings, 1 reply; 6+ messages in thread
From: Jim.Dailey @ 2017-11-03 11:48 UTC (permalink / raw)
  To: TigerLiu; +Cc: edk2-devel

Dell - Internal Use - Confidential  

You need to use the shell's GUID, gShellVariableGuid, if you want to
create a shell variable.

Regards,
Jim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tiger Liu
Sent: Friday, November 3, 2017 12:01 AM
To: edk2-devel@lists.01.org
Subject: [edk2] how to create environmental variable for Shell

Hi, experts:
I have a question about creating shell’s environmental variable.
Such as : StartupDelay

I tried to create this variable at uefi boot phase.
……
              TmpVal = 2;
              Status =  gRT->SetVariable (
                                   L"StartupDelay",
                                   &gEfiGlobalVariableGuid,
                                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS |EFI_VARIABLE_NON_VOLATILE,
                                   sizeof (TmpVal),
                                   &TmpVal
              );
……

When boot to shell, it still delays 5 seconds.

I tried to use shell cmd ‘set’, then it’s ok, shell’s default delay switched to 2 seconds.

I used dmpstore cmd to list current system’s variables, and found 2 StartupDelay variables:
Efi:StartupDelay
SEnv:StartupDelay

So, my question is:
How to create “SEnv:StartupDelay” variable in UEFI BIOS code.

Thanks

Best wishes,


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to create environmental variable for Shell
  2017-11-03 11:48 ` Jim.Dailey
@ 2017-11-03 11:54   ` Jim.Dailey
  2017-11-03 20:31     ` Jarlstrom, Laurie
  0 siblings, 1 reply; 6+ messages in thread
From: Jim.Dailey @ 2017-11-03 11:54 UTC (permalink / raw)
  To: TigerLiu; +Cc: edk2-devel

Please excuse the stupid email plug-in I have to use that puts the
"Internal Use" line in my text emails. The plug-in does not allow
me to see that text, so I have to remember to remove it every time
even though I never see it.  Sadly, I sometimes forget.

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dailey, Jim
Sent: Friday, November 3, 2017 6:49 AM
To: TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Dell - Internal Use - Confidential   <=== No, this is *NOT* true!

You need to use the shell's GUID, gShellVariableGuid, if you want to
create a shell variable.

Regards,
Jim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tiger Liu
Sent: Friday, November 3, 2017 12:01 AM
To: edk2-devel@lists.01.org
Subject: [edk2] how to create environmental variable for Shell

Hi, experts:
I have a question about creating shell’s environmental variable.
Such as : StartupDelay

I tried to create this variable at uefi boot phase.
……
              TmpVal = 2;
              Status =  gRT->SetVariable (
                                   L"StartupDelay",
                                   &gEfiGlobalVariableGuid,
                                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS |EFI_VARIABLE_NON_VOLATILE,
                                   sizeof (TmpVal),
                                   &TmpVal
              );
……

When boot to shell, it still delays 5 seconds.

I tried to use shell cmd ‘set’, then it’s ok, shell’s default delay switched to 2 seconds.

I used dmpstore cmd to list current system’s variables, and found 2 StartupDelay variables:
Efi:StartupDelay
SEnv:StartupDelay

So, my question is:
How to create “SEnv:StartupDelay” variable in UEFI BIOS code.

Thanks

Best wishes,


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to create environmental variable for Shell
  2017-11-03 11:54   ` Jim.Dailey
@ 2017-11-03 20:31     ` Jarlstrom, Laurie
  2017-11-03 20:54       ` Jarlstrom, Laurie
  0 siblings, 1 reply; 6+ messages in thread
From: Jarlstrom, Laurie @ 2017-11-03 20:31 UTC (permalink / raw)
  To: Jim.Dailey@dell.com, TigerLiu@zhaoxin.com; +Cc: edk2-devel@lists.01.org

Hi,
Are you trying to set the Timeout variable (delay to allow user to press a key to go into setup) or the delay for the shell  before executing startup.nsh?
The Timeout variable is a PCD and can be set with: 
     TmpVal = 2;
     PcdStatus = PcdSet16(PcdPlatformBootTimeOut, (UINT16)TmpVal);

This will set the global variable "Timeout" - check with shell dmpstore.

The delay for the Shell can be done when invoking the Shell.efi image with "-nostartup" option.

thanks,
Laurie
 
laurie.jarlstrom@intel.com

Intel SSG/STO/EBP
(503) 712-9395



-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jim.Dailey@dell.com
Sent: Friday, November 03, 2017 4:54 AM
To: TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Please excuse the stupid email plug-in I have to use that puts the "Internal Use" line in my text emails. The plug-in does not allow me to see that text, so I have to remember to remove it every time even though I never see it.  Sadly, I sometimes forget.

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dailey, Jim
Sent: Friday, November 3, 2017 6:49 AM
To: TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Dell - Internal Use - Confidential   <=== No, this is *NOT* true!

You need to use the shell's GUID, gShellVariableGuid, if you want to create a shell variable.

Regards,
Jim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tiger Liu
Sent: Friday, November 3, 2017 12:01 AM
To: edk2-devel@lists.01.org
Subject: [edk2] how to create environmental variable for Shell

Hi, experts:
I have a question about creating shell’s environmental variable.
Such as : StartupDelay

I tried to create this variable at uefi boot phase.
……
              TmpVal = 2;
              Status =  gRT->SetVariable (
                                   L"StartupDelay",
                                   &gEfiGlobalVariableGuid,
                                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS |EFI_VARIABLE_NON_VOLATILE,
                                   sizeof (TmpVal),
                                   &TmpVal
              );
……

When boot to shell, it still delays 5 seconds.

I tried to use shell cmd ‘set’, then it’s ok, shell’s default delay switched to 2 seconds.

I used dmpstore cmd to list current system’s variables, and found 2 StartupDelay variables:
Efi:StartupDelay
SEnv:StartupDelay

So, my question is:
How to create “SEnv:StartupDelay” variable in UEFI BIOS code.

Thanks

Best wishes,


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to create environmental variable for Shell
  2017-11-03 20:31     ` Jarlstrom, Laurie
@ 2017-11-03 20:54       ` Jarlstrom, Laurie
  0 siblings, 0 replies; 6+ messages in thread
From: Jarlstrom, Laurie @ 2017-11-03 20:54 UTC (permalink / raw)
  To: Jarlstrom, Laurie, Jim.Dailey@dell.com, TigerLiu@zhaoxin.com
  Cc: edk2-devel@lists.01.org

Delay for the shell to start "Startup.nsh" can also be done with the option "-delay :n" where n is the number of seconds of delay, default is 5.

thanks,
Laurie
 
laurie.jarlstrom@intel.com

Intel SSG/STO/EBP
(503) 712-9395



-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jarlstrom, Laurie
Sent: Friday, November 03, 2017 1:32 PM
To: Jim.Dailey@dell.com; TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Hi,
Are you trying to set the Timeout variable (delay to allow user to press a key to go into setup) or the delay for the shell  before executing startup.nsh?
The Timeout variable is a PCD and can be set with: 
     TmpVal = 2;
     PcdStatus = PcdSet16(PcdPlatformBootTimeOut, (UINT16)TmpVal);

This will set the global variable "Timeout" - check with shell dmpstore.

The delay for the Shell can be done when invoking the Shell.efi image with "-nostartup" option.

thanks,
Laurie
 
laurie.jarlstrom@intel.com

Intel SSG/STO/EBP
(503) 712-9395



-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jim.Dailey@dell.com
Sent: Friday, November 03, 2017 4:54 AM
To: TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Please excuse the stupid email plug-in I have to use that puts the "Internal Use" line in my text emails. The plug-in does not allow me to see that text, so I have to remember to remove it every time even though I never see it.  Sadly, I sometimes forget.

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dailey, Jim
Sent: Friday, November 3, 2017 6:49 AM
To: TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Dell - Internal Use - Confidential   <=== No, this is *NOT* true!

You need to use the shell's GUID, gShellVariableGuid, if you want to create a shell variable.

Regards,
Jim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tiger Liu
Sent: Friday, November 3, 2017 12:01 AM
To: edk2-devel@lists.01.org
Subject: [edk2] how to create environmental variable for Shell

Hi, experts:
I have a question about creating shell’s environmental variable.
Such as : StartupDelay

I tried to create this variable at uefi boot phase.
……
              TmpVal = 2;
              Status =  gRT->SetVariable (
                                   L"StartupDelay",
                                   &gEfiGlobalVariableGuid,
                                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS |EFI_VARIABLE_NON_VOLATILE,
                                   sizeof (TmpVal),
                                   &TmpVal
              );
……

When boot to shell, it still delays 5 seconds.

I tried to use shell cmd ‘set’, then it’s ok, shell’s default delay switched to 2 seconds.

I used dmpstore cmd to list current system’s variables, and found 2 StartupDelay variables:
Efi:StartupDelay
SEnv:StartupDelay

So, my question is:
How to create “SEnv:StartupDelay” variable in UEFI BIOS code.

Thanks

Best wishes,


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to create environmental variable for Shell
@ 2017-11-06  1:39 Tiger Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Tiger Liu @ 2017-11-06  1:39 UTC (permalink / raw)
  To: Jarlstrom, Laurie, Jim.Dailey@dell.com; +Cc: edk2-devel@lists.01.org

Hi, Laurie:
Got it!
Thanks a lot!

I just wanted to revise the delay for the shell  before executing startup.nsh.

Best wishes,

-----邮件原件-----
发件人: Jarlstrom, Laurie [mailto:laurie.jarlstrom@intel.com]
发送时间: 2017年11月4日 4:54
收件人: Jarlstrom, Laurie <laurie.jarlstrom@intel.com>; Jim.Dailey@dell.com; Tiger Liu <TigerLiu@zhaoxin.com>
抄送: edk2-devel@lists.01.org
主题: RE: [edk2] how to create environmental variable for Shell

Delay for the shell to start "Startup.nsh" can also be done with the option "-delay :n" where n is the number of seconds of delay, default is 5.

thanks,
Laurie

laurie.jarlstrom@intel.com

Intel SSG/STO/EBP
(503) 712-9395



-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jarlstrom, Laurie
Sent: Friday, November 03, 2017 1:32 PM
To: Jim.Dailey@dell.com; TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Hi,
Are you trying to set the Timeout variable (delay to allow user to press a key to go into setup) or the delay for the shell  before executing startup.nsh?
The Timeout variable is a PCD and can be set with:
     TmpVal = 2;
     PcdStatus = PcdSet16(PcdPlatformBootTimeOut, (UINT16)TmpVal);

This will set the global variable "Timeout" - check with shell dmpstore.

The delay for the Shell can be done when invoking the Shell.efi image with "-nostartup" option.

thanks,
Laurie

laurie.jarlstrom@intel.com

Intel SSG/STO/EBP
(503) 712-9395



-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jim.Dailey@dell.com
Sent: Friday, November 03, 2017 4:54 AM
To: TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Please excuse the stupid email plug-in I have to use that puts the "Internal Use" line in my text emails. The plug-in does not allow me to see that text, so I have to remember to remove it every time even though I never see it.  Sadly, I sometimes forget.

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dailey, Jim
Sent: Friday, November 3, 2017 6:49 AM
To: TigerLiu@zhaoxin.com
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] how to create environmental variable for Shell

Dell - Internal Use - Confidential   <=== No, this is *NOT* true!

You need to use the shell's GUID, gShellVariableGuid, if you want to create a shell variable.

Regards,
Jim

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tiger Liu
Sent: Friday, November 3, 2017 12:01 AM
To: edk2-devel@lists.01.org
Subject: [edk2] how to create environmental variable for Shell

Hi, experts:
I have a question about creating shell’s environmental variable.
Such as : StartupDelay

I tried to create this variable at uefi boot phase.
……
              TmpVal = 2;
              Status =  gRT->SetVariable (
                                   L"StartupDelay",
                                   &gEfiGlobalVariableGuid,
                                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS |EFI_VARIABLE_NON_VOLATILE,
                                   sizeof (TmpVal),
                                   &TmpVal
              );
……

When boot to shell, it still delays 5 seconds.

I tried to use shell cmd ‘set’, then it’s ok, shell’s default delay switched to 2 seconds.

I used dmpstore cmd to list current system’s variables, and found 2 StartupDelay variables:
Efi:StartupDelay
SEnv:StartupDelay

So, my question is:
How to create “SEnv:StartupDelay” variable in UEFI BIOS code.

Thanks

Best wishes,


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-06  1:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03  5:00 how to create environmental variable for Shell Tiger Liu
2017-11-03 11:48 ` Jim.Dailey
2017-11-03 11:54   ` Jim.Dailey
2017-11-03 20:31     ` Jarlstrom, Laurie
2017-11-03 20:54       ` Jarlstrom, Laurie
  -- strict thread matches above, loose matches on Subject: below --
2017-11-06  1:39 Tiger Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox