Hello there, I downloaded the EDKII package from tianocore.org and setup build 
environment using the guidelines in   BuildNotes2.txt also necessary stps in 
Patch-HOWTO.txt (attached).However I am having trouble building the edk with 
build -t VS2008x86 switch. Can someone help on this one?Here is the summary:
WINDOWS 7 x64 running on VMVS2008 SP1 32-bit installed (when building i used 
build -t VS2008x86 as the buildnotes says explicitly says to do so if VS 32-bit 
is instlaled onto x64 O/S.
edk is extracted to c:\myworkspace
Attached:build.log as it misses and can not find windows.h and build fails.     
                                                                                
                          build.helloworld.log - attempt to build helloworld 
from buidnotes2.txt and Patch-HOWTO - instruction i followed to build.
Thanks.,         
                                          

c:\MyWorkSpace>cd MdeModulePkg

c:\MyWorkSpace\MdeModulePkg>cd application

c:\MyWorkSpace\MdeModulePkg\Application>cd HelloWorld

c:\MyWorkSpace\MdeModulePkg\Application\HelloWorld>dir
 Volume in drive C has no label.
 Volume Serial Number is 64F8-8493

 Directory of c:\MyWorkSpace\MdeModulePkg\Application\HelloWorld

12/14/2015  09:31 PM    <DIR>          .
12/14/2015  09:31 PM    <DIR>          ..
12/14/2015  09:28 PM             1,875 HelloWorld.c
12/14/2015  09:28 PM             1,917 HelloWorld.inf
12/14/2015  09:28 PM             2,306 HelloWorld.uni
12/14/2015  09:28 PM             1,340 HelloWorldExtra.uni
               4 File(s)          7,438 bytes
               2 Dir(s)  18,598,531,072 bytes free

c:\MyWorkSpace\MdeModulePkg\Application\HelloWorld>build
Build environment: Windows-7-6.1.7601-SP1
Build start time: 10:43:22, Dec.16 2015

WORKSPACE        = c:\myworkspace
ECP_SOURCE       = c:\myworkspace\edkcompatibilitypkg
EDK_SOURCE       = c:\myworkspace\edkcompatibilitypkg
EFI_SOURCE       = c:\myworkspace\edkcompatibilitypkg
EDK_TOOLS_PATH   = c:\myworkspace\basetools


Architecture(s)  = IA32
Build target     = DEBUG
Toolchain        = MYTOOLS

Active Platform          = c:\myworkspace\Nt32Pkg\Nt32Pkg.dsc
Active Module            = c:\myworkspace\MdeModulePkg\Application\HelloWorld\He
lloWorld.inf
Flash Image Definition   = c:\myworkspace\Nt32Pkg\Nt32Pkg.fdf

Processing meta-data ... done!
Generating code  done!
Generating makefile . done!


build...
 : error 7000: Failed to start command
        C:\Program Files\Microsoft Visual Studio 9.0\Vc\bin\nmake.exe /nologo al
l [c:\myworkspace\Build\NT32IA32\DEBUG_MYTOOLS\IA32\MdeModulePkg\Application\Hel
loWorld\HelloWorld]

- Failed -
Build end time: 10:43:26, Dec.16 2015
Build total time: 00:00:03


c:\MyWorkSpace\MdeModulePkg\Application\HelloWorld>

c:\MyWorkSpace>build -t VS2008x86
Build environment: Windows-7-6.1.7601-SP1
Build start time: 10:39:25, Dec.16 2015

WORKSPACE        = c:\myworkspace
ECP_SOURCE       = c:\myworkspace\edkcompatibilitypkg
EDK_SOURCE       = c:\myworkspace\edkcompatibilitypkg
EFI_SOURCE       = c:\myworkspace\edkcompatibilitypkg
EDK_TOOLS_PATH   = c:\myworkspace\basetools


Architecture(s)  = IA32
Build target     = DEBUG
Toolchain        = VS2008x86

Active Platform          = c:\myworkspace\Nt32Pkg\Nt32Pkg.dsc
Flash Image Definition   = c:\myworkspace\Nt32Pkg\Nt32Pkg.fdf

Processing meta-data ........... done!
Building ... c:\myworkspace\MdePkg\Library\PeiMemoryAllocationLib\PeiMemoryAlloc
ationLib.inf [IA32]
        "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\cl.exe" /Foc:
\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\MdePkg\Library\PeiMemoryAllocat
ionLib\PeiMemoryAllocationLib\OUTPUT\.\MemoryAllocationLib.obj /nologo /c /WX /G
S- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
/Ic:\myworkspace\MdePkg\Library\PeiMemoryAllocationLib  /Ic:\myworkspace\Build\N
T32IA32\DEBUG_VS2008x86\IA32\MdePkg\Library\PeiMemoryAllocationLib\PeiMemoryAllo
cationLib\DEBUG  /Ic:\myworkspace\MdePkg  /Ic:\myworkspace\MdePkg\Include  /Ic:\
myworkspace\MdePkg\Include\Ia32 c:\myworkspace\MdePkg\Library\PeiMemoryAllocatio
nLib\MemoryAllocationLib.c
MemoryAllocationLib.c
        "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\lib.exe" /NOL
OGO /LTCG /OUT:c:\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\MdePkg\Library
\PeiMemoryAllocationLib\PeiMemoryAllocationLib\OUTPUT\PeiMemoryAllocationLib.lib
 @c:\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\MdePkg\Library\PeiMemoryAll
ocationLib\PeiMemoryAllocationLib\OUTPUT\object_files.lst
Building ... c:\myworkspace\MdePkg\Library\PeiServicesLib\PeiServicesLib.inf [IA
32]
        "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\cl.exe" /Foc:
\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\MdePkg\Library\PeiServicesLib\P
eiServicesLib\OUTPUT\.\PeiServicesLib.obj /nologo /c /WX /GS- /W4 /Gs32768 /D UN
ICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Ic:\myworkspace\MdeP
kg\Library\PeiServicesLib  /Ic:\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\
MdePkg\Library\PeiServicesLib\PeiServicesLib\DEBUG  /Ic:\myworkspace\MdePkg  /Ic
:\myworkspace\MdePkg\Include  /Ic:\myworkspace\MdePkg\Include\Ia32 c:\myworkspac
e\MdePkg\Library\PeiServicesLib\PeiServicesLib.c
PeiServicesLib.c
        "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\lib.exe" /NOL
OGO /LTCG /OUT:c:\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\MdePkg\Library
\PeiServicesLib\PeiServicesLib\OUTPUT\PeiServicesLib.lib @c:\myworkspace\Build\N
T32IA32\DEBUG_VS2008x86\IA32\MdePkg\Library\PeiServicesLib\PeiServicesLib\OUTPUT
\object_files.lst
Building ... c:\myworkspace\Nt32Pkg\Library\PeiNt32OemHookStatusCodeLib\PeiNt32O
emHookStatusCodeLib.inf [IA32]
        "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\cl.exe" /Foc:
\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\Nt32Pkg\Library\PeiNt32OemHookS
tatusCodeLib\PeiNt32OemHookStatusCodeLib\OUTPUT\.\Nt32OemHookStatusCodeLib.obj /
nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR-
/GF /Gy /Zi /Gm /Ic:\myworkspace\Nt32Pkg\Library\PeiNt32OemHookStatusCodeLib  /I
c:\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\Nt32Pkg\Library\PeiNt32OemHoo
kStatusCodeLib\PeiNt32OemHookStatusCodeLib\DEBUG  /Ic:\myworkspace\MdePkg  /Ic:\
myworkspace\MdePkg\Include  /Ic:\myworkspace\MdePkg\Include\Ia32  /Ic:\myworkspa
ce\MdeModulePkg  /Ic:\myworkspace\MdeModulePkg\Include  /Ic:\myworkspace\Nt32Pkg
  /Ic:\myworkspace\Nt32Pkg\Include c:\myworkspace\Nt32Pkg\Library\PeiNt32OemHook
StatusCodeLib\Nt32OemHookStatusCodeLib.c
Nt32OemHookStatusCodeLib.c
c:\myworkspace\Nt32Pkg\Include\Common/WinNtInclude.h(54) : fatal error C1083: Ca
nnot open include file: 'windows.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
Vc\bin\cl.exe"' : return code '0x2'
Stop.


build...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin\nmake.exe /nol
ogo tbuild [c:\myworkspace\Build\NT32IA32\DEBUG_VS2008x86\IA32\Nt32Pkg\Library\P
eiNt32OemHookStatusCodeLib\PeiNt32OemHookStatusCodeLib]


build...
 : error F002: Failed to build module
        c:\myworkspace\Nt32Pkg\Library\PeiNt32OemHookStatusCodeLib\PeiNt32OemHoo
kStatusCodeLib.inf [IA32, VS2008x86, DEBUG]

- Failed -
Build end time: 10:39:38, Dec.16 2015
Build total time: 00:00:13


c:\MyWorkSpace>
Intel(R) Platform Innovation Framework for EFI
EFI Development Kit II (EDK II)
2011-12-14

Intel is a trademark or registered trademark of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.

EDK II packages can be checked out from the following SVN address:
https://svn.code.sf.net/p/edk2/code/trunk/edk2

The detailed introduction of these packages can be found in each package
description file. (The *.dec file under the package directory)


-------------------------------------------------------------------------------
The most recent version of the setup instructions is available on the EDK II
web-site:
  
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Step-by-step_instructions


-------------------------------------------------------------------------------
Quick Start (Windows Development Platform)
-----------

In a command prompt window, change to the top-level directory of the EDK II 
source.

Note:
  The first time the edksetup script is executed, it creates three files in the
  %WORKSPACE%\Conf directory. The files: tools_def.txt, target.txt and
  build_rule.txt, are only created if they do not exist, if they exist, they
  are not touched.

First, set up your project workspace. If you have previously initialized this
WORKSPACE, and a newer version of the *.template files in
WORKSPACE\BaseTools\Conf exists, remove the *.txt files in the WORKSPACE\Conf
directory prior to running the edksetup script.

For the reference build of the Nt32 Platform emulation environment, use the 
edksetup.bat option: --nt32. For building other platforms or modules, this
option is not required, as Visual Studio standard includes, libraries and/or
dlls are not required for normal development.

    c:\MyWork\edk2\> edksetup --nt32

The default tool chain (named MYTOOLS) is pre-configured to use VS2008 for IA32
and X64 target architectures and DDK3790 for IPF target architectures. To use a
different tool chain, either modify the tools_def.txt file's MYTOOLS entries,
or modify the %WORKSPACE%\Conf\target.txt file's TOOL_CHAIN_TAG. The pre-defined
tags are listed near the top of the %WORKSPACE%\Conf\tools_def.txt file, below
the Supported Tool Chains comment.
Alternatively, you may use the build command's -t option to specify a different
tool chain tag name: build -t VS2008 ... , for example.  Using this method will
require that you always use the build command's -t option. If you use 64-bit 
windows OS, you should use tool chain tag name with x86, such as VS2008x86.


Next, go to the module directory and begin to build.  This example is for the
HelloWorld application.

    c:\MyWork\edk2\> cd MdeModulePkg\Application\HelloWorld
    c:\MyWork\edk2\> build

If you want to build the a module in another package (for example, 
MdePkg\Library\BaseLib\BaseLib.inf), please edit the file,
%WORKSPACE%\Conf\Target.txt, first.

Change the following line
    ACTIVE_PLATFORM       = MdeModulePkg/MdeModulePkg.dsc
to
    ACTIVE_PLATFORM       = MdePkg/MdePkg.dsc

Then go to MdePkg\Library\BaseLib directory and type build:
    c:\MyWork\edk2\> cd MdePkg\Library\BaseLib
    c:\MyWork\edk2\> build

If you want build a platform, ACTIVE_PLATFORM must be set to your desired
platform dsc file, go to directory which must be not a module's directory, and
run "build" command.

Instead of changing Target.txt, you can specify platform, module and/or
architecture on command line.
For example, if you want to build NT32 platform, you can just type 

    c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32

and if you want to build HelloWorld module, you can just type

    c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m 
MdeModulePkg\Application\HelloWorld\HelloWorld.inf

Other helpful command line options of build tool include "-v" and "-d".
The "-v" option is used to turn on the verbose build, which provide more
information during the build. "-d <debug level 0-9>" option is used to
turn on the debug information which is helpful debugging build tools.

For more information on build options, please try "build -h" on command line.

Note:
  The Windows style help option "/?" is not a valid option for the build
  command.


-------------------------------------------------------------------------------
Supported build targets
-----------------------

all       - Build whole platform or module. It can be ignored.
genc      - Generate AutoGen.c, AutoGen.h and <ModuleName>.depex files only.
genmake   - Generate makefiles in addition to files generated by "genc" target.
clean     - Clean intermediate files
cleanall  - Clean all generated files and directories during build, except the
            generated Makefile files (top level and module makefiles)
cleanlib  - Clean all generated files and directories during library build
run       - Launch NT32 shell (only valid for NT32 platform)

-------------------------------------------------------------------------------
Tools in Python
---------------

* Run buld tool written in Python from source
  The build tool written in Python can be executed from its source directly as
  long as you have the Python interpreter (version 2.5.4) installed. The source
  of Python code is locating at:

    https://svn.code.sf.net/p/edk2-buildtools/code/trunk/BaseTools

  where:

    build/build.py      - The entry tool of build tools

  "build.py" steps:
    1. Run "edksetup.bat"
    2. set PYTHONPATH to the local directory of above source
       (BaseTools/Source/Python)
    3. Set ACTIVE_PLATFORM in WORKSPACE\Conf
    4. Go to platform or module directory
    5. Run "<python_interpreter.exe> <python_source_dir>/build/build.py" or
       "<python_source_dir>/build/build.py" directly.

* Convert Python source to exe file
  The tools written in Python can be coverted into executable program which can
  be executed without Python interpreter. One of the conversion tools is called
  cx_Freeze, available at: 

    http://sourceforge.net/projects/cx-freeze/

  If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use the following
  command lines to convert MyBuild.py to a Windows executable.

    set PYTHONPATH=<buildtools>\BaseTools\Source\Python
    c:\cx_Freeze-3.0.3\FreezePython.exe 
--include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8
 --install-dir=.\mybuild MyBuild.py

  The generated .exe files are put in "mybuild" subdirectory.

================================================================================
                                 Introduction
================================================================================
  OpenSSL is a well-known open source implementation of SSL and TLS protocols.
The core library implements the basic cryptographic functions and provides 
various
utility functions. The OpenSSL library is widely used in variety of security 
products development as base crypto provider. (See http://www.openssl.org for 
more 
information for OpenSSL).
  UEFI (Unified Extensible Firmware Interface) is a specification detailing the 
interfaces between OS and platform firmware. Several security features were 
introduced (e.g. Authenticated Variable Service, Driver Signing, etc) from UEFI 
2.2 (http://www.uefi.org). These security features highly depends on the 
cryptography. This patch will enable openssl building under UEFI environment.


================================================================================
                                OpenSSL-Version
================================================================================
  Current supported OpenSSL version for UEFI Crypto Library is 0.9.8zb.
    http://www.openssl.org/source/openssl-0.9.8zb.tar.gz


================================================================================
                      HOW to Install Openssl for UEFI Building
================================================================================
1.  Download OpenSSL 0.9.8zb from official website:
        http://www.openssl.org/source/openssl-0.9.8zb.tar.gz

    NOTE: Some web browsers may rename the downloaded TAR file to 
openssl-0.9.8zb.tar.tar.
          When you do the download, rename the "openssl-0.9.8zb.tar.tar" to
          "openssl-0.9.8zb.tar.gz" or rename the local downloaded file with 
".tar.tar"
          extension to ".tar.gz".

2.  Extract TAR into CryptoPkg/Library/OpenSslLib/openssl-0.9.8zb

    NOTE: If you use WinZip to unpack the openssl source in Windows, please 
          uncheck the WinZip smart CR/LF conversion option (WINZIP: Options --> 
          Configuration --> Miscellaneous --> "TAR file smart CR/LF 
conversion").
  
3.  Apply this patch: EDKII_openssl-0.9.8zb.patch, and make installation

    For Windows Environment:
    ------------------------
    1) Make sure the patch utility has been installed in your machine.
       Install Cygwin or get the patch utility binary from 
          http://gnuwin32.sourceforge.net/packages/patch.htm
    2) cd $(WORKSPACE)\CryptoPkg\Library\OpensslLib\openssl-0.9.8zb
    3) patch -p0 -i ..\EDKII_openssl-0.9.8zb.patch
    4) cd ..
    5) Install.cmd

    For Linux* Environment:
    -----------------------
    1) Make sure the patch utility has been installed in your machine.
       Patch utility is available from http://directory.fsf.org/project/patch/
    2) cd $(WORKSPACE)/CryptoPkg/Library/OpensslLib/openssl-0.9.8zb
    3) patch -p0 -i ../EDKII_openssl-0.9.8zb.patch
    4) cd ..
    5) ./Install.sh

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

Reply via email to