Re: [edk2] CryptoPkg compiles error: BIO_printf() andBIO_snprintf()redefined.

2017-04-13 Thread winddy
Hi Qin,
 Got it!
 I thought openssl must be modified before using it as UDK code uses patch 
tool to handle it before. 
 I try to just unpack openssl then build it, it is OK.
 Thank you.
  
  
  --
  BR
 winddy_zhang


  
  

 

 -- 原始邮件 --
  发件人: "Long, Qin";<qin.l...@intel.com>;
 发送时间: 2017年4月13日(星期四) 下午2:29
 收件人: "winddy"<winddy_zh...@foxmail.com>; 
"edk2-devel"<edk2-devel@lists.01.org>; 
 
 主题: RE: [edk2] CryptoPkg compiles error: BIO_printf() 
andBIO_snprintf()redefined.

 

  
In general, the user needn’t to run “process_files.pl” to re-generate the INF 
file, if you are using the latest release (e.g. current 1.1.0e stated in the 
OpenSSL-HOWTO). 
 
You can re-produce your INF file if any customization requirement (new OpenSSL 
version, new config flags, …).
 
 
 
Theprocss_files.pl was originally created in UNIX-like style (“#!/usr/bin/perl 
–w”).
 
So no more validations on those third-party Perl utility (ActivePerl, 
Strawberry, etc). Of cause, I can take a look at those Perl environments later. 
 
 
 
 
 
Best Regards & Thanks,
 
LONG, Qin
 
 

From: winddy [mailto:winddy_zh...@foxmail.com] 
Sent: Thursday, April 13, 2017 2:06 PM
To: Long, Qin <qin.l...@intel.com>; edk2-devel <edk2-devel@lists.01.org>
Subject: RE: [edk2] CryptoPkg compiles error: BIO_printf() andBIO_snprintf() 
redefined.


 
 
   
 Hi Qin,
So currently  our CryptoPkg init does not support third party perl tool 
such as  ActivePerl ?
Thanks.


  
 

   
--

   
BR

  
winddy_zhang



  
 

   
 

  
 

  
-- Original --

   
From:  "Long, Qin";<qin.l...@intel.com>;

  
Date:  Thu, Apr 13, 2017 01:08 PM

  
To:  "winddy"<winddy_zh...@foxmail.com>; "edk2-devel"<edk2-devel@lists.01.org>; 

  
Subject:  RE: [edk2] CryptoPkg compiles error: BIO_printf() andBIO_snprintf() 
redefined.


  
 

 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> winddy
> Sent: Thursday, April 13, 2017 10:39 AM
> To: edk2-devel <edk2-devel@lists.01.org>
> Subject: [edk2] CryptoPkg compiles error: BIO_printf() and BIO_snprintf()
> redefined.
> 
> Hi experts,
>  Now I compile CryptoPkg in lastest UDK, I find there is a build error:
> 
>  BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_snprintf already
> defined i n OpensslLib.lib(b_print.obj)
> BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_printf already defined
> in
> OpensslLib.lib(b_print.obj)
> d:\project\udkapp\udkapp\Build\WinddyPkg\RELEASE_DDK7600\X64\Windd
> yPkg\Dxe\Crypt
> Dxe\CryptDxe\DEBUG\CryptDxe.dll : fatal error LNK1169: one or more
> multiply defi ned symbols found

Please check your OpensslLib.inf, the b_print.c should not be there.
And the process_file.pl should filter this file into the final file list in INF.

> 
>  Both c file "CryptoPkg\Library\BaseCryptLib\SysCall\CrtWrapper.c" and c
> file "CryptoPkg\Library\OpensslLib\openssl\crypto\bio\b_print.c" defined
> function BIO_printf(), BIO_snprintf().
> 
>  I just remove the dummy functions in  CrtWrapper.c, the build process is
> successful.
>  Is that right?
> 
>  BTW, I think someone maybe does not know how to run perl script for
> openssl library init,  so I write down my trying steps under windows 7 64 bit
> for your reference:
>  1. download and install ActivePerl-5.24.1.2402-MSWin32-x64-401627.exe
> 2. cmdline run "ppm install dmake"
> 3. download openssl-1.1.0e.tar.gz and unpack it to
> CryptoPkg/Library/OpensslLib/openssl.
> 4. rename "openssl\Configure" to "openssl\Configure.pl"
> 5. modify file process_files.pl line 49:  "./Configure" -> "Configure.pl"
> 6. under cmdline, cd to "CryptoPkg\Library\OpensslLib" and run
> "process_files.pl"

Use "Perl process_files.pl" is fine enough.
If you are using Windows and installed Git-Windows, just run "perl 
process_files.pl"
In your Git Bash (Perl should be included in your MINGW environment).

> 
>  Thank you.
> 
> 
> 
>   --
>   BR
>  winddy_zhang
> ___
> 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


Re: [edk2] CryptoPkg compiles error: BIO_printf() andBIO_snprintf() redefined.

2017-04-13 Thread winddy
Hi Qin,
So currently  our CryptoPkg init does not support third party perl tool 
such as  ActivePerl ?
Thanks.

  
  --
  BR
 winddy_zhang


  
  

 

 -- Original --
  From:  "Long, Qin";<qin.l...@intel.com>;
 Date:  Thu, Apr 13, 2017 01:08 PM
 To:  "winddy"<winddy_zh...@foxmail.com>; 
"edk2-devel"<edk2-devel@lists.01.org>; 
 
 Subject:  RE: [edk2] CryptoPkg compiles error: BIO_printf() andBIO_snprintf() 
redefined.

 



> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> winddy
> Sent: Thursday, April 13, 2017 10:39 AM
> To: edk2-devel <edk2-devel@lists.01.org>
> Subject: [edk2] CryptoPkg compiles error: BIO_printf() and BIO_snprintf()
> redefined.
> 
> Hi experts,
>  Now I compile CryptoPkg in lastest UDK, I find there is a build error:
> 
>  BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_snprintf already
> defined i n OpensslLib.lib(b_print.obj)
> BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_printf already defined
> in
> OpensslLib.lib(b_print.obj)
> d:\project\udkapp\udkapp\Build\WinddyPkg\RELEASE_DDK7600\X64\Windd
> yPkg\Dxe\Crypt
> Dxe\CryptDxe\DEBUG\CryptDxe.dll : fatal error LNK1169: one or more
> multiply defi ned symbols found

Please check your OpensslLib.inf, the b_print.c should not be there.
And the process_file.pl should filter this file into the final file list in INF.

> 
>  Both c file "CryptoPkg\Library\BaseCryptLib\SysCall\CrtWrapper.c" and c
> file "CryptoPkg\Library\OpensslLib\openssl\crypto\bio\b_print.c" defined
> function BIO_printf(), BIO_snprintf().
> 
>  I just remove the dummy functions in  CrtWrapper.c, the build process is
> successful.
>  Is that right?
> 
>  BTW, I think someone maybe does not know how to run perl script for
> openssl library init,  so I write down my trying steps under windows 7 64 bit
> for your reference:
>  1. download and install ActivePerl-5.24.1.2402-MSWin32-x64-401627.exe
> 2. cmdline run "ppm install dmake"
> 3. download openssl-1.1.0e.tar.gz and unpack it to
> CryptoPkg/Library/OpensslLib/openssl.
> 4. rename "openssl\Configure" to "openssl\Configure.pl"
> 5. modify file process_files.pl line 49:  "./Configure" -> "Configure.pl"
> 6. under cmdline, cd to "CryptoPkg\Library\OpensslLib" and run
> "process_files.pl"

Use "Perl process_files.pl" is fine enough.
If you are using Windows and installed Git-Windows, just run "perl 
process_files.pl"
In your Git Bash (Perl should be included in your MINGW environment).

> 
>  Thank you.
> 
> 
> 
>   --
>   BR
>  winddy_zhang
> ___
> 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] CryptoPkg compiles error: BIO_printf() and BIO_snprintf() redefined.

2017-04-12 Thread winddy
Hi experts,
 Now I compile CryptoPkg in lastest UDK, I find there is a build error:
  
 BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_snprintf already defined 
i
n OpensslLib.lib(b_print.obj)
BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_printf already defined in
OpensslLib.lib(b_print.obj)
d:\project\udkapp\udkapp\Build\WinddyPkg\RELEASE_DDK7600\X64\WinddyPkg\Dxe\Crypt
Dxe\CryptDxe\DEBUG\CryptDxe.dll : fatal error LNK1169: one or more multiply defi
ned symbols found 
  
 Both c file "CryptoPkg\Library\BaseCryptLib\SysCall\CrtWrapper.c" and c 
file "CryptoPkg\Library\OpensslLib\openssl\crypto\bio\b_print.c" defined 
function BIO_printf(), BIO_snprintf().
  
 I just remove the dummy functions in  CrtWrapper.c, the build process is 
successful. 
 Is that right?
  
 BTW, I think someone maybe does not know how to run perl script for 
openssl library init,  so I write down my trying steps under windows 7 64 bit 
for your reference:
 1. download and install ActivePerl-5.24.1.2402-MSWin32-x64-401627.exe
2. cmdline run "ppm install dmake"
3. download openssl-1.1.0e.tar.gz and unpack it to 
CryptoPkg/Library/OpensslLib/openssl.
4. rename "openssl\Configure" to "openssl\Configure.pl"
5. modify file process_files.pl line 49:  "./Configure" -> "Configure.pl"
6. under cmdline, cd to "CryptoPkg\Library\OpensslLib" and run 
"process_files.pl"
  
 Thank you.
  
  
  
  --
  BR
 winddy_zhang
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] bad usb descriptor may cause usb dead loop

2017-03-08 Thread winddy
Hi Experts,
 Now I meet a bad usb disk which may cause bios post hang. After tracing, I 
find it is dead loop in a while() condition.
 This usb disk's decriptor is as below, we could find that it reports it 
has 3 endpoints, but it only report one of them. And when usb core function 
sets config,  in function XhcInitializeEndpointContext(), usb core function 
will try to find all the endpoints, but it cannot meet the wanted type data to 
exit, so it dead loop there. I see in UDK revision 14863, file UsbDesc.c has 
been patched(MdeModulePkg/UsbBus: Stop parsing descriptor if some of descriptor 
fields are invalid).  
 So we should do more patch under this condition? 
 Waiting your suggestion.
 Thank you.
 
  
  
09 02 22 00 01 01 00 80 32// CFG IFs=1
 
09 04 00 00 03 FF 01 01 00// IF No=0 AS=0 EPs=3
 
09 21 10 01 21 01 22 43 00// HID
 
07 05 81 03 08 00 02  // EP
 
 
 
while (EpDesc->DescriptorType != USB_DESC_TYPE_ENDPOINT) {  // 
XhcInitializeEndpointContext(), line 2607
  EpDesc = (USB_ENDPOINT_DESCRIPTOR *)((UINTN)EpDesc + EpDesc->Length);
}
 
 

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


[edk2] why all applications will be measured even if it is in a measured FV in DxeTpm2MeasureBootHandler() ?

2016-09-04 Thread winddy
Dear experts,
I find in function DxeTpm2MeasureBootHandler(), all application PE files 
will be measured, even if it is in a measured FV? Is it a Duplicated 
measurement?
Thanks.


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


[edk2] [EDK2 TOOL] could we use release version base tool?

2015-12-08 Thread winddy
Dear Expert,
   According to compiler setting in "BaseTools\Source\C\Makefiles\ms.common" 
and "BaseTools\Source\C\Makefiles\ms.app", the target win32 base tools are 
debug version, could we update this compiler flag to build  release version 
tools? Is there any known issue?
   Thanks.


CFLAGS = $(CFLAGS) /nologo /c /Zi /Od /RTC1 /D _DEBUG /MTd /W4 /WX /D 
_CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE 
$(LD) /nologo /debug /incremental:no /nodefaultlib:libc.lib /out:$@ $(LIBS) $**


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


Re: [edk2] It seems something wrong inGraphicsConsoleControllerDriverStart() when user defined resolution is notsupported

2015-11-17 Thread winddy
Hi RuiYu,
  patch file is attached. 
  Thanks.


--
BR
winddy_zhang


 




-- Original --
From:  "Ni, Ruiyu";<ruiyu...@intel.com>;
Date:  Tue, Nov 17, 2015 05:14 PM
To:  "winddy"<winddy_zh...@foxmail.com>; "edk2-devel"<edk2-devel@lists.01.org>; 

Subject:  RE: [edk2] It seems something wrong 
inGraphicsConsoleControllerDriverStart() when user definedresolution is 
notsupported



Winddy,
Thanks for reporting this issue back.
I agree with your analysis. Could you please submit a patch to correct this?

Regards,
Ray

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of winddy
Sent: Tuesday, November 17, 2015 2:19 PM
To: edk2-devel <edk2-devel@lists.01.org>
Subject: [edk2] It seems something wrong in 
GraphicsConsoleControllerDriverStart() when user defined resolution is not 
supported

Dear Experts,
   Now I meet a problem: my GOP driver has something wrong that it only 
supports 800x600 and 640x480, but I defined screen resolution as 1024x768 
before (PcdVideoHorizontalResolution, PcdVideoVerticalResolution). When it 
boots to shell, screen scroll function seems wrong.
   I think the reason is that: variable HorizontalResolution and 
VerticalResolution are not set correctly.
   In line 473, Console driver will try to set OEM resolution, if failed, then 
try 800x600, if still failed, uses current resolution. in my case, 1024x768 
failed, 800x600 success, but HorizontalResolution and VerticalResolution are 
still 1024, 768. so InitializeGraphicsConsoleTextMode() may set wrong text mode.
   So I think solution is that: remove the result check of set mode 800x600 
(see below, line 490). Whatever 800x600 is set successfully or not, we should 
update HorizontalResolution, VerticalResolution, and CurrentMode(ModeNumber) to 
match the real setting.
   After removed it, screen scroll function is OK under shell. (my 
GraphicsConsole driver is older, but I think the problem is similar.)
   Thanks.




//
// if not supporting current mode, try 800x600 which is required by 
UEFI/EFI spec
//
Status = CheckModeSupported (
 Private->GraphicsOutput,
 800,
 600,
 
 );
Mode = Private->GraphicsOutput->Mode;
//-if (EFI_ERROR (Status) && Mode->MaxMode != 0) {   // 
<--- remove this line.
  //
  // Set default mode failed or device don't support default mode, then 
get the current mode information
  //
  HorizontalResolution = Mode->Info->HorizontalResolution;
  VerticalResolution = Mode->Info->VerticalResolution;
  ModeNumber = Mode->Mode;
//-}
   // <--- remove this line.

















--
BR
winddy_zhang
___
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] It seems something wrong in GraphicsConsoleControllerDriverStart() when user defined resolution is not supported

2015-11-16 Thread winddy
Dear Experts,
   Now I meet a problem: my GOP driver has something wrong that it only 
supports 800x600 and 640x480, but I defined screen resolution as 1024x768 
before (PcdVideoHorizontalResolution, PcdVideoVerticalResolution). When it 
boots to shell, screen scroll function seems wrong.
   I think the reason is that: variable HorizontalResolution and 
VerticalResolution are not set correctly.
   In line 473, Console driver will try to set OEM resolution, if failed, then 
try 800x600, if still failed, uses current resolution. in my case, 1024x768 
failed, 800x600 success, but HorizontalResolution and VerticalResolution are 
still 1024, 768. so InitializeGraphicsConsoleTextMode() may set wrong text mode.
   So I think solution is that: remove the result check of set mode 800x600 
(see below, line 490). Whatever 800x600 is set successfully or not, we should 
update HorizontalResolution, VerticalResolution, and CurrentMode(ModeNumber) to 
match the real setting.
   After removed it, screen scroll function is OK under shell. (my 
GraphicsConsole driver is older, but I think the problem is similar.)
   Thanks.




//
// if not supporting current mode, try 800x600 which is required by 
UEFI/EFI spec
//
Status = CheckModeSupported (
 Private->GraphicsOutput,
 800,
 600,
 
 );
Mode = Private->GraphicsOutput->Mode;
//-if (EFI_ERROR (Status) && Mode->MaxMode != 0) {   // 
<--- remove this line.
  //
  // Set default mode failed or device don't support default mode, then 
get the current mode information
  //
  HorizontalResolution = Mode->Info->HorizontalResolution;
  VerticalResolution = Mode->Info->VerticalResolution;
  ModeNumber = Mode->Mode;
//-}
   // <--- remove this line.

















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


[edk2] Is source repositories svn address changed?

2015-07-24 Thread winddy
Dear Experts,
  Rcently, I find udk open source SVN cannot be accessed. 
(https://svn.code.sf.net/p/edk2/code/trunk/edk2)
 According to http://www.tianocore.org/edk2, it says:
 Source repositories: git {github, bitbucket, sourceforge, more info}, svn 
{sourceforge}
 So if we want to get latest UDK code, we should use git tool instead?
 Thanks.
  
  
  
  
  --
  BR
 winddy_zhang
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel