Re: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path contains space

2015-11-20 Thread Miller, Carl H
looks like my original fix submittal, which Mr. Gao said caused failure on his 
system.


-Original Message-
From: Gao, Liming [mailto:liming@intel.com] 
Sent: Friday, November 20, 2015 1:10 AM
To: Zhu, Yonghong; edk2-devel@lists.01.org
Cc: Hauch, Larry; Miller, Carl H
Subject: RE: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the 
path contains space

Reviewed-by: Liming Gao <liming@intel.com>

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong 
Zhu
Sent: Friday, November 20, 2015 5:08 PM
To: edk2-devel@lists.01.org
Cc: Hauch, Larry; carl.mil...@pnnl.gov
Subject: [edk2] [Patch] BaseTools/toolsetup.bat: fixed the error when the path 
contains space

We have a new simple and effective method to resolve the original issue that 
the PATH env's update error when the path contains space, so this patch remove 
the last check in and use the new method to fix the original issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong@intel.com>
---
 toolsetup.bat | 21 +
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/toolsetup.bat b/toolsetup.bat index 310ddd0..76fd8bb 100755
--- a/toolsetup.bat
+++ b/toolsetup.bat
@@ -320,28 +320,17 @@ goto end
 if not defined PYTHON_FREEZER_PATH (
   echo.
   echo !!! WARNING !!! Will not be able to compile Python programs to .exe
   echo Will setup environment to run Python scripts directly.
   echo.
-  goto UpdatePATH
+  set "PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%"
+  set "PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%"
+  set "PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%"
+  set PATHEXT=%PATHEXT%;.py
 )
-else (
-  goto UpdateEnv
-)
-  )
-  else (
-goto UpdateEnv
   )
-
-:UpdatePATH
-  set PATH=%BASETOOLS_PYTHON_SOURCE%\Trim;%PATH%
-  set PATH=%BASETOOLS_PYTHON_SOURCE%\GenFds;%PATH%
-  set PATH=%BASETOOLS_PYTHON_SOURCE%\build;%PATH%
-  set PATHEXT=%PATHEXT%;.py
-  goto UpdateEnv
-
-:UpdateEnv
+  
   echo BASE_TOOLS_PATH = %BASE_TOOLS_PATH%
   echo PYTHON_PATH = %PYTHON_PATH%
   echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%
   echo.
 
--
2.6.1.windows.1

___
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] RE uses the version information in application .EFI file: edk2-devel Digest, Vol 4, Issue 214

2015-10-29 Thread Miller, Carl H
Liming,
the reason i want to maintain the version information is so that I can deduce 
the version of the file by parsing the PE header, from a non-efi environment.
--

Message: 7
Date: Thu, 29 Oct 2015 09:15:07 +
From: "Gao, Liming" <liming@intel.com>
To: "Miller, Carl H" <carl.mil...@pnnl.gov>, "edk2-devel@lists.01.org"
<edk2-devel@lists.01.org>
Subject: Re: [edk2] [PATCH] BaseTools/GenFw: add option to retain
image   version info
Message-ID:
<4a89e2ef3dfedb4c8bfde51014f606a112e60...@shsmsx102.ccr.corp.intel.com>

Content-Type: text/plain; charset="us-ascii"

Carl:
  Could you let me how you uses the version information in application .EFI 
file?

Thanks
Liming
From: Miller, Carl H [mailto:carl.mil...@pnnl.gov]
Sent: Wednesday, October 28, 2015 10:32 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong; Gao, Liming
Subject: [PATCH] BaseTools/GenFw: add option to retain image version info


add a command line option("-leaveversion") to GenFw to retain the version 
information in application .EFI files.



Cc: M: Yonghong Zhu <yonghong@intel.com<mailto:yonghong@intel.com>>

   M: Liming Gao <liming@intel.com<mailto:liming@intel.com>>

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Thompson, James J 
<james.thomp...@pnnl.gov<mailto:james.thomp...@pnnl.gov>>

---
diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 4756c52..eea131f 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -1078,6 +1078,7 @@ Returns:
   UNWIND_INFO  *UnwindInfo;
   STATUS   Status;
   BOOLEAN  ReplaceFlag;
+  BOOLEAN  LeaveVersionFlag;
   BOOLEAN  KeepExceptionTableFlag;
   BOOLEAN  KeepZeroPendingFlag;
   UINT64   LogLevel;
@@ -1140,6 +1141,7 @@ Returns:
   InputFileLength   = 0;
   Optional32= NULL;
   Optional64= NULL;
+  LeaveVersionFlag  = FALSE;
   KeepExceptionTableFlag = FALSE;
   KeepZeroPendingFlag= FALSE;
   NumberOfFormPacakge= 0;
@@ -1262,7 +1264,14 @@ Returns:
   continue;
 }

-if (stricmp (argv[0], "--keepexceptiontable") == 0) {
+ if (stricmp(argv[0], "--leaveversion") == 0) {
+ LeaveVersionFlag = TRUE;
+ argc--;
+ argv++;
+ continue;
+ }
+
+ if (stricmp(argv[0], "--keepexceptiontable") == 0) {
   KeepExceptionTableFlag = TRUE;
   argc --;
   argv ++;
@@ -2397,8 +2406,10 @@ Returns:
 Optional64 = (EFI_IMAGE_OPTIONAL_HEADER64 *)>Pe32.OptionalHeader;
 Optional64->MajorOperatingSystemVersion = 0;
 Optional64->MinorOperatingSystemVersion = 0;
-Optional64->MajorImageVersion   = 0;
-Optional64->MinorImageVersion   = 0;
+ if (!LeaveVersionFlag) {
+ Optional64->MajorImageVersion = 0;
+ Optional64->MinorImageVersion = 0;
+ }
 Optional64->MajorSubsystemVersion   = 0;
 Optional64->MinorSubsystemVersion   = 0;
 Optional64->Win32VersionValue   = 0;


--

Subject: Digest Footer

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


--

End of edk2-devel Digest, Vol 4, Issue 214
***
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] EFI pe version number

2015-10-27 Thread Miller, Carl H
I am trying to set an image version number into my .efi application, using the 
/VERSION:x.y linker option.

I am building using UDK2014 and visual studio 2013.

I see that the version is being inserted into the appplication.dll file, but it 
gets stripped out in the application.efi file.

is there some way to prevent this?

thanks,
carl
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] simple_text_input_ex_ protocol typematic rate

2015-10-26 Thread Miller, Carl H
I have a an efi app I boot to as bootx64.efi and it waits for keyboard input 
(using either simple_text_input_protocol or simple_text_input_ex_ protocol)

for the most part (i.e., on most systems) it works fine, but recently i have 
tried it on a newer toshiba laptop
and have issues indicatative of keyboard sensitivity, that is I receive 
multiple of the same character if the key is not struck extremely staccato, 
that is
i can not hold the key down at all else i get repeating characters.

oddly, this is not an issue if I boot to a shell, in that case the repeat rate 
appears normal.

I have tried both the simple_text_input_ protocol and the simple_text_input_ex_ 
protocol with same results.

does anyone have any ideas what might be causing this behaviour in my app but 
not in a shell?

thanks.
carl
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] worth openning gEfiSimpleTextIinputProtocol ?

2015-10-13 Thread Miller, Carl H
hello, was wondering if it makes sense to open the gEfiSimpleTextIinputProtocol 
rather than just using gST->ConIn pointer 

thanks
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel