From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.33768.1670286085460185176 for ; Mon, 05 Dec 2022 16:21:25 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=YIMimed5; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 4FC9C20B83DC; Mon, 5 Dec 2022 16:21:24 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4FC9C20B83DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1670286085; bh=YgXYJjAz3yywWo7PaJBTiC0ll71SofQyF+3y1lJuuEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YIMimed55ZntESLlHCPllE+ONeM4QZxXCh+z/xhCcYwlc8758MmyIzkhJMHL0wVD+ RAvScwAubgBJIzzrgUQUwcCFSl/X38AVsc9/CfgyoiN0CkD9itHUp3QxB9zgcmtwyQ Qt5gqFw+/2ZKVuY0D7yASaxIqogH+AzO14uDiNZc= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Sean Brogan , Michael D Kinney , Liming Gao Subject: [edk2-wiki][PATCH v2 4/4] Update existing build instructions Date: Mon, 5 Dec 2022 19:20:49 -0500 Message-Id: <20221206002049.3155-5-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20221206002049.3155-1-mikuback@linux.microsoft.com> References: <20221206002049.3155-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki Adds a reference to existing documents in the wiki with build instructions to point to the new top-level build file. The original files are left in place for information reference and to prevent breaking links that may be pointing to them. Cc: Sean Brogan Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Michael Kubacki --- Build.mediawiki | 229 +++++----- BuildTool-Setup-Guide.mediawiki | 89 ++-- Common-instructions-for-Unix.mediawiki | 377 +++++++-------- Common-instructions.mediawiki | 211 ++++----- Getting-Started-with-EDK-II.mediawiki | 16 +- UDK2017-How-to-Build.md | 252 +++++----- UDK2018-How-to-Build.md | 262 +++++------ Unix-like-systems.mediawiki | 425 ++++++++--------- Using-EDK-II-with-Native-GCC.mediawiki | 483 ++++++++++---------- Windows-systems.mediawiki | 314 ++++++------- 10 files changed, 1352 insertions(+), 1306 deletions(-) diff --git a/Build.mediawiki b/Build.mediawiki index 19517eaef4e3..8e16cb12576b 100644 --- a/Build.mediawiki +++ b/Build.mediawiki @@ -1,114 +1,115 @@ -=3DFrequently asked EDK II build questions=3D - -=3D=3DRegarding the Build for EDK II, how do you specify a different com= piler tool chain on the command line?=3D=3D - -Use =E2=80=93t parameter for the build command. Example: Using the Micro= soft Visual Studio 2005 tool chain ...=20 - - build =E2=80=93t VS2005 - -For using other tools see [[Getting_Started_with_EDK_II]]. This provides= some detailed instructions for setting up some different tool chains? Th= e file Conf/tools_def.txt contains a list of targets. - -=3D=3DIs it possible to use PCDs @ build time?=3D=3D - -It depends on what you are trying to do. For use in code, yes.=20 -For example Featureflag PCD type can be used. For determining if somethi= ng should be built then it might be better to use the =E2=80=9CBuild =E2=80= =93D MACRO-NAME=E2=80=9D options. - -=3D=3DIs there information on Building on Linux?=3D=3D - -For EDK II, yes, the build tools will need to be recompiled for GCC. Li= nk for how to Build for GCC:=20 -* [[Using EDK II with Native GCC]] -* [[Unix-like systems]] (For older Linux distributions, or when using Cy= gwin or Mac OS X) - -=3D=3DWhat is the state of Python?=3D=3D - -For Building EDK II Python of at least version 2.5 is needed. On Linux w= e've used 2.6 & 2.7. Python 3+ is not supported and will not work curren= tly. On Windows, python is not required to be installed to build with ED= K II.=20 -There is a Python interpreter that is part of the EFI toolkit on tianoc= ore.org and is at the Python version level 2.4, There are long term plan= s to move to EDK II and support a later version of Python as part of the = [[AppPkg]]. It is currently (01/2012) in Aplha stage. - -=3D=3DWhat does the parsing tool do?=3D=3D - -The parsing is part of the first stage of the build process. There are = tools for parsing the set build description files and the target.txt for= a package or platform and creates the intermediate make and autogen file= s - -=3D=3DRegarding writing UEFI Applications in EDK II, where is the output= and/or the binary UEFI application after doing a build?=3D=3D - -The Build output directory is defined in the defines section of a .DSC f= ile. -For example, Nt32Pkg\Nt32Pkg.dsc - the UEFI application would be in Buil= d\NT32\DEBUG_MYTOOLS\IA32 - - OUTPUT_DIRECTORY =3D Build/NT32 - SUPPORTED_ARCHITECTURES =3D IA32 - BUILD_TARGETS =3D DEBUG - -=3D=3DHow do I get my UEFI application to the target UEFI System?=3D=3D - -Copy the UEFI Binary image from the output directory after the build to = a USB thumb drive. Insert the USB drive in the UEFI target system. Boot t= o the EFI Shell. The USB thumb drive should be one of the file systems, = e.g. FS0:. Cd to that USB drive and run your UEFI application from the sh= ell prompt - -=3D=3DIs the Build tool source code part of the Build?=3D=3D - -No, the repository for the Tool Source is a separate project. The binari= es by default are for a Windows build machine. For building on a non Wind= ows machine there are instructions for recompiling the build tools. - -The sources are also in the BaseTools directory with the pre-build Windo= ws executables. These sources are provided because they are the sources = that were used to build the binaries. On Windows systems, the tools do n= ot need to be built. The pre-build binaries can be used. One Linux, Uni= x, and OS/X systems, these sources are used to build the binaries for tha= t OS, or in the case of Python, the Python sources are executed directly. - -The [[BaseTools]] Source Project is where advanced development is done o= n the EDK II tools. Tool developers work in this separate project until = a new feature is stable, and only once it is stable is a feature added to= the BaseTools directory and new binaries are generated. - -=3D=3DCan we use Ifdefs?=3D=3D - -This is not recommended but can be used within the DSC or FDF as part of= the build. -But here is an example: - - !ifdef $(SOURCE_DEBUG_ENABLE) - MSFT:*_*_X64_GENFW_FLAGS =3D --keepexceptiontable - GCC:*_*_X64_GENFW_FLAGS =3D --keepexceptiontable - INTEL:*_*_X64_GENFW_FLAGS =3D --keepexceptiontable - !endif - -=3D=3DWhen can the report generator show the protocols produced by modul= es?=3D=3D - -The report generator can show protocols produced by modules. The Runtime= DXE core will also report what is missing before handing off. - -=3D=3DWhy is the Buffer Security check flag (Build options) disabled for= building EDK II UEFI applications and drivers but it is enabled for buil= ding tools. =3D=3D - -UEFI applications and drivers are not executed in an Operating System en= vironment. This is important, as the switches have very specific (and, in= the pre-boot space, negative) impacts on generated code. The switch does= two things in the code that are not acceptable for the pre-boot environm= ent: - -* The switch enables additional code in the compiled code base, which re= quires a larger stack space than may be available in the pre-boot environ= ment=20 -* The switch injects a call to a compiler specific function that is not = present in our Firmware builds, and which we do not have information on h= ow to emulate.=20 - -We disable these settings, as enabling them would create non-functioning= code. - -However, please be aware that Detecting Stack Overflows in Firmware is c= ritical in validation and development, and we use other techniques in our= code to do so. We just cannot generically support the /Gs flags (as not= ed above). - -The tools do have this flag set, as they are used within the Operating S= ystem environment, where the intrinsic added by the compiler can be proce= ssed correctly.=20 -=20 -=3D=3DAre there Dual-mode drivers in EDK II?=3D=3D - -No. The EDK II build system does not support the dual mode drivers desc= ribed in the PI Specification. These types of modules are very difficult= to implement correctly, so we recommend that developer implement two dif= ferent modules instead. The EDK II does allow them to share sources, but= 2 different PE/COFF images would be generated when built. - -=3D=3DIs there a tool to parse the BIOS Build tree?=3D=3D - -a) Use the report generator build into the build tool =E2=80=9CBUILD =E2= =80=93Y=E2=80=9D on the command line=20 - - -Y REPORTTYPE, --report-type=3DREPORTTYPE - Flags that control the type of build report to - generate. Must be one of: [PCD, LIBRARY, FLASH= , DEPEX,=20 - BUILD_FLAGS, FIXED_ADDRESS, EXECUTION_ORDER]. - To specify more than one flag, repeat this opti= on on - the command line and the default flag set is [P= CD, - LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRE= SS] - Use =E2=80=9C=E2=80=93Y DEPEX=E2=80=9D and this will generat= e a text file with dependencies - - -b) Predicted dispatch order is limited because it makes assumptions abou= t the behavior of the modules. It cannot handle that some PPI and DXE pro= tocols that might be conditionally produced. Documented in the EDK2010 Ma= rch 2010 release notes. - -c) Behavior of dispatch =E2=80=93 filter for DEBUG_DISPATCH in DSC in th= e PCD for the error level PcdDebugPrintErrorLevel - -=3D=3DHow does the build tool load the reset vector at 0xFFFFFFF0?=3D=3D - -This is defined in the PI Specification, Volume 3. http://www.uefi.org/s= pecs - -In the FV (Firmware Volume) there is something called a Volume Top File = inf the FV . A Volume Top File (VTF) is a file that must be located such = that the last byte of the file is also the last byte of the firmware volu= me. Regardless of the file type, a VTF must have the file name GUID of EF= I_FFS_VOLUME_TOP_FILE_GUID as defined below. - -From a PI point of view the first module that runs is the SEC core. If y= ou look at the VTF file it is basically the code that contains the reset = vector, and it jumps to the SEC code. - -Reference: https://github.com/tianocore/edk2/tree/master/UefiCpuPkg/Rese= tVector/Vtf0 - -So the hard code bit is the FV (Firmware Volume) that that contains the = Volume Top File needs to start at an address where the end of the FV will= end up at the magic reset vector address.=20 - -In general the EFI build system constructs relocatable PE/COFF images, a= nd every image is linked at zero. If the code executes from FLASH, then w= hen the FV is constructed the PE/COFF images that are XIP (eXecute In Pla= ce) have their PE/COFF image relocated based on where they end up in the = FV (based on info in FDF file). This is done by the build system. If the = EFI code runs from RAM then it is loaded by a PE/COFF loader and relocate= d to its load address. +=3DFrequently asked EDK II build questions=3D + + Note: This page is retained for reference. Most of the content as of 2= 022 is still relevant but it is recommended to + view the new set of build instructions that describe how to deve= lop using containers and build with the Stuart + application. + +New instructions: [[Build-Instructions.md|Build Instructions]] + +=3D=3DRegarding the Build for EDK II, how do you specify a different com= piler tool chain on the command line?=3D=3D + +Use =E2=80=93t parameter for the build command. Example: Using the Micro= soft Visual Studio 2019 tool chain ... + + build =E2=80=93t VS2019 + +For using other tools see [[Getting_Started_with_EDK_II]]. This provides= some detailed instructions for setting up some different tool chains? Th= e file Conf/tools_def.txt contains a list of targets. + +=3D=3DIs it possible to use PCDs @ build time?=3D=3D + +It depends on what you are trying to do. For use in code, yes. +For example Featureflag PCD type can be used. For determining if somethi= ng should be built then it might be better to use the =E2=80=9CBuild =E2=80= =93D MACRO-NAME=E2=80=9D options. + +=3D=3DIs there information on Building on Linux?=3D=3D + +For EDK II, yes, the build tools will need to be recompiled for GCC. Li= nk for how to Build for GCC: +* [[Using EDK II with Native GCC]] +* [[Unix-like systems]] (For older Linux distributions, or when using Cy= gwin or Mac OS X) + +=3D=3DWhat does the parsing tool do?=3D=3D + +The parsing is part of the first stage of the build process. There are = tools for parsing the set build description files and the target.txt for= a package or platform and creates the intermediate make and autogen file= s + +=3D=3DRegarding writing UEFI Applications in EDK II, where is the output= and/or the binary UEFI application after doing a build?=3D=3D + +The Build output directory is defined in the defines section of a .DSC f= ile. +For example, Nt32Pkg\Nt32Pkg.dsc - the UEFI application would be in Buil= d\NT32\DEBUG_MYTOOLS\IA32 + + OUTPUT_DIRECTORY =3D Build/NT32 + SUPPORTED_ARCHITECTURES =3D IA32 + BUILD_TARGETS =3D DEBUG + +=3D=3DHow do I get my UEFI application to the target UEFI System?=3D=3D + +Copy the UEFI Binary image from the output directory after the build to = a USB thumb drive. Insert the USB drive in the UEFI target system. Boot t= o the EFI Shell. The USB thumb drive should be one of the file systems, = e.g. FS0:. Cd to that USB drive and run your UEFI application from the sh= ell prompt + +=3D=3DIs the Build tool source code part of the Build?=3D=3D + +No, the repository for the Tool Source is a separate project. The binari= es by default are for a Windows build machine. For building on a non Wind= ows machine there are instructions for recompiling the build tools. + +The sources are also in the BaseTools directory with the pre-build Windo= ws executables. These sources are provided because they are the sources = that were used to build the binaries. On Windows systems, the tools do n= ot need to be built. The pre-build binaries can be used. One Linux, Uni= x, and OS/X systems, these sources are used to build the binaries for tha= t OS, or in the case of Python, the Python sources are executed directly. + +The [[BaseTools]] Source Project is where advanced development is done o= n the EDK II tools. Tool developers work in this separate project until = a new feature is stable, and only once it is stable is a feature added to= the BaseTools directory and new binaries are generated. + +=3D=3DCan we use Ifdefs?=3D=3D + +This is not recommended but can be used within the DSC or FDF as part of= the build. +But here is an example: + + !ifdef $(SOURCE_DEBUG_ENABLE) + MSFT:*_*_X64_GENFW_FLAGS =3D --keepexceptiontable + GCC:*_*_X64_GENFW_FLAGS =3D --keepexceptiontable + INTEL:*_*_X64_GENFW_FLAGS =3D --keepexceptiontable + !endif + +=3D=3DWhen can the report generator show the protocols produced by modul= es?=3D=3D + +The report generator can show protocols produced by modules. The Runtime= DXE core will also report what is missing before handing off. + +=3D=3DWhy is the Buffer Security check flag (Build options) disabled for= building EDK II UEFI applications and drivers but it is enabled for buil= ding tools. =3D=3D + +UEFI applications and drivers are not executed in an Operating System en= vironment. This is important, as the switches have very specific (and, in= the pre-boot space, negative) impacts on generated code. The switch does= two things in the code that are not acceptable for the pre-boot environm= ent: + +* The switch enables additional code in the compiled code base, which re= quires a larger stack space than may be available in the pre-boot environ= ment +* The switch injects a call to a compiler specific function that is not = present in our Firmware builds, and which we do not have information on h= ow to emulate. + +We disable these settings, as enabling them would create non-functioning= code. + +However, please be aware that Detecting Stack Overflows in Firmware is c= ritical in validation and development, and we use other techniques in our= code to do so. We just cannot generically support the /Gs flags (as not= ed above). + +The tools do have this flag set, as they are used within the Operating S= ystem environment, where the intrinsic added by the compiler can be proce= ssed correctly. + +=3D=3DAre there Dual-mode drivers in EDK II?=3D=3D + +No. The EDK II build system does not support the dual mode drivers desc= ribed in the PI Specification. These types of modules are very difficult= to implement correctly, so we recommend that developer implement two dif= ferent modules instead. The EDK II does allow them to share sources, but= 2 different PE/COFF images would be generated when built. + +=3D=3DIs there a tool to parse the BIOS Build tree?=3D=3D + +a) Use the report generator build into the build tool =E2=80=9CBUILD =E2= =80=93Y=E2=80=9D on the command line + + -Y REPORTTYPE, --report-type=3DREPORTTYPE + Flags that control the type of build report to + generate. Must be one of: [PCD, LIBRARY, FLASH= , DEPEX, + BUILD_FLAGS, FIXED_ADDRESS, EXECUTION_ORDER]. + To specify more than one flag, repeat this opti= on on + the command line and the default flag set is [P= CD, + LIBRARY, FLASH, DEPEX, BUILD_FLAGS, FIXED_ADDRE= SS] + Use =E2=80=9C=E2=80=93Y DEPEX=E2=80=9D and this will generat= e a text file with dependencies + + +b) Predicted dispatch order is limited because it makes assumptions abou= t the behavior of the modules. It cannot handle that some PPI and DXE pro= tocols that might be conditionally produced. Documented in the EDK2010 Ma= rch 2010 release notes. + +c) Behavior of dispatch =E2=80=93 filter for DEBUG_DISPATCH in DSC in th= e PCD for the error level PcdDebugPrintErrorLevel + +=3D=3DHow does the build tool load the reset vector at 0xFFFFFFF0?=3D=3D + +This is defined in the PI Specification, Volume 3. http://www.uefi.org/s= pecs + +In the FV (Firmware Volume) there is something called a Volume Top File = inf the FV . A Volume Top File (VTF) is a file that must be located such = that the last byte of the file is also the last byte of the firmware volu= me. Regardless of the file type, a VTF must have the file name GUID of EF= I_FFS_VOLUME_TOP_FILE_GUID as defined below. + +From a PI point of view the first module that runs is the SEC core. If y= ou look at the VTF file it is basically the code that contains the reset = vector, and it jumps to the SEC code. + +Reference: https://github.com/tianocore/edk2/tree/master/UefiCpuPkg/Rese= tVector/Vtf0 + +So the hard code bit is the FV (Firmware Volume) that that contains the = Volume Top File needs to start at an address where the end of the FV will= end up at the magic reset vector address. + +In general the EFI build system constructs relocatable PE/COFF images, a= nd every image is linked at zero. If the code executes from FLASH, then w= hen the FV is constructed the PE/COFF images that are XIP (eXecute In Pla= ce) have their PE/COFF image relocated based on where they end up in the = FV (based on info in FDF file). This is done by the build system. If the = EFI code runs from RAM then it is loaded by a PE/COFF loader and relocate= d to its load address. diff --git a/BuildTool-Setup-Guide.mediawiki b/BuildTool-Setup-Guide.medi= awiki index 445ef25af598..45a80406395f 100644 --- a/BuildTool-Setup-Guide.mediawiki +++ b/BuildTool-Setup-Guide.mediawiki @@ -1,43 +1,46 @@ -=3DGitHub Help=3D - -GitHub (https://help.github.com/index.html) provides step-by-step instru= ctions for user registration and basic features supported by GitHub=20 - -* Setup GitHub for Linux | Windows | MAC | All (https://help.github.com/= articles/set-up-git) -* To download and install a Git GUI interface (http://git-scm.com/) - -=3D=3D'''GitHub EDK II Project Repositories'''=3D=3D - -* The EDK II BaseTools are part of the EDK II project repository.=20 -* The EDK II project repository is available at https://github.com/tiano= core/edk2.=20 -* Prebuilt Windows tools are available at https://github.com/tianocore/e= dk2-BaseTools-win32.=20 -* Content that is not released under an accepted open source license can= be found at https://github.com/tianocore/edk2-non-osi.
-=3D Getting the extra tools=3D -=3D=3D Compiler =3D=3D -For both the BuildTools and [http://www.tianocore.org/edk2/ EDK II] proj= ects, you will need to obtain a compiler from somewhere else. These instr= uctions do not cover obtaining or installation of a compiler tools chain.= The BaseTools build requires a C compiler; an assembler or ACPI assemble= r are not required to build tools in this project. BaseTools assume that = a compiler is already configured in the environment. - -=3D=3D Python =3D=3D -The BaseTools build supports the Makefile based build for EDK II. All To= ols are written in either C or Python. The C tools must compile on all op= erating systems with various compilers, so the code is written using simp= le, standard functions and libraries. The Python-based tools are written = assuming the features that were available in Python. GUI applications can= be created in Python, using the wxPython package and all Python applicat= ions can be converted to run under a native OS (Windows, Linux or OS/X.) = via the [[Python Tools]]. - -The tools in this section are NOT required to build the EDK II project; = they are needed to compile the -BaseTools used to build the EDK II project. - -The Python 2.7.x tools may be obtained from http://www.python.org/, whil= e additional Python modules may be installed using setuptools or pip. Be = sure to check-out the appropriate tool set for your OS. - -*Linux and OS/X developers using a command line, create a directory that= will be used to hold the files, then change to that directory.=20 -**Replace URL with apropriate one from [[Python Tools]]. Installation an= d configuration for these tools are left to the developer. - - - - -Refer to documentation in either the UserManuals or Source folders for m= ore information.=20 -* BuildTools [https://github.com/tianocore/buildtools-BaseTools/tree/mas= ter/UserManuals User Manuals] - -=3D'''How to Setup the EDK II Tree'''=3D -See [[Getting Started with EDK II]] - -=3D=3D EDK II Development Process =3D=3D -After setting up your build environment see [[EDK II Development Proces= s]] for making contributions to the EDK II Project. - -=3DFurther Help=3D - -If you have questions about the code or run into obstacles getting thing= s to work for you, please join our [[edk2-devel]] email list and ask your= EDK II related questions on the list. +=3DGitHub Help=3D + + Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to + build edk2 for the first time. This page is retained for referen= ce. + +New instructions: [[Build-Instructions.md|Build Instructions]] + +GitHub (https://help.github.com/index.html) provides step-by-step instru= ctions for user registration and basic features supported by GitHub + +* Setup GitHub for Linux | Windows | MAC | All (https://help.github.com/= articles/set-up-git) +* To download and install a Git GUI interface (http://git-scm.com/) + +=3D=3D'''GitHub EDK II Project Repositories'''=3D=3D + +* The EDK II BaseTools are part of the EDK II project repository. +* The EDK II project repository is available at https://github.com/tiano= core/edk2. +* Prebuilt Windows tools are available at https://github.com/tianocore/e= dk2-BaseTools-win32. +* Content that is not released under an accepted open source license can= be found at https://github.com/tianocore/edk2-non-osi.
+=3D Getting the extra tools=3D +=3D=3D Compiler =3D=3D +For both the BuildTools and [http://www.tianocore.org/edk2/ EDK II] proj= ects, you will need to obtain a compiler from somewhere else. These instr= uctions do not cover obtaining or installation of a compiler tools chain.= The BaseTools build requires a C compiler; an assembler or ACPI assemble= r are not required to build tools in this project. BaseTools assume that = a compiler is already configured in the environment. + +=3D=3D Python =3D=3D +The BaseTools build supports the Makefile based build for EDK II. All To= ols are written in either C or Python. The C tools must compile on all op= erating systems with various compilers, so the code is written using simp= le, standard functions and libraries. The Python-based tools are written = assuming the features that were available in Python. GUI applications can= be created in Python, using the wxPython package and all Python applicat= ions can be converted to run under a native OS (Windows, Linux or OS/X.) = via the [[Python Tools]]. + +The tools in this section are NOT required to build the EDK II project; = they are needed to compile the +BaseTools used to build the EDK II project. + +*Linux and OS/X developers using a command line, create a directory that= will be used to hold the files, then change to that directory. +**Replace URL with apropriate one from [[Python Tools]]. Installation an= d configuration for these tools are left to the developer. + + + + +Refer to documentation in either the UserManuals or Source folders for m= ore information. +* BuildTools [https://github.com/tianocore/buildtools-BaseTools/tree/mas= ter/UserManuals User Manuals] + +=3D'''How to Setup the EDK II Tree'''=3D +See [[Getting Started with EDK II]] + +=3D=3D EDK II Development Process =3D=3D +After setting up your build environment see [[EDK II Development Proces= s]] for making contributions to the EDK II Project. + +=3DFurther Help=3D + +If you have questions about the code or run into obstacles getting thing= s to work for you, please join our [[edk2-devel]] email list and ask your= EDK II related questions on the list. diff --git a/Common-instructions-for-Unix.mediawiki b/Common-instructions= -for-Unix.mediawiki index d15d3ffa0881..2432695e8844 100644 --- a/Common-instructions-for-Unix.mediawiki +++ b/Common-instructions-for-Unix.mediawiki @@ -1,186 +1,191 @@ -__NOTOC__ -=3D=3DCommon instructions for Unix =3D=3D - -A significant portion of the steps are common on the various UNIX-like p= latforms. You should start with the instructions for the operating syste= m that most closely matches your platform, and it will direct you here at= the appropriate time. - -Note these instructions are not for current Linux distributions, only UN= IX-like systems that do not work with the [[Using EDK II with Native GCC]= ] instructions. Please follow the [[Using EDK II with Native GCC]] guide = for mainstream Linux distros. - -=3D=3D=3DGet the edk2 source tree using Git =3D=3D=3D - -
-bash$ mkdir ~/src
-bash$ cd ~/src
-bash$ git clone https://github.com/tianocore/edk2
-
- -=3D=3D=3D=3DFor EDKII project developers:=3D=3D=3D=3D -* Clone the EDK II project repository -** git clone https://github.com/tianocore/edk2 -* Change to the edk2 directory -* Build the tools -** make -C BaseTools -* Run the edksetup.sh script -** . edksetup.sh -When the above steps are done, you can work in the edk2 directory for co= de development. - -=3D=3D=3DBuild the EDK II BaseTools=3D=3D=3D - -
-bash$ make -C edk2/BaseTools
-
- -=3D=3D=3DBuild gcc x64 UEFI cross compiler=3D=3D=3D - -In order to build UEFI images for x64, you will need to build a cross-co= mpiler build of gcc. This can take quite a while to complete, possibly s= everal hours on older systems. But, a Python script has been provided to= automate this build process. - -Note: This is only needed if behind a internet firewall! -
-bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
-
- -To build gcc for x64, use these commands (this will take quite a while t= o complete): - -
-bash$ cd ~/src/edk2/BaseTools/gcc
-bash$ ./mingw-gcc-build.py --arch=3Dx64 \
-  --prefix=3D~/programs/gcc/x64
-
- -=3D=3D=3DSetup build shell environment=3D=3D=3D - -
-bash$ cd ~/src/edk2
-bash$ export EDK_TOOLS_PATH=3D~/src/edk2/BaseTools
-bash$ . edksetup.sh BaseTools
-
- -=3D=3D=3DModify Conf Files=3D=3D=3D - -You will need to edit the Conf/tools_def.txt and Conf/target.txt files. = These changes will enable the MdeModulePkg to be built using the gcc x64= compiler. - -=3D=3D=3D=3DEnable GCC X64 Cross-Compiler=3D=3D=3D=3D - -For the Conf/tools_def.txt file, find the following entry and comment th= e line out: - -
-DEFINE UNIXGCC_X64_PETOOLS_PREFIX  =3D /opt/tiano/x86_64-pc-mingw64/x86_=
64-pc-mingw64/bin/
-
- -Next, find the following entry and uncomment the line: - -
-DEFINE UNIXGCC_X64_PETOOLS_PREFIX  =3D ENV(HOME)/programs/gcc/x64/bin/x8=
6_64-pc-mingw32-
-
- -=3D=3D=3D=3DSet Build Target Information=3D=3D=3D=3D - -For the Conf/target.txt file, find the following lines: - -
-ACTIVE_PLATFORM       =3D Nt32Pkg/Nt32Pkg.dsc
-TARGET_ARCH           =3D IA32
-TOOL_CHAIN_TAG        =3D MYTOOLS
-
- -And change the cooresponding lines to match these: - -
-ACTIVE_PLATFORM       =3D MdeModulePkg/MdeModulePkg.dsc
-TARGET_ARCH           =3D X64
-TOOL_CHAIN_TAG        =3D UNIXGCC
-
- -=3D=3D=3DBuild Hello World! (and the rest of MdeModulePkg)=3D=3D=3D - -Now you should be able to simply run the build command to compile the Md= eModulePkg. - -
-bash$ build
-
- -As a tangible result of the build, you should have the HelloWorld UEFI X= 64 application. If you have a X64 UEFI system available to you, then thi= s application should be able to run successfully under the shell. - -
-bash$ ls Build/MdeModule/DEBUG_UNIXGCC/X64/HelloWorld.efi
-
- -=3D=3DEnabling Other Tools=3D=3D - -The above showed how to setup an X64 build environment for building the = core MdeModulePkg. However, other packages may require additional tools = such as an IA32 cross-compiler and an ASL compiler. The steps to build t= hese tools are described in this section. - -=3D=3D=3DBuild gcc IA32 UEFI cross compiler=3D=3D=3D - -In order to build UEFI images for IA32, you will need to build a cross-c= ompiler build of gcc. This can take quite a while to complete, possibly = several hours on older systems. But, a Python script has been provided t= o automate this build process. - -Note: This is only needed if behind a internet firewall! -
-bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
-
- -To build gcc for IA32, use these commands (this will take quite a while = to complete): - -
-bash$ cd ~/src/edk2/BaseTools/gcc
-bash$ ./mingw-gcc-build.py --arch=3Dia32 \
-  --prefix=3D~/programs/gcc/ia32
-
- -=3D=3D=3D=3DModify Conf Files=3D=3D=3D=3D - -Once the cross-compiler has been successfully built the Conf/tools_def.t= xt will need to be updated so the cross-compiler can be used. - -Find the following statement in Conf/tools_def.txt and comment the line = out: - -
-DEFINE UNIXGCC_IA32_PETOOLS_PREFIX =3D /opt/tiano/i386-tiano-pe/i386-tia=
no-pe/bin/
-
- -Next, find the following statement and uncomment the line:=20 - -
-DEFINE UNIXGCC_IA32_PETOOLS_PREFIX =3D ENV(HOME)/programs/gcc/ia32/bin/i=
686-pc-mingw32-
-
- -To enable building your target image with IA32 support the Conf/target.t= xt will also need to be modified. - -Find the TARGET_ARCH definition in Conf/target.txt and change the corres= ponding line to match this - -
-TARGET_ARCH           =3D IA32
-
- -=3D=3D=3DBuild the Intel ASL (iasl) compiler=3D=3D=3D - -The Intel ASL compiler is not required for all edk2 developers. It is u= nlikely that UEFI Application or UEFI Driver builds will need an ASL comp= iler. But, if you are building an entire system firmware image, then you= may need an ASL compiler. For example, the edk2 OVMF sample platform do= es require an ASL compiler in order to be built. - -First, download the latest ACPI-CA release from http://www.acpica.org. - -'''OS X users''': At this time, the latest versions of ACPI-CA are not b= uilding on Mac OS X, so please use the release from 20081031 instead. - -
-bash$ cd ~/src
-bash$ wget http://www.acpica.org/download/acpica-unix-20090521.tar.gz
-bash$ tar -zxf acpica-unix-20090521.tar.gz
-bash$ make -C acpica-unix-20090521/compiler
-bash$ ln -s ~/src/acpica-unix-20090521/compiler/iasl ~/programs/iasl
-
- -=3D=3D=3D=3DModify Conf Files=3D=3D=3D=3D - -Once the Intel ASL compiler has been successfully built the Conf/tools_d= ef.txt will need to be updated so the ASL compiler can be used. - -Find the following statement in Conf/tools_def.txt and comment the line = out: - -
-DEFINE UNIX_IASL_BIN           =3D /usr/bin/iasl
-
- -Next, find the following statement and uncomment the line: - -
-DEFINE UNIX_IASL_BIN           =3D $(HOME)/programs/iasl
-
- -=3D=3D=3DBuild [http://www.tianocore.org/ovmf/ OVMF]=3D=3D=3D - -Once your build environment is set up you might be interested in buildin= g the [http://www.tianocore.org/ovmf/ OVMF] platform which is included in= the main edk2 source tree. Since [http://www.tianocore.org/ovmf/ OVMF] = builds a full system firmware image this may be of interest to UEFI syste= m firmware developers. +__NOTOC__ +=3D=3DCommon instructions for Unix =3D=3D + + Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to + build edk2 for the first time. This page is retained for referen= ce. + +New instructions: [[Build-Instructions.md|Build Instructions]] + +A significant portion of the steps are common on the various UNIX-like p= latforms. You should start with the instructions for the operating syste= m that most closely matches your platform, and it will direct you here at= the appropriate time. + +Note these instructions are not for current Linux distributions, only UN= IX-like systems that do not work with the [[Using EDK II with Native GCC]= ] instructions. Please follow the [[Using EDK II with Native GCC]] guide = for mainstream Linux distros. + +=3D=3D=3DGet the edk2 source tree using Git =3D=3D=3D + +
+bash$ mkdir ~/src
+bash$ cd ~/src
+bash$ git clone https://github.com/tianocore/edk2
+
+ +=3D=3D=3D=3DFor EDKII project developers:=3D=3D=3D=3D +* Clone the EDK II project repository +** git clone https://github.com/tianocore/edk2 +* Change to the edk2 directory +* Build the tools +** make -C BaseTools +* Run the edksetup.sh script +** . edksetup.sh +When the above steps are done, you can work in the edk2 directory for co= de development. + +=3D=3D=3DBuild the EDK II BaseTools=3D=3D=3D + +
+bash$ make -C edk2/BaseTools
+
+ +=3D=3D=3DBuild gcc x64 UEFI cross compiler=3D=3D=3D + +In order to build UEFI images for x64, you will need to build a cross-co= mpiler build of gcc. This can take quite a while to complete, possibly s= everal hours on older systems. But, a Python script has been provided to= automate this build process. + +Note: This is only needed if behind a internet firewall! +
+bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
+
+ +To build gcc for x64, use these commands (this will take quite a while t= o complete): + +
+bash$ cd ~/src/edk2/BaseTools/gcc
+bash$ ./mingw-gcc-build.py --arch=3Dx64 \
+  --prefix=3D~/programs/gcc/x64
+
+ +=3D=3D=3DSetup build shell environment=3D=3D=3D + +
+bash$ cd ~/src/edk2
+bash$ export EDK_TOOLS_PATH=3D~/src/edk2/BaseTools
+bash$ . edksetup.sh BaseTools
+
+ +=3D=3D=3DModify Conf Files=3D=3D=3D + +You will need to edit the Conf/tools_def.txt and Conf/target.txt files. = These changes will enable the MdeModulePkg to be built using the gcc x64= compiler. + +=3D=3D=3D=3DEnable GCC X64 Cross-Compiler=3D=3D=3D=3D + +For the Conf/tools_def.txt file, find the following entry and comment th= e line out: + +
+DEFINE UNIXGCC_X64_PETOOLS_PREFIX  =3D /opt/tiano/x86_64-pc-mingw64/x86_=
64-pc-mingw64/bin/
+
+ +Next, find the following entry and uncomment the line: + +
+DEFINE UNIXGCC_X64_PETOOLS_PREFIX  =3D ENV(HOME)/programs/gcc/x64/bin/x8=
6_64-pc-mingw32-
+
+ +=3D=3D=3D=3DSet Build Target Information=3D=3D=3D=3D + +For the Conf/target.txt file, find the following lines: + +
+ACTIVE_PLATFORM       =3D Nt32Pkg/Nt32Pkg.dsc
+TARGET_ARCH           =3D IA32
+TOOL_CHAIN_TAG        =3D MYTOOLS
+
+ +And change the cooresponding lines to match these: + +
+ACTIVE_PLATFORM       =3D MdeModulePkg/MdeModulePkg.dsc
+TARGET_ARCH           =3D X64
+TOOL_CHAIN_TAG        =3D UNIXGCC
+
+ +=3D=3D=3DBuild Hello World! (and the rest of MdeModulePkg)=3D=3D=3D + +Now you should be able to simply run the build command to compile the Md= eModulePkg. + +
+bash$ build
+
+ +As a tangible result of the build, you should have the HelloWorld UEFI X= 64 application. If you have a X64 UEFI system available to you, then thi= s application should be able to run successfully under the shell. + +
+bash$ ls Build/MdeModule/DEBUG_UNIXGCC/X64/HelloWorld.efi
+
+ +=3D=3DEnabling Other Tools=3D=3D + +The above showed how to setup an X64 build environment for building the = core MdeModulePkg. However, other packages may require additional tools = such as an IA32 cross-compiler and an ASL compiler. The steps to build t= hese tools are described in this section. + +=3D=3D=3DBuild gcc IA32 UEFI cross compiler=3D=3D=3D + +In order to build UEFI images for IA32, you will need to build a cross-c= ompiler build of gcc. This can take quite a while to complete, possibly = several hours on older systems. But, a Python script has been provided t= o automate this build process. + +Note: This is only needed if behind a internet firewall! +
+bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
+
+ +To build gcc for IA32, use these commands (this will take quite a while = to complete): + +
+bash$ cd ~/src/edk2/BaseTools/gcc
+bash$ ./mingw-gcc-build.py --arch=3Dia32 \
+  --prefix=3D~/programs/gcc/ia32
+
+ +=3D=3D=3D=3DModify Conf Files=3D=3D=3D=3D + +Once the cross-compiler has been successfully built the Conf/tools_def.t= xt will need to be updated so the cross-compiler can be used. + +Find the following statement in Conf/tools_def.txt and comment the line = out: + +
+DEFINE UNIXGCC_IA32_PETOOLS_PREFIX =3D /opt/tiano/i386-tiano-pe/i386-tia=
no-pe/bin/
+
+ +Next, find the following statement and uncomment the line: + +
+DEFINE UNIXGCC_IA32_PETOOLS_PREFIX =3D ENV(HOME)/programs/gcc/ia32/bin/i=
686-pc-mingw32-
+
+ +To enable building your target image with IA32 support the Conf/target.t= xt will also need to be modified. + +Find the TARGET_ARCH definition in Conf/target.txt and change the corres= ponding line to match this + +
+TARGET_ARCH           =3D IA32
+
+ +=3D=3D=3DBuild the Intel ASL (iasl) compiler=3D=3D=3D + +The Intel ASL compiler is not required for all edk2 developers. It is u= nlikely that UEFI Application or UEFI Driver builds will need an ASL comp= iler. But, if you are building an entire system firmware image, then you= may need an ASL compiler. For example, the edk2 OVMF sample platform do= es require an ASL compiler in order to be built. + +First, download the latest ACPI-CA release from http://www.acpica.org. + +'''OS X users''': At this time, the latest versions of ACPI-CA are not b= uilding on Mac OS X, so please use the release from 20081031 instead. + +
+bash$ cd ~/src
+bash$ wget http://www.acpica.org/download/acpica-unix-20090521.tar.gz
+bash$ tar -zxf acpica-unix-20090521.tar.gz
+bash$ make -C acpica-unix-20090521/compiler
+bash$ ln -s ~/src/acpica-unix-20090521/compiler/iasl ~/programs/iasl
+
+ +=3D=3D=3D=3DModify Conf Files=3D=3D=3D=3D + +Once the Intel ASL compiler has been successfully built the Conf/tools_d= ef.txt will need to be updated so the ASL compiler can be used. + +Find the following statement in Conf/tools_def.txt and comment the line = out: + +
+DEFINE UNIX_IASL_BIN           =3D /usr/bin/iasl
+
+ +Next, find the following statement and uncomment the line: + +
+DEFINE UNIX_IASL_BIN           =3D $(HOME)/programs/iasl
+
+ +=3D=3D=3DBuild [http://www.tianocore.org/ovmf/ OVMF]=3D=3D=3D + +Once your build environment is set up you might be interested in buildin= g the [http://www.tianocore.org/ovmf/ OVMF] platform which is included in= the main edk2 source tree. Since [http://www.tianocore.org/ovmf/ OVMF] = builds a full system firmware image this may be of interest to UEFI syste= m firmware developers. diff --git a/Common-instructions.mediawiki b/Common-instructions.mediawik= i index 6e752e5699db..956813cda163 100644 --- a/Common-instructions.mediawiki +++ b/Common-instructions.mediawiki @@ -1,103 +1,108 @@ -__NOTOC__ -=3DCommon EDK II Build Instructions for Linux=3D - -These instructions assume you have installed Linux packages required for= an [[EDK II]] build environment, including git (example: [https://github= .com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC#Ubun= tu_1604_LTS__Ubuntu_1610|Ubuntu 16.04/16.10]). The following instructions= are common to the majority of Linux environments. - -=3D=3D=3DGet the edk2 source tree using Git =3D=3D=3D - -
-bash$ mkdir ~/src
-bash$ cd ~/src
-bash$ git clone https://github.com/tianocore/edk2
-
- -Note: the 'git clone' command above pulls the latest code from edk2. If = you want to work from a stable release, specify a release tag when clonin= g. Example: - -
-bash$ git clone https://github.com/tianocore/edk2.git vUDK2017
-
- -=3D=3D=3DInitialize submodules=3D=3D=3D - -
-bash$ git submodule update --init
-
- -=3D=3D=3DCompile build tools =3D=3D=3D - -
-bash$ cd ~/src/edk2
-bash$ make -C BaseTools
-bash$ . edksetup.sh
-
- -When the above steps are done, you can work in the edk2 directory for co= de development. - -=3D=3D=3DBuild the EDK II BaseTools=3D=3D=3D - -
-bash$ make -C edk2/BaseTools
-
- -=3D=3D=3DSetup build shell environment=3D=3D=3D - -
-bash$ cd ~/src/edk2
-bash$ export EDK_TOOLS_PATH=3D$HOME/src/edk2/BaseTools
-bash$ . edksetup.sh BaseTools
-
- -=3D=3D=3DModify Conf Files=3D=3D=3D - -Running edksetup.sh populates the edk2/Conf di= rectory with default configuration files. You will need to edit the Conf/target.txt file to set the build platform, target architectu= re, tool chain, and multi-threading options. The example below is based o= n building the MdeModulePkg using GCC5. - -=3D=3D=3D=3DSet Build Target Information=3D=3D=3D=3D - -For the Conf/target.txt file, find the following lines: - -
-ACTIVE_PLATFORM       =3D Nt32Pkg/Nt32Pkg.dsc
-TOOL_CHAIN_TAG        =3D MYTOOLS
-
- -And change the corresponding lines to match these: - -
-ACTIVE_PLATFORM       =3D MdeModulePkg/MdeModulePkg.dsc
-TOOL_CHAIN_TAG        =3D GCC5
-
- -:Note: The gcc --version command can be used to find out yo= ur GCC version. Use the '''GCC45''' toolchain for gcc 4.5.* and the '''G= CC46''' toolchain for gcc 4.6.*. - -:Note: for GCC5 please install the gcc-5 package. Example for Ubuntu: sudo apt-get install gcc-5 - -Locate the TARGET_ARCH setting: - -
-TARGET_ARCH           =3D IA32
-
- -Change this reflect the build architecture for the final UEFI binary. - -:Example: X64, IA32 X64 (which will build both= architectures). - -Optional: enable multi-threaded build. The default value for MAX_C= ONCURRENT_THREAD_NUMBER is 1, which disables multi-threaded build.= Change this value based on your system's multi-threading capabilities. T= he formula is '1 + (2 x processor threads)'. - -:Example: for an Intel Core i5 (two processor cores w/ hyperthreading), = the value is 9. - -=3D=3D=3DBuild Hello World! (and the rest of MdeModulePkg)=3D=3D=3D - -Now you should be able to simply run the build command to compile = MdeModulePkg. - -
-bash$ build
-
- -One result of the build is that you should have the HelloWorld UEFI appl= ication: -
-bash$ ls Build/MdeModule/DEBUG_*/*/HelloWorld.efi
-
- -=3D=3D=3DBuild [[OVMF]]=3D=3D=3D - -Once your build environment is set up you might be interested in [[How t= o build OVMF|building the OVMF platform]] which is included in the main [= [EDK II]] source tree. Since [[OVMF]] builds a full system firmware imag= e, this may be of interest to UEFI system firmware developers. +__NOTOC__ +=3DCommon EDK II Build Instructions for Linux=3D + + Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to + build edk2 for the first time. This page is retained for referen= ce. + +New instructions: [[Build-Instructions.md|Build Instructions]] + +These instructions assume you have installed Linux packages required for= an [[EDK II]] build environment, including git (example: [https://github= .com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC#Ubun= tu_1604_LTS__Ubuntu_1610|Ubuntu 16.04/16.10]). The following instructions= are common to the majority of Linux environments. + +=3D=3D=3DGet the edk2 source tree using Git =3D=3D=3D + +
+bash$ mkdir ~/src
+bash$ cd ~/src
+bash$ git clone https://github.com/tianocore/edk2
+
+ +Note: the 'git clone' command above pulls the latest code from edk2. If = you want to work from a stable release, specify a release tag when clonin= g. Example: + +
+bash$ git clone https://github.com/tianocore/edk2.git vUDK2017
+
+ +=3D=3D=3DInitialize submodules=3D=3D=3D + +
+bash$ git submodule update --init
+
+ +=3D=3D=3DCompile build tools =3D=3D=3D + +
+bash$ cd ~/src/edk2
+bash$ make -C BaseTools
+bash$ . edksetup.sh
+
+ +When the above steps are done, you can work in the edk2 directory for co= de development. + +=3D=3D=3DBuild the EDK II BaseTools=3D=3D=3D + +
+bash$ make -C edk2/BaseTools
+
+ +=3D=3D=3DSetup build shell environment=3D=3D=3D + +
+bash$ cd ~/src/edk2
+bash$ export EDK_TOOLS_PATH=3D$HOME/src/edk2/BaseTools
+bash$ . edksetup.sh BaseTools
+
+ +=3D=3D=3DModify Conf Files=3D=3D=3D + +Running edksetup.sh populates the edk2/Conf di= rectory with default configuration files. You will need to edit the Conf/target.txt file to set the build platform, target architectu= re, tool chain, and multi-threading options. The example below is based o= n building the MdeModulePkg using GCC5. + +=3D=3D=3D=3DSet Build Target Information=3D=3D=3D=3D + +For the Conf/target.txt file, find the following lines: + +
+ACTIVE_PLATFORM       =3D Nt32Pkg/Nt32Pkg.dsc
+TOOL_CHAIN_TAG        =3D MYTOOLS
+
+ +And change the corresponding lines to match these: + +
+ACTIVE_PLATFORM       =3D MdeModulePkg/MdeModulePkg.dsc
+TOOL_CHAIN_TAG        =3D GCC5
+
+ +:Note: The gcc --version command can be used to find out yo= ur GCC version. Use the '''GCC45''' toolchain for gcc 4.5.* and the '''G= CC46''' toolchain for gcc 4.6.*. + +:Note: for GCC5 please install the gcc-5 package. Example for Ubuntu: sudo apt-get install gcc-5 + +Locate the TARGET_ARCH setting: + +
+TARGET_ARCH           =3D IA32
+
+ +Change this reflect the build architecture for the final UEFI binary. + +:Example: X64, IA32 X64 (which will build both= architectures). + +Optional: enable multi-threaded build. The default value for MAX_C= ONCURRENT_THREAD_NUMBER is 1, which disables multi-threaded build.= Change this value based on your system's multi-threading capabilities. T= he formula is '1 + (2 x processor threads)'. + +:Example: for an Intel Core i5 (two processor cores w/ hyperthreading), = the value is 9. + +=3D=3D=3DBuild Hello World! (and the rest of MdeModulePkg)=3D=3D=3D + +Now you should be able to simply run the build command to compile = MdeModulePkg. + +
+bash$ build
+
+ +One result of the build is that you should have the HelloWorld UEFI appl= ication: +
+bash$ ls Build/MdeModule/DEBUG_*/*/HelloWorld.efi
+
+ +=3D=3D=3DBuild [[OVMF]]=3D=3D=3D + +Once your build environment is set up you might be interested in [[How t= o build OVMF|building the OVMF platform]] which is included in the main [= [EDK II]] source tree. Since [[OVMF]] builds a full system firmware imag= e, this may be of interest to UEFI system firmware developers. diff --git a/Getting-Started-with-EDK-II.mediawiki b/Getting-Started-with= -EDK-II.mediawiki index f616d1e86e4c..eb6da7dfdc56 100644 --- a/Getting-Started-with-EDK-II.mediawiki +++ b/Getting-Started-with-EDK-II.mediawiki @@ -1,4 +1,10 @@ __NOTOC__ + + Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to + build edk2 for the first time. This page is retained for referen= ce. + +New instructions: [[Build-Instructions.md|Build Instructions]] + =3DDownloading and Compiling Code=3D =20 This page shows the steps for downloading [[EDK II]] from GitHub and com= piling projects under various OS/compiler environments. @@ -15,24 +21,24 @@ Several build environments are supported and document= ed. If instructions are no '''Note:''' Some other build tools may be required depending on the proj= ect or package: * [[Nasm Setup|Nasm]] * [[ASL Setup|ASL Compiler]] -* Install Python 3.7 or later (https://www.python.org/) to run python t= ool from source=20 +* Install Python 3.7 or later (https://www.python.org/) to run python t= ool from source ** Python 2.7.10 or later can still be used with PYTHON_HOME =20 -'''Note:''' Some of the examples use the [[Multiple_Workspace]] `PACKAGE= S_PATH` feature to the configure EDK II build environment. For example, t= his is required for using platform code based on edk2-platforms: (https:/= /github.com/tianocore/edk2-platforms).=20 +'''Note:''' Some of the examples use the [[Multiple_Workspace]] `PACKAGE= S_PATH` feature to the configure EDK II build environment. For example, t= his is required for using platform code based on edk2-platforms: (https:/= /github.com/tianocore/edk2-platforms). =20 Once you have a basic build environment running, you can build a project= in RELEASE or [[EDK II Debugging|DEBUG]] mode. =20 =3D=3DGitHub Help=3D=3D =20 -GitHub (https://help.github.com/index.html) provides step-by-step instru= ctions for user registration and basic features supported by GitHub=20 +GitHub (https://help.github.com/index.html) provides step-by-step instru= ctions for user registration and basic features supported by GitHub =20 * Setup GitHub for Linux/Windows/MAC (https://help.github.com/articles/s= et-up-git) * Download and install a git GUI interface: git GUI Clients (https://git= -scm.com/download/gui/win) | TortoiseGit (https://tortoisegit.org/) =20 =3D=3D=3DGitHub EDK II Project Repositories=3D=3D=3D =20 -* The EDK II project repository is available at https://github.com/tiano= core/edk2.=20 -* Prebuilt Windows tools are available at https://github.com/tianocore/e= dk2-BaseTools-win32.=20 +* The EDK II project repository is available at https://github.com/tiano= core/edk2. +* Prebuilt Windows tools are available at https://github.com/tianocore/e= dk2-BaseTools-win32. * [[EDK II Platforms]] are available at https://github.com/tianocore/edk= 2-platforms. * Content that is not released under an accepted open source license can= be found at https://github.com/tianocore/edk2-non-osi. =20 diff --git a/UDK2017-How-to-Build.md b/UDK2017-How-to-Build.md index 4eca47f98e21..2f7f80125513 100644 --- a/UDK2017-How-to-Build.md +++ b/UDK2017-How-to-Build.md @@ -1,123 +1,129 @@ -# How to Build [[UDK2017]]=20 -Table of Contents -1) [HOW TO BUILD (WINDOWS SYSTEM)](#how-to-build-windows-system) -2) [ HOW TO BUILD (LINUX-LIKE SYSTEM)](#how-to-build-linux-like-system) - -## HOW TO BUILD (WINDOWS SYSTEM) - -The steps below are verified on Microsoft Windows 10 Enterprise*: - -1. Setup Build Environment - 1) Install Microsoft Visual Studio 2015* in the build machine and m= ake - sure that AMD64 complier was selected when installing. - 2) Download NASM 2.0.7 or later from http://www.nasm.us/ and instal= l it to - C:\Nasm. Make sure C:\Nasm is added to system environment variab= le 'PATH' - 3) Set up for using GitHub for Windows. See: - https://github.com/tianocore/tianocore.github.io/wiki/Getting-Starte= d-with-EDK-II#github-help - 4) Download and install Python2.7.x https://www.python.org/ for bu= ilding the BaseTools - Default install directory is: C:/Python27 - -2. Create the full Source Code directory for the UDK2017 release - 1) Create a working space directory in the build machine, for examp= le, C:\MyWorkspace - 2) Download the official UDK2017 release .zip file from the [UDK201= 7 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2017) - 1) Download - UDK2017 edk-vUDK2017 Workspace [Source code (zip f= ile)](https://github.com/tianocore/edk2/archive/vUDK2017.zip)=20 - 2) Extract files in [edk2-vUDK2017] to the working space directo= ry C:\MyWorkspace. - 3) **OR** Checkout the vUDK2017 Tag from GitHub with the following = "git" command
- 1) run `git clone https://github.com/tianocore/edk2.git vUDK20= 17` - 2) Move all files and folders under "vUDK2017" to "C:\MyWorkspa= ce" - 4) **Optional** (See _Compile the BaseTools_ below) Checkout BaseTo= ols binaries and copy them to BaseTools binary folder. Warning the Windo= ws* Binary tools are only valid for the tip of the https://github.com/ti= anocore/edk2 repository. - 1) `Cd C:\MyWorkspace` - 2) Run `git clone https://github.com/tianocore/edk2-BaseTools-= win32.git` - 3) Enter folder edk2-BaseTools-win32 - 4) Run the command `git checkout 0e088c19ab31fccd1d2f55d9e4fe0= 314b57c0097` - 5) `Cd C:\MyWorkSpace` - 6) Rename this folder from edk2-BaseTools-win32 to win32, then= copy the win32 - directory into the BaseTools/Bin directory under the workspac= e.=20 - (e.g. "C:\MyWorkspace\BaseTools\Bin\") =20 -3. Generate OpenSSL* Crypto Library - 1) Open file "C:\MyWorkspace\CryptoPkg\Library\OpensslLib\OpenSSL-H= OWTO.txt" - and follow the instruction to install OpenSSL* for UEFI building= . - For this release, please use OpenSSL-1.1.0e. - -4. Compile the BaseTools (Skip if Optional Step 2.iv was done above) Se= e:=20 - https://github.com/tianocore/tianocore.github.io/wiki/Windows-syste= ms#compile-tools - 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` - to enter the workspace directory - 2) Compile the BaseTools C source tools =20 -
-	set PYTHON_HOME=3DC:\Python27
-        set EDK_TOOLS_PATH=3D%CD%\BaseTools
-        BaseTools\toolssetup.bat Rebuild
-
- -5. Build Steps - *** NT32 *** - - 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` - to enter the workspace directory - 2) Use edksetup.bat command to initialize the working environment. - `edksetup --nt32` - 3) Type following command to build Nt32 platform - `build -t VS2015x86` - 4) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the C:\MyWorkspace\Build\MdeModule\DEB= UG_VS2015x86\IA32 directory - - ---- - -## HOW TO BUILD (LINUX-LIKE SYSTEM) -The below steps are verified on Ubuntu 16.04 LTS Desktop*: - -1. Setup Build Environment - 1) Follow instructions for setting up the build environment on tian= ocore.org. - "https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK= -II-with-Native-GCC" - 2) Please notice that here the root is `"~/src/MyWorkspace"` inst= ead - of `"~/src/edk2"` - 3) Make sure BaseTools is built and required software like iASL c= ompiler - are installed. Some operations need switch to user "root" to = execute. - At Ubuntu, you can type `"sudo apt-get install git"` under term= inal prompt "Cnt-Alt-T" to - install git. - 2) Install NASM 2.0.7 or later. - At Ubuntu, you can type `"sudo apt-get install nasm"` under term= inal prompt to - install it. - You can also download the source package from http://www.nasm.us= / and - install it following the instruction on the website. - 3) Install IASL 20150818 or later. - At Ubuntu, you can type `"sudo apt-get install iasl"` under term= inal prompt to - install it. - You can also download the source package from https://acpica.org= /downloads - and install it following the instruction on the website. - 4) Install the C Compiler- Ubuntu 16.04 LTS you can use GNU C comp= iler (v5.4.0)=20 - At Ubuntu, you can type `"sudo apt-get install gcc-5"` under ter= minal prompt to install it. - - -2. Create the full Source Code directory for the UDK2017 release - 1) Create a working space directory in the build machine, for examp= le, ~/src/MyWorkspace - 2) Download the official UDK2017 release .tar file from the [UDK201= 7 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2017) - 1) Download - UDK2017 edk-vUDK2017 Workspace [Source code (tar.g= z file)](https://github.com/tianocore/edk2/archive/vUDK2017.tar.gz)=20 - 2) Extract files in [edk2-vUDK2017] to the working space directo= ry ~/src/MyWorkspace. - 3) **OR** Checkout the vUDK2017 tag from GitHub with the following = "git" command=20 - 1) Run `"git clone https://github.com/tianocore/edk2.git vUDK20= 17"` - 2) Move all files and folders under "vUDK2017" to "~/src/MyWork= space" - =20 -3. Generate OpenSSL* Crypto Library - 1) Open file "~/src/MyWorkspace/CryptoPkg/Library/OpensslLib/OpenSS= L-HOWTO.txt" - and follow the instruction to install OpenSSL* for UEFI building= . - For this release, please use OpenSSL-1.1.0e. - -4. Build Steps - *** MdeModulePkg *** - 1) Open a terminal and type `"cd ~/src/MyWorkspace"` to enter the w= orkspace - directory. - 2) First build the BaseTools by typing=20 - `"make -C BaseTools"` - 3) Initialize the build environment by typing=20 - `". edksetup.sh"`. - 4) Type following command to build platforms using GCC v5.4.0
- `"build -p MdeModulePkg/MdeModulePkg.dsc -t GCC5"` - 5) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the ~/src/MyWorkspace/Build/MdeModule/= DEBUG_GCC5/IA32 directory -*** - -If you have questions please email the [[edk2-devel]] mail list. - -See also [[Getting Started with EDK II]] - +# How to Build [[UDK2017]] + +> Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to +> build edk2 for the first time and not specifically targeting UDK2017. = This page is retained for reference. + +New instructions: [Build Instructions](Build-Instructions.md) + +Table of Contents +1) [HOW TO BUILD (WINDOWS SYSTEM)](#how-to-build-windows-system) +2) [ HOW TO BUILD (LINUX-LIKE SYSTEM)](#how-to-build-linux-like-system) + +## HOW TO BUILD (WINDOWS SYSTEM) + +The steps below are verified on Microsoft Windows 10 Enterprise*: + +1. Setup Build Environment + 1) Install Microsoft Visual Studio 2015* in the build machine and m= ake + sure that AMD64 complier was selected when installing. + 2) Download NASM 2.0.7 or later from http://www.nasm.us/ and instal= l it to + C:\Nasm. Make sure C:\Nasm is added to system environment variab= le 'PATH' + 3) Set up for using GitHub for Windows. See: + https://github.com/tianocore/tianocore.github.io/wiki/Getting-Starte= d-with-EDK-II#github-help + 4) Download and install Python2.7.x https://www.python.org/ for bu= ilding the BaseTools + Default install directory is: C:/Python27 + +2. Create the full Source Code directory for the UDK2017 release + 1) Create a working space directory in the build machine, for examp= le, C:\MyWorkspace + 2) Download the official UDK2017 release .zip file from the [UDK201= 7 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2017) + 1) Download - UDK2017 edk-vUDK2017 Workspace [Source code (zip f= ile)](https://github.com/tianocore/edk2/archive/vUDK2017.zip) + 2) Extract files in [edk2-vUDK2017] to the working space directo= ry C:\MyWorkspace. + 3) **OR** Checkout the vUDK2017 Tag from GitHub with the following = "git" command
+ 1) run `git clone https://github.com/tianocore/edk2.git vUDK20= 17` + 2) Move all files and folders under "vUDK2017" to "C:\MyWorkspa= ce" + 4) **Optional** (See _Compile the BaseTools_ below) Checkout BaseTo= ols binaries and copy them to BaseTools binary folder. Warning the Windo= ws* Binary tools are only valid for the tip of the https://github.com/ti= anocore/edk2 repository. + 1) `Cd C:\MyWorkspace` + 2) Run `git clone https://github.com/tianocore/edk2-BaseTools-= win32.git` + 3) Enter folder edk2-BaseTools-win32 + 4) Run the command `git checkout 0e088c19ab31fccd1d2f55d9e4fe0= 314b57c0097` + 5) `Cd C:\MyWorkSpace` + 6) Rename this folder from edk2-BaseTools-win32 to win32, then= copy the win32 + directory into the BaseTools/Bin directory under the workspac= e. + (e.g. "C:\MyWorkspace\BaseTools\Bin\") +3. Generate OpenSSL* Crypto Library + 1) Open file "C:\MyWorkspace\CryptoPkg\Library\OpensslLib\OpenSSL-H= OWTO.txt" + and follow the instruction to install OpenSSL* for UEFI building= . + For this release, please use OpenSSL-1.1.0e. + +4. Compile the BaseTools (Skip if Optional Step 2.iv was done above) Se= e: + https://github.com/tianocore/tianocore.github.io/wiki/Windows-syste= ms#compile-tools + 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` + to enter the workspace directory + 2) Compile the BaseTools C source tools +
+	set PYTHON_HOME=3DC:\Python27
+        set EDK_TOOLS_PATH=3D%CD%\BaseTools
+        BaseTools\toolssetup.bat Rebuild
+
+ +5. Build Steps + *** NT32 *** + + 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` + to enter the workspace directory + 2) Use edksetup.bat command to initialize the working environment. + `edksetup --nt32` + 3) Type following command to build Nt32 platform + `build -t VS2015x86` + 4) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the C:\MyWorkspace\Build\MdeModule\DEB= UG_VS2015x86\IA32 directory + + +--- + +## HOW TO BUILD (LINUX-LIKE SYSTEM) +The below steps are verified on Ubuntu 16.04 LTS Desktop*: + +1. Setup Build Environment + 1) Follow instructions for setting up the build environment on tian= ocore.org. + "https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK= -II-with-Native-GCC" + 2) Please notice that here the root is `"~/src/MyWorkspace"` inst= ead + of `"~/src/edk2"` + 3) Make sure BaseTools is built and required software like iASL c= ompiler + are installed. Some operations need switch to user "root" to = execute. + At Ubuntu, you can type `"sudo apt-get install git"` under term= inal prompt "Cnt-Alt-T" to + install git. + 2) Install NASM 2.0.7 or later. + At Ubuntu, you can type `"sudo apt-get install nasm"` under term= inal prompt to + install it. + You can also download the source package from http://www.nasm.us= / and + install it following the instruction on the website. + 3) Install IASL 20150818 or later. + At Ubuntu, you can type `"sudo apt-get install iasl"` under term= inal prompt to + install it. + You can also download the source package from https://acpica.org= /downloads + and install it following the instruction on the website. + 4) Install the C Compiler- Ubuntu 16.04 LTS you can use GNU C comp= iler (v5.4.0) + At Ubuntu, you can type `"sudo apt-get install gcc-5"` under ter= minal prompt to install it. + + +2. Create the full Source Code directory for the UDK2017 release + 1) Create a working space directory in the build machine, for examp= le, ~/src/MyWorkspace + 2) Download the official UDK2017 release .tar file from the [UDK201= 7 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2017) + 1) Download - UDK2017 edk-vUDK2017 Workspace [Source code (tar.g= z file)](https://github.com/tianocore/edk2/archive/vUDK2017.tar.gz) + 2) Extract files in [edk2-vUDK2017] to the working space directo= ry ~/src/MyWorkspace. + 3) **OR** Checkout the vUDK2017 tag from GitHub with the following = "git" command + 1) Run `"git clone https://github.com/tianocore/edk2.git vUDK20= 17"` + 2) Move all files and folders under "vUDK2017" to "~/src/MyWork= space" + +3. Generate OpenSSL* Crypto Library + 1) Open file "~/src/MyWorkspace/CryptoPkg/Library/OpensslLib/OpenSS= L-HOWTO.txt" + and follow the instruction to install OpenSSL* for UEFI building= . + For this release, please use OpenSSL-1.1.0e. + +4. Build Steps + *** MdeModulePkg *** + 1) Open a terminal and type `"cd ~/src/MyWorkspace"` to enter the w= orkspace + directory. + 2) First build the BaseTools by typing + `"make -C BaseTools"` + 3) Initialize the build environment by typing + `". edksetup.sh"`. + 4) Type following command to build platforms using GCC v5.4.0
+ `"build -p MdeModulePkg/MdeModulePkg.dsc -t GCC5"` + 5) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the ~/src/MyWorkspace/Build/MdeModule/= DEBUG_GCC5/IA32 directory +*** + +If you have questions please email the [[edk2-devel]] mail list. + +See also [[Getting Started with EDK II]] + diff --git a/UDK2018-How-to-Build.md b/UDK2018-How-to-Build.md index b981b2162cc4..06a963a8e1e2 100644 --- a/UDK2018-How-to-Build.md +++ b/UDK2018-How-to-Build.md @@ -1,128 +1,134 @@ -# How to Build [[UDK2018]]=20 -Table of Contents -1) [HOW TO BUILD (WINDOWS SYSTEM)](#how-to-build-windows-system) -2) [ HOW TO BUILD (LINUX-LIKE SYSTEM)](#how-to-build-linux-like-system) - -## HOW TO BUILD (WINDOWS SYSTEM) - -The steps below are verified on Microsoft Windows 10 Enterprise*: - -1. Setup Build Environment - 1) Install Microsoft Visual Studio 2015* in the build machine and m= ake - sure that AMD64 complier was selected when installing. - 2) Download NASM 2.12.01 or later from http://www.nasm.us/ and inst= all it to - C:\Nasm. Make sure C:\Nasm is added to system environment variab= le 'PATH' - 3) Set up for using GitHub for Windows. See: - https://github.com/tianocore/tianocore.github.io/wiki/Getting-Starte= d-with-EDK-II#github-help - 4) Download and install Python2.7.x https://www.python.org/ for bu= ilding the BaseTools - Default install directory is: C:/Python27 - 5) Download the pre-compiled Openssl binary from https://wiki.opens= sl.org/index.php/Binaries. Search for a - Windows binary in the list of "_Third Party OpenSSL Related Bina= ry Distributions_" table that will be=20 - Windows binary. Go to the third party site to download the lates= t version of Windows x64 86 or Win32 binary. - Download and extract to C:\Openssl. Make sure C:\Openssl is adde= d to system environment=20 - variable 'PATH'.=20 - -2. Create the full Source Code directory for the UDK2018 release - 1) Create a working space directory in the build machine, for examp= le, C:\MyWorkspace - 2) Download the official UDK2018 release .zip file from the [UDK201= 8 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2018) - 1) Download - UDK2018 edk-vUDK2018 Workspace [Source code (zip f= ile)](https://github.com/tianocore/edk2/archive/vUDK2018.zip)=20 - 2) Extract files in [edk2-vUDK2018] to the working space directo= ry C:\MyWorkspace. - 3) **OR** Checkout the vUDK2018 Tag from GitHub with the following = "git" command
- 1) run `git clone https://github.com/tianocore/edk2.git vUDK2= 018` - 2) Go to the vUDK2018 directory, and from there run: `git check= out tags/vUDK2018 -b vUDK2018` - 3) Move all files and folders under "vUDK2018" to "C:\MyWorkspa= ce" - -3. Generate OpenSSL* Crypto Library - 1) Open file "C:\MyWorkspace\CryptoPkg\Library\OpensslLib\OpenSSL-H= OWTO.txt" - and follow the instruction to install OpenSSL* for UEFI building= . - For this release, please use OpenSSL-1.1.0g. Download it from=20 - https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.zip - Extract it to C:\MyWorkspace\CryptoPkg\Library\OpensslLib, - and rename its directory name to openssl - -4. Compile the BaseTools See:=20 - https://github.com/tianocore/tianocore.github.io/wiki/Windows-syste= ms#compile-tools - 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` - to enter the workspace directory - 2) Compile the BaseTools C source tools =20 -
-	set PYTHON_HOME=3DC:\Python27
-        edksetup.bat Rebuild
-
- -5. Build Steps - *** NT32 *** - - 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` - to enter the workspace directory - 2) Use edksetup.bat command to initialize the working environment. - `edksetup --nt32` - 3) Type following command to build Nt32 platform - `build -t VS2015x86` - 4) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the C:\MyWorkspace\Build\NT32IA32\DEBU= G_VS2015x86\IA32 directory - - ---- - -## HOW TO BUILD (LINUX-LIKE SYSTEM) -The below steps are verified on Ubuntu 16.04 LTS Desktop*: - -1. Setup Build Environment - 1) Follow instructions for setting up the build environment on tian= ocore.org. - "https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK= -II-with-Native-GCC" - - 2) Please notice that here the root is `"~/src/MyWorkspace`" ins= tead - of `"~/src/edk2"` - - 3) Make sure BaseTools is built and required software like iASL = compiler - is installed well. - a) Some operations need switch to user "root" to execute. - b) At Ubuntu, you can type `"sudo apt-get install git"` unde= r terminal "Cnt-Alt-T" to - install git. - 2) Install NASM 2.12.01 or later. - At Ubuntu, you can type "sudo apt-get install nasm" under termin= al to - install it. - You can also download the source package from http://www.nasm.us= / and - install it following the instruction on the website. - 3) Install IASL 20150818 or later. - At Ubuntu, you can type `"sudo apt-get install iasl"` under term= inal to - install it. - You can also download the source package from https://acpica.org= /downloads - and install it following the instruction on the website. - -2. Create the full Source Code directory for the UDK2018 release - 1) Create a working space directory in the build machine, for examp= le, ~/src/MyWorkspace - 2) Download the official UDK2018 release .tar file from the [UDK201= 8 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2018) - 1) Download - UDK2018 edk-vUDK2018 Workspace [Source code (tar.g= z file)](https://github.com/tianocore/edk2/archive/vUDK2018.tar.gz)=20 - 2) Extract files in [edk2-vUDK2018] to the working space directo= ry ~/src/MyWorkspace. - 3) **OR** Checkout the vUDK2018 tag from GitHub with the following = "git" command=20 - 1) Run `"git clone https://github.com/tianocore/edk2.git vUDK20= 18"` - 2) Go to the vUDK2018 directory, and from there run: `git check= out tags/vUDK2018 -b vUDK2018` - 3) Move all files and folders under "vUDK2018" to "~/src/MyWork= space" - =20 -3. Generate OpenSSL* Crypto Library - 1) Open file "~/src/MyWorkspace/CryptoPkg/Library/OpensslLib/OpenSS= L-HOWTO.txt" - and follow the instruction to install OpenSSL* for UEFI building= . - For this release, please use OpenSSL-1.1.0g. Download it f= rom=20 - https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.zip - Extract it to ~/src/MyWorkspace/CryptoPkg/Library/OpensslLib, - and rename its directory name to openssl - - -4. Build Steps - *** MdeModulePkg *** - 1) Open a terminal and type `"cd ~/src/MyWorkspace"` to enter the w= orkspace - directory. - 2) First build the BaseTools by typing=20 - `"make -C BaseTools"` - 3) Initialize the build environment by typing=20 - `". edksetup.sh"`. - 4) Type following command to build platforms using GCC v5.4.0
- `"build -p MdeModulePkg/MdeModulePkg.dsc -t GCC5"` - 5) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the ~/src/MyWorkspace/Build/MdeModule/= DEBUG_GCC5/IA32 directory -*** - -If you have questions please email the [[edk2-devel]] mail list. - -See also [[Getting Started with EDK II]] - +# How to Build [[UDK2018]] + +> Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to +> build edk2 for the first time and not specifically targeting UDK2018. = This page is retained for reference. + +New instructions: [Build Instructions](Build-Instructions.md) + +Table of Contents +1) [HOW TO BUILD (WINDOWS SYSTEM)](#how-to-build-windows-system) +2) [ HOW TO BUILD (LINUX-LIKE SYSTEM)](#how-to-build-linux-like-system) + +## HOW TO BUILD (WINDOWS SYSTEM) + +The steps below are verified on Microsoft Windows 10 Enterprise*: + +1. Setup Build Environment + 1) Install Microsoft Visual Studio 2015* in the build machine and m= ake + sure that AMD64 complier was selected when installing. + 2) Download NASM 2.12.01 or later from http://www.nasm.us/ and inst= all it to + C:\Nasm. Make sure C:\Nasm is added to system environment variab= le 'PATH' + 3) Set up for using GitHub for Windows. See: + https://github.com/tianocore/tianocore.github.io/wiki/Getting-Starte= d-with-EDK-II#github-help + 4) Download and install Python2.7.x https://www.python.org/ for bu= ilding the BaseTools + Default install directory is: C:/Python27 + 5) Download the pre-compiled Openssl binary from https://wiki.opens= sl.org/index.php/Binaries. Search for a + Windows binary in the list of "_Third Party OpenSSL Related Bina= ry Distributions_" table that will be + Windows binary. Go to the third party site to download the lates= t version of Windows x64 86 or Win32 binary. + Download and extract to C:\Openssl. Make sure C:\Openssl is adde= d to system environment + variable 'PATH'. + +2. Create the full Source Code directory for the UDK2018 release + 1) Create a working space directory in the build machine, for examp= le, C:\MyWorkspace + 2) Download the official UDK2018 release .zip file from the [UDK201= 8 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2018) + 1) Download - UDK2018 edk-vUDK2018 Workspace [Source code (zip f= ile)](https://github.com/tianocore/edk2/archive/vUDK2018.zip) + 2) Extract files in [edk2-vUDK2018] to the working space directo= ry C:\MyWorkspace. + 3) **OR** Checkout the vUDK2018 Tag from GitHub with the following = "git" command
+ 1) run `git clone https://github.com/tianocore/edk2.git vUDK2= 018` + 2) Go to the vUDK2018 directory, and from there run: `git check= out tags/vUDK2018 -b vUDK2018` + 3) Move all files and folders under "vUDK2018" to "C:\MyWorkspa= ce" + +3. Generate OpenSSL* Crypto Library + 1) Open file "C:\MyWorkspace\CryptoPkg\Library\OpensslLib\OpenSSL-H= OWTO.txt" + and follow the instruction to install OpenSSL* for UEFI building= . + For this release, please use OpenSSL-1.1.0g. Download it from + https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.zip + Extract it to C:\MyWorkspace\CryptoPkg\Library\OpensslLib, + and rename its directory name to openssl + +4. Compile the BaseTools See: + https://github.com/tianocore/tianocore.github.io/wiki/Windows-syste= ms#compile-tools + 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` + to enter the workspace directory + 2) Compile the BaseTools C source tools +
+	set PYTHON_HOME=3DC:\Python27
+        edksetup.bat Rebuild
+
+ +5. Build Steps + *** NT32 *** + + 1) Open a Microsoft Visual Studio* command prompt, type `cd C:\MyWo= rkspace` + to enter the workspace directory + 2) Use edksetup.bat command to initialize the working environment. + `edksetup --nt32` + 3) Type following command to build Nt32 platform + `build -t VS2015x86` + 4) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the C:\MyWorkspace\Build\NT32IA32\DEBU= G_VS2015x86\IA32 directory + + +--- + +## HOW TO BUILD (LINUX-LIKE SYSTEM) +The below steps are verified on Ubuntu 16.04 LTS Desktop*: + +1. Setup Build Environment + 1) Follow instructions for setting up the build environment on tian= ocore.org. + "https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK= -II-with-Native-GCC" + + 2) Please notice that here the root is `"~/src/MyWorkspace`" ins= tead + of `"~/src/edk2"` + + 3) Make sure BaseTools is built and required software like iASL = compiler + is installed well. + a) Some operations need switch to user "root" to execute. + b) At Ubuntu, you can type `"sudo apt-get install git"` unde= r terminal "Cnt-Alt-T" to + install git. + 2) Install NASM 2.12.01 or later. + At Ubuntu, you can type "sudo apt-get install nasm" under termin= al to + install it. + You can also download the source package from http://www.nasm.us= / and + install it following the instruction on the website. + 3) Install IASL 20150818 or later. + At Ubuntu, you can type `"sudo apt-get install iasl"` under term= inal to + install it. + You can also download the source package from https://acpica.org= /downloads + and install it following the instruction on the website. + +2. Create the full Source Code directory for the UDK2018 release + 1) Create a working space directory in the build machine, for examp= le, ~/src/MyWorkspace + 2) Download the official UDK2018 release .tar file from the [UDK201= 8 Release Page](https://github.com/tianocore/edk2/releases/tag/vUDK2018) + 1) Download - UDK2018 edk-vUDK2018 Workspace [Source code (tar.g= z file)](https://github.com/tianocore/edk2/archive/vUDK2018.tar.gz) + 2) Extract files in [edk2-vUDK2018] to the working space directo= ry ~/src/MyWorkspace. + 3) **OR** Checkout the vUDK2018 tag from GitHub with the following = "git" command + 1) Run `"git clone https://github.com/tianocore/edk2.git vUDK20= 18"` + 2) Go to the vUDK2018 directory, and from there run: `git check= out tags/vUDK2018 -b vUDK2018` + 3) Move all files and folders under "vUDK2018" to "~/src/MyWork= space" + +3. Generate OpenSSL* Crypto Library + 1) Open file "~/src/MyWorkspace/CryptoPkg/Library/OpensslLib/OpenSS= L-HOWTO.txt" + and follow the instruction to install OpenSSL* for UEFI building= . + For this release, please use OpenSSL-1.1.0g. Download it f= rom + https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.zip + Extract it to ~/src/MyWorkspace/CryptoPkg/Library/OpensslLib, + and rename its directory name to openssl + + +4. Build Steps + *** MdeModulePkg *** + 1) Open a terminal and type `"cd ~/src/MyWorkspace"` to enter the w= orkspace + directory. + 2) First build the BaseTools by typing + `"make -C BaseTools"` + 3) Initialize the build environment by typing + `". edksetup.sh"`. + 4) Type following command to build platforms using GCC v5.4.0
+ `"build -p MdeModulePkg/MdeModulePkg.dsc -t GCC5"` + 5) Upon the build completing successfully there should be the UEFI = Application "`HelloWorld.efi`" in the ~/src/MyWorkspace/Build/MdeModule/= DEBUG_GCC5/IA32 directory +*** + +If you have questions please email the [[edk2-devel]] mail list. + +See also [[Getting Started with EDK II]] + diff --git a/Unix-like-systems.mediawiki b/Unix-like-systems.mediawiki index 36fd1a2b1299..1d037b51513a 100644 --- a/Unix-like-systems.mediawiki +++ b/Unix-like-systems.mediawiki @@ -1,210 +1,215 @@ -This page provides ''step-by-step instructions'' for setting up a [http:= //www.tianocore.org/edk2/ EDK II] build environment on various Unix-like = systems. - -'''Note''': These instructions are not recommended for most EDK II devel= opers. If you are working with a supported Linux distribution, then the [= [Using EDK II with Native GCC]] instructions are faster, easier, and prod= uce a smaller UEFI binary image. - -=3D=3DGetting started for UNIX-like operating systems=3D=3D - -These instructions will be written as a series of commands executed from= a command terminal. - -Often these instructions will contain a command which needs to be execut= ed in the terminal window. For example: - -
-bash$ echo this bold text is a sample command
-
- -To execute this command, highlight the bold text of the command in your = web browser. Most web browsers should be able to copy the text by select= ing Copy under the Edit menu. Now, change back to the terminal applicati= on, and there should be a Paste operation under the Edit menu. After pas= ting the command into the shell, you may need to press the enter or retur= n key to execute the command.=20 - -Of course, there may be other ways to copy and paste the command into th= e terminal which are specific to the windowing environment and applicatio= ns that you are using. If all else fails, however, you can type the comm= and by hand. - -Some commands are very long, and we use the backslash character (\) to t= ell the shell program that the command is not finished. For example: - -
-bash$ echo this bold text is a sample command \
-        which is broken into two lines
-
- -When you copy and paste, make sure you include all lines of the command = (including the backslash (\) characters). If you are typing the command,= you can remove the backslash character (\) and combine the lines into a = single line if you prefer. - -If a command starts with the sudo command, then you may be prompted for = your user password. This will be the same password as you used to login = to the system. - -For the purposes of this set of instructions, we will be using the follo= wing paths. -{| -|Edk2 source tree: || ~/src/edk2 -|- -|GCC X64 cross-compiler installation: || ~/programs/gcc/x64 -|- -|GCC IA32 cross-compiler installation: || ~/programs/gcc/ia32 -|- -|Intel ASL Compiler installation: || ~/src/acpica-unix-20090521/compiler= /iasl (symlink to compiler at ~/programs/iasl) -|} - -You will need to change the commands if you want to use different locati= ons, but this is not recommended unless you are sure that you know what y= ou are doing. - -=3D=3D=3DInternet proxies=3D=3D=3D - -If your network utilizes a firewall with a web proxy, then you may need = to configure your proxy information for various command line applications= to work. You may need to consult with your network administrator to fin= d out the computer name and port to use for proxy setup. The following c= ommands are common examples of how you would configure your proxy by sett= ing an environment variable: - -
-bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
-bash$ export ftp_proxy=3D$http_proxy
-
- -To utilize the subversion source control command behind an internet fire= wall with a web proxy, you should configure the ~/.subversion/servers fil= e. - -=3D=3D Cygwin 1.7.1 =3D=3D -Notes: -* Cygwin is not officially supported or tested by the edk2 project at th= is time. -* Building of [http://www.tianocore.org/edk2/ EDK II] components will be= done using bash. -Prerequisites: -* Cygwin 1.7.1 is currently installed on the system. -* Cygwin 1.7.1 setup.exe is available on the system to install additiona= l packages as needed. - -Run Cygwin setup.exe and install the following additional packages. -* bison -* flex -* libgmp-devel -* libiconv -* libmpfr-devel -* gcc (use the compiler upgrade helper option under Devel) -* make -* python -* subversion -* wget -* libuuid-devel -* util-linux (for uuidgen) - -When pulling source files using subversion you may choose to get them to= a more Windows friendly location. All system drives are mapped under /c= ygdrive when using CYGWIN and bash (ie. C:\ maps to /cygdrive/c). This a= llows you to substitute ~/src/edk2 for an alternate path such as /cygdriv= e/c/src/edk2 so files can be access at C:\src\edk2 as well. - - -Continue with common instructions for Unix - - -The [[Common instructions for Unix|remaining instructions]] are common f= or most UNIX-like systems. - -=3D=3DFedora 11=3D=3D -Please note: -* Fedora 11 is not officially supported or tested by the edk2 project at= this time. -* These instructions assume that the Software Development option was ena= bled during the Fedora installation. - -=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D - -These instructions will utilize Fedora's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the System Tools sub-menu. - -=3D=3D=3DInstall MPFR library=3D=3D=3D - -The MPFR library must be installed to allow the gcc cross compiler to be= built. - -
-bash$ mkdir ~/src
-bash$ cd ~/src
-bash$ wget http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.bz2
-bash$ tar -jxf mpfr-2.4.1.tar.bz2
-bash$ cd mpfr-2.4.1
-bash$ ./configure --prefix=3D/usr
-bash$ make
-
- -To install the library, you must be root. Therefore we use 'su' to beco= me the root user, for the 'make install' command. - -
-bash$ su
-bash$ make install
-bash$ exit
-
- - -Continue with common instructions for Unix - - -The [[Common instructions for Unix |remaining instructions]] are common = for most UNIX-like systems. - -=3D=3DMac OS X 10.5=3D=3D -=3D=3D=3DXcode Tools=3D=3D=3D - -The first step is to install the Apple Xcode development environment: - http://developer.apple.com/tools/xcode - -To install Xcode, you must register as an Apple developer, and download = the Xcode installation disk image (which is fairly large). These instruc= tions were verified with Xcode 3.0. Within the Xcode Tools disk image, o= nly the Xcode Tools.mpkg package needs to be installed. - -=3D=3D=3DOpen OS X Terminal program=3D=3D=3D - -Past this point, the remaining instructions will utilize OS X's built in= command shell (bash) via the Terminal application. To open the command = terminal application, open Finder, then press the Cmd-Shift-U key combina= tion. (This opens the Applications =3D> Utilities folder.) In the Utili= ties folder, you should see the Terminal application. - -=3D=3D=3DGMP & MPFR (if behind a web proxy)=3D=3D=3D - -The gmp and mpfr libraries are needed to build the gcc cross compiler at= a later point in these instructions. Building these libraries on OS X c= an present some difficulties, so if you are not behind a network firewall= , then consider using the macports project to install these libraries. (s= ee below) Be sure to set the http_proxy and ftp_proxy environment variab= les before using the 'curl' commands below. - -
-bash$ mkdir ~/src
-bash$ cd ~/src
-bash$ curl --remote-name \
-  ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.2.tar.bz2
-bash$ tar jxvf gmp-4.2.2.tar.bz2
-bash$ cd gmp-4.2.2
-bash$ ./configure --prefix=3D/usr
-bash$ make
-bash$ make check
-bash$ sudo make install
-
- -Note: This might be needed for 64-bit machines if the MPFR configure fai= ls below. -
-bash$ export CFLAGS=3D"-m64"
-
- -
-bash$ cd ~/src
-bash$ curl --remote-name \
-  http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.bz2
-bash$ tar -jxf mpfr-2.4.1.tar.bz2
-bash$ cd mpfr-2.4.1
-bash$ ./configure --prefix=3D/usr
-bash$ make
-bash$ sudo make install
-
- -=3D=3D=3DGMP & MPFR via Macports (if not behind web proxy)=3D=3D=3D - -If you are not behind a network firewall, then the http://www.macports.o= rg project can greatly simlify the installation of gmp & mpfr. (Macports= does not work easily with web proxies at this time.) After installing ma= cports you should be able to simply run this command at the shell prompt. - -
-bash$ sudo port install gmp mpfr
-
- - -Continue with common instructions for Unix - - -The [[Common instructions for Unix|remaining instructions]] are common f= or most UNIX-like systems. - - - - -=3D=3DUbuntu 9.10=3D=3D -Note: The Ubuntu platform is not officially supported or tested by the e= dk2 project at this time. - -=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D - -These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. - -=3D=3D=3DInstall required software from apt=3D=3D=3D - -Several ubuntu packages will be needed to fully set up an edk2 build env= ironment. In order to easily install all the requirements, you need to r= un this command. - -
-bash$ sudo apt-get install build-essential uuid-dev texinfo \
-        bison flex libgmp3-dev libmpfr-dev subversion
-
- - -=3D=3DContinue with common instructions for Unix=3D=3D - - -The [[Common instructions for Unix|remaining instructions]] are common f= or most UNIX-like systems. - + Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to + build edk2 for the first time. This page is retained for referen= ce. + +New instructions: [[Build-Instructions.md|Build Instructions]] + +This page provides ''step-by-step instructions'' for setting up a [http:= //www.tianocore.org/edk2/ EDK II] build environment on various Unix-like = systems. + +'''Note''': These instructions are not recommended for most EDK II devel= opers. If you are working with a supported Linux distribution, then the [= [Using EDK II with Native GCC]] instructions are faster, easier, and prod= uce a smaller UEFI binary image. + +=3D=3DGetting started for UNIX-like operating systems=3D=3D + +These instructions will be written as a series of commands executed from= a command terminal. + +Often these instructions will contain a command which needs to be execut= ed in the terminal window. For example: + +
+bash$ echo this bold text is a sample command
+
+ +To execute this command, highlight the bold text of the command in your = web browser. Most web browsers should be able to copy the text by select= ing Copy under the Edit menu. Now, change back to the terminal applicati= on, and there should be a Paste operation under the Edit menu. After pas= ting the command into the shell, you may need to press the enter or retur= n key to execute the command. + +Of course, there may be other ways to copy and paste the command into th= e terminal which are specific to the windowing environment and applicatio= ns that you are using. If all else fails, however, you can type the comm= and by hand. + +Some commands are very long, and we use the backslash character (\) to t= ell the shell program that the command is not finished. For example: + +
+bash$ echo this bold text is a sample command \
+        which is broken into two lines
+
+ +When you copy and paste, make sure you include all lines of the command = (including the backslash (\) characters). If you are typing the command,= you can remove the backslash character (\) and combine the lines into a = single line if you prefer. + +If a command starts with the sudo command, then you may be prompted for = your user password. This will be the same password as you used to login = to the system. + +For the purposes of this set of instructions, we will be using the follo= wing paths. +{| +|Edk2 source tree: || ~/src/edk2 +|- +|GCC X64 cross-compiler installation: || ~/programs/gcc/x64 +|- +|GCC IA32 cross-compiler installation: || ~/programs/gcc/ia32 +|- +|Intel ASL Compiler installation: || ~/src/acpica-unix-20090521/compiler= /iasl (symlink to compiler at ~/programs/iasl) +|} + +You will need to change the commands if you want to use different locati= ons, but this is not recommended unless you are sure that you know what y= ou are doing. + +=3D=3D=3DInternet proxies=3D=3D=3D + +If your network utilizes a firewall with a web proxy, then you may need = to configure your proxy information for various command line applications= to work. You may need to consult with your network administrator to fin= d out the computer name and port to use for proxy setup. The following c= ommands are common examples of how you would configure your proxy by sett= ing an environment variable: + +
+bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
+bash$ export ftp_proxy=3D$http_proxy
+
+ +To utilize the subversion source control command behind an internet fire= wall with a web proxy, you should configure the ~/.subversion/servers fil= e. + +=3D=3D Cygwin 1.7.1 =3D=3D +Notes: +* Cygwin is not officially supported or tested by the edk2 project at th= is time. +* Building of [http://www.tianocore.org/edk2/ EDK II] components will be= done using bash. +Prerequisites: +* Cygwin 1.7.1 is currently installed on the system. +* Cygwin 1.7.1 setup.exe is available on the system to install additiona= l packages as needed. + +Run Cygwin setup.exe and install the following additional packages. +* bison +* flex +* libgmp-devel +* libiconv +* libmpfr-devel +* gcc (use the compiler upgrade helper option under Devel) +* make +* python +* subversion +* wget +* libuuid-devel +* util-linux (for uuidgen) + +When pulling source files using subversion you may choose to get them to= a more Windows friendly location. All system drives are mapped under /c= ygdrive when using CYGWIN and bash (ie. C:\ maps to /cygdrive/c). This a= llows you to substitute ~/src/edk2 for an alternate path such as /cygdriv= e/c/src/edk2 so files can be access at C:\src\edk2 as well. + + +Continue with common instructions for Unix + + +The [[Common instructions for Unix|remaining instructions]] are common f= or most UNIX-like systems. + +=3D=3DFedora 11=3D=3D +Please note: +* Fedora 11 is not officially supported or tested by the edk2 project at= this time. +* These instructions assume that the Software Development option was ena= bled during the Fedora installation. + +=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D + +These instructions will utilize Fedora's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the System Tools sub-menu. + +=3D=3D=3DInstall MPFR library=3D=3D=3D + +The MPFR library must be installed to allow the gcc cross compiler to be= built. + +
+bash$ mkdir ~/src
+bash$ cd ~/src
+bash$ wget http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.bz2
+bash$ tar -jxf mpfr-2.4.1.tar.bz2
+bash$ cd mpfr-2.4.1
+bash$ ./configure --prefix=3D/usr
+bash$ make
+
+ +To install the library, you must be root. Therefore we use 'su' to beco= me the root user, for the 'make install' command. + +
+bash$ su
+bash$ make install
+bash$ exit
+
+ + +Continue with common instructions for Unix + + +The [[Common instructions for Unix |remaining instructions]] are common = for most UNIX-like systems. + +=3D=3DMac OS X 10.5=3D=3D +=3D=3D=3DXcode Tools=3D=3D=3D + +The first step is to install the Apple Xcode development environment: + http://developer.apple.com/tools/xcode + +To install Xcode, you must register as an Apple developer, and download = the Xcode installation disk image (which is fairly large). These instruc= tions were verified with Xcode 3.0. Within the Xcode Tools disk image, o= nly the Xcode Tools.mpkg package needs to be installed. + +=3D=3D=3DOpen OS X Terminal program=3D=3D=3D + +Past this point, the remaining instructions will utilize OS X's built in= command shell (bash) via the Terminal application. To open the command = terminal application, open Finder, then press the Cmd-Shift-U key combina= tion. (This opens the Applications =3D> Utilities folder.) In the Utili= ties folder, you should see the Terminal application. + +=3D=3D=3DGMP & MPFR (if behind a web proxy)=3D=3D=3D + +The gmp and mpfr libraries are needed to build the gcc cross compiler at= a later point in these instructions. Building these libraries on OS X c= an present some difficulties, so if you are not behind a network firewall= , then consider using the macports project to install these libraries. (s= ee below) Be sure to set the http_proxy and ftp_proxy environment variab= les before using the 'curl' commands below. + +
+bash$ mkdir ~/src
+bash$ cd ~/src
+bash$ curl --remote-name \
+  ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.2.tar.bz2
+bash$ tar jxvf gmp-4.2.2.tar.bz2
+bash$ cd gmp-4.2.2
+bash$ ./configure --prefix=3D/usr
+bash$ make
+bash$ make check
+bash$ sudo make install
+
+ +Note: This might be needed for 64-bit machines if the MPFR configure fai= ls below. +
+bash$ export CFLAGS=3D"-m64"
+
+ +
+bash$ cd ~/src
+bash$ curl --remote-name \
+  http://www.mpfr.org/mpfr-current/mpfr-2.4.1.tar.bz2
+bash$ tar -jxf mpfr-2.4.1.tar.bz2
+bash$ cd mpfr-2.4.1
+bash$ ./configure --prefix=3D/usr
+bash$ make
+bash$ sudo make install
+
+ +=3D=3D=3DGMP & MPFR via Macports (if not behind web proxy)=3D=3D=3D + +If you are not behind a network firewall, then the http://www.macports.o= rg project can greatly simlify the installation of gmp & mpfr. (Macports= does not work easily with web proxies at this time.) After installing ma= cports you should be able to simply run this command at the shell prompt. + +
+bash$ sudo port install gmp mpfr
+
+ + +Continue with common instructions for Unix + + +The [[Common instructions for Unix|remaining instructions]] are common f= or most UNIX-like systems. + + + + +=3D=3DUbuntu 9.10=3D=3D +Note: The Ubuntu platform is not officially supported or tested by the e= dk2 project at this time. + +=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D + +These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. + +=3D=3D=3DInstall required software from apt=3D=3D=3D + +Several ubuntu packages will be needed to fully set up an edk2 build env= ironment. In order to easily install all the requirements, you need to r= un this command. + +
+bash$ sudo apt-get install build-essential uuid-dev texinfo \
+        bison flex libgmp3-dev libmpfr-dev subversion
+
+ + +=3D=3DContinue with common instructions for Unix=3D=3D + + +The [[Common instructions for Unix|remaining instructions]] are common f= or most UNIX-like systems. + diff --git a/Using-EDK-II-with-Native-GCC.mediawiki b/Using-EDK-II-with-N= ative-GCC.mediawiki index e17f5056b446..ea8c8f9326dc 100644 --- a/Using-EDK-II-with-Native-GCC.mediawiki +++ b/Using-EDK-II-with-Native-GCC.mediawiki @@ -1,241 +1,244 @@ - - -This page provides ''step-by-step instructions'' for setting up a [http:= //www.tianocore.org/edk2/ EDK II] build environment on Linux using a nati= ve GCC installation (4.4+). This EDK II setup does not require the Mingw= version of GCC to be built, and therefore can be much faster to setup. - -=3D=3DGetting Started=3D=3D - -These instructions will be written as a series of commands executed from= a command terminal.Often these instructions will contain a command which= needs to be executed in the terminal window. For example: - -
-bash$ echo this text is a sample command
-
- -To execute this command, highlight the text of the command in your web b= rowser. (Note that the 'bash$' text is not part of the command!) Most w= eb browsers should be able to copy the text by selecting Copy under the E= dit menu. Now, change back to the terminal application, and there should= be a Paste operation under the Edit menu. After pasting the command int= o the shell, you may need to press the enter or return key to execute the= command.=20 - -Of course, there may be other ways to copy and paste the command into th= e terminal which are specific to the windowing environment and applicatio= ns that you are using. If all else fails, however, you can type the comm= and by hand. - -Some commands are very long, and we use the backslash character (\) to t= ell the shell program that the command is not finished. For example: - -
-bash$ echo this bold text is a sample command \
-        which is broken into two lines
-
- -When you copy and paste, make sure you include all lines of the command = (including the backslash (\) characters). If you are typing the command,= you can remove the backslash character (\) and combine the lines into a = single line if you prefer. - -If a command starts with the sudo command, then you may be prompted for = your user password. This will be the same password as you used to login = to the system. - -For the purposes of this set of instructions, we will be using the follo= wing paths. -{| -|Edk2 source tree: || $HOME/src/edk2 -|- -|Native GCC 4.x compiler installation: || /usr/bin/gcc -|- -|Intel ASL Compiler installation: || /usr/bin/iasl -|} - -You will need to change the commands if you want to use different locati= ons, but this is not recommended unless you are sure that you know what y= ou are doing. - -=3D=3D=3DInternet proxies=3D=3D=3D - -If your network utilizes a firewall with a web proxy, then you may need = to configure your proxy information for various command line applications= to work. You may need to consult with your network administrator to fin= d out the computer name and port to use for proxy setup. The following c= ommands are common examples of how you would configure your proxy by sett= ing an environment variable: - -
-bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
-bash$ export ftp_proxy=3D$http_proxy
-
- -To utilize the subversion source control command behind an internet fire= wall with a web proxy, you should configure the ~/.subversion/servers fil= e. - -=3D=3D=3DUbuntu 20.04 LTS=3D=3D=3D - -Note: These instructions utilize GCC5 & NASM compiler support (added in = early 2016), along with git (replaces subversion). GCC 4.x is still suppo= rted. GCC5 is not mandatory. - -=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D - -These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. - -=3D=3D=3D=3DInstall required software from apt=3D=3D=3D=3D - -Several Ubuntu packages will be needed to set up the build environment f= or EDK II. The following command will install all required packages: - -
-bash$ sudo apt install build-essential uuid-dev iasl git  nasm  python-i=
s-python3
-
- -:build-essential - Informational list of build-essential packages=20 -:uuid-dev - Universally Unique ID library (headers and static libraries= ) -:iasl - Intel ASL compiler/decompiler (also provided by acpica-tools) -:git - support for git revision control system=20 -:nasm - General-purpose x86 assembler -:python-is-python3 - Ubuntu 20.04 python command is 'python3' but edk2 t= ools use 'python' - - -=3D=3D=3DContinue with common instructions=3D=3D=3D - -The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. - - - -=3D=3D=3DUbuntu 16.04 LTS / Ubuntu 16.10=3D=3D=3D - -Note: These instructions utilize GCC5 & NASM compiler support (added in = early 2016), along with git (replaces subversion). GCC 4.x is still suppo= rted. GCC5 is not mandatory. - -=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D - -These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. - -=3D=3D=3D=3DInstall required software from apt=3D=3D=3D=3D - -Several Ubuntu packages will be needed to set up the build environment f= or EDK II. The following command will install all required packages: - -
-bash$ sudo apt-get install build-essential uuid-dev iasl git gcc-5 nasm =
python3-distutils
-
- -:build-essential - Informational list of build-essential packages=20 -:uuid-dev - Universally Unique ID library (headers and static libraries= ) -:iasl - Intel ASL compiler/decompiler (also provided by acpica-tools) -:git - support for git revision control system=20 -:gcc-5 - GNU C compiler (v5.4.0 as of Ubuntu 16.04 LTS) -:nasm - General-purpose x86 assembler -:python3-distutils - distutils module from the Python standard library - -=3D=3D=3DContinue with common instructions=3D=3D=3D - -The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. - - -=3D=3DInstructions for older Linux Environments=3D=3D - -Note: the instructions below have not been updated for compilers newer t= han GCC 4.4, git (replaces subversion) or NASM. Newer builds may fail wit= hout satisfying these dependecies. We recommend moving to newer Linux dis= tributions unless you have a dependency on a specific version. - -=3D=3D=3DNote: Limitations of GCC 4.4=3D=3D=3D - -Note: The GCC 4.4 toolchain only supports building images for the IA32 a= nd X64 architectures. We recommend using newer toolchains. - -Also, in some cases if GCC 4.4 is installed under Linux x86 (32-bit mode= ), then it may only support building UEFI images for the IA32 architectur= e. - -=3D=3D=3DArch Linux 2010.05=3D=3D=3D -Note: Arch Linux is not officially supported or tested by the edk2 proje= ct at this time. - -=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D - -These instructions will utilize Arch Linux's built in command shell (bas= h) via the GNOME Terminal application. To open the Terminal application,= locate it under the Applications menu and the System Tools sub-menu. - -=3D=3D=3D=3DInstall required software with pacman=3D=3D=3D=3D - -To install the required packages, you must be root. Therefore we use 's= u' to become the root user. - -
-bash$ su -
-bash$ pacman -S base-devel glibc iasl python2 subversion
-bash$ exit
-
- - -Continue with common instructions - - -The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. - -=3D=3D=3DFedora 13=3D=3D=3D -Note: Fedora is not officially supported or tested by the edk2 project a= t this time. - -Note: x86 (32-bit) Fedora will install GCC 4.4 which is only capable of = building UEFI for the IA32 architecture. - -=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D - -These instructions will utilize Fedora's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the System Tools sub-menu. - -=3D=3D=3D=3DInstall required software with yum=3D=3D=3D=3D - -To install the required packages, you must be root. Therefore we use 's= u' to become the root user. - -
-bash$ su -
-bash$ yum groupinstall development-tools
-bash$ yum install iasl libuuid-devel
-bash$ exit
-
- - -Continue with common instructions - - -The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. - -=3D=3D=3DMandriva 2010=3D=3D=3D -Note: Mandriva is not officially supported or tested by the edk2 project= at this time. - -Note: x86 (32-bit) Mandriva will install GCC 4.4 which is only capable o= f building UEFI for the IA32 architecture. - -=3D=3D=3D=3DOpen the Terminal program=3D=3D=3D=3D - -These instructions will utilize Mandriva's built in command shell (bash)= via the Terminal application. To open the Terminal application, locate = it under the Applications menu and the Tools sub-menu. - -=3D=3D=3D=3DInstall required software with urpmi=3D=3D=3D=3D - -To install the required packages, you must be root. Therefore we use 's= u' to become the root user. - -
-bash$ su -
-bash$ urpmi task-c++-devel iasl libuuid-devel subversion
-bash$ exit
-
- - -Continue with common instructions - - -The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. - -=3D=3D=3DopenSUSE 12.1=3D=3D=3D - -Note: openSUSE is not officially supported or tested by the edk2 project= at this time. - -=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D - -These instructions will utilize openSUSE's built in command shell (bash)= via the GNOME Terminal application. To open the Terminal application, c= lick the 'Computer' menu, click the 'More Applications' button, and then = enter 'terminal' into the filter text box. - -=3D=3D=3D=3DInstall required software with zypper=3D=3D=3D=3D - -Several openSUSE packages will be needed to fully set up an edk2 build e= nvironment. In order to easily install all the requirements, you need to= run this command. - -
-bash> sudo zypper in -t pattern devel_basis
-
- - -Continue with common instructions - - -The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. - -=3D=3D=3DUbuntu 10.10=3D=3D=3D -Notes: -* The Ubuntu platform is not officially supported or tested by the edk2 = project at this time. -* Both the x86 (32-bit) and x86-64 (64-bit) Ubuntu versions will install= GCC 4.4 which is capable of building UEFI for both the IA32 and X64 arch= itectures. -* These instructions should work for Ubuntu 10.04 as well - -=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D - -These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. - -=3D=3D=3D=3DInstall required software from apt=3D=3D=3D=3D - -Several ubuntu packages will be needed to fully set up an edk2 build env= ironment. In order to easily install all the requirements, you need to r= un this command. - -
-bash$ sudo apt-get install build-essential subversion uuid-dev iasl
-
- - -=3D=3D=3DContinue with common instructions=3D=3D=3D - -The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. - - -=3DSee Also=3D - + Note: New build instructions are available. It is recommended to start= with the new instructions if learning how to + build edk2 for the first time. This page is retained for referen= ce. + +New instructions: [[Build-Instructions.md|Build Instructions]] + +This page provides ''step-by-step instructions'' for setting up a [http:= //www.tianocore.org/edk2/ EDK II] build environment on Linux using a nati= ve GCC installation (4.4+). This EDK II setup does not require the Mingw= version of GCC to be built, and therefore can be much faster to setup. + +=3D=3DGetting Started=3D=3D + +These instructions will be written as a series of commands executed from= a command terminal.Often these instructions will contain a command which= needs to be executed in the terminal window. For example: + +
+bash$ echo this text is a sample command
+
+ +To execute this command, highlight the text of the command in your web b= rowser. (Note that the 'bash$' text is not part of the command!) Most w= eb browsers should be able to copy the text by selecting Copy under the E= dit menu. Now, change back to the terminal application, and there should= be a Paste operation under the Edit menu. After pasting the command int= o the shell, you may need to press the enter or return key to execute the= command. + +Of course, there may be other ways to copy and paste the command into th= e terminal which are specific to the windowing environment and applicatio= ns that you are using. If all else fails, however, you can type the comm= and by hand. + +Some commands are very long, and we use the backslash character (\) to t= ell the shell program that the command is not finished. For example: + +
+bash$ echo this bold text is a sample command \
+        which is broken into two lines
+
+ +When you copy and paste, make sure you include all lines of the command = (including the backslash (\) characters). If you are typing the command,= you can remove the backslash character (\) and combine the lines into a = single line if you prefer. + +If a command starts with the sudo command, then you may be prompted for = your user password. This will be the same password as you used to login = to the system. + +For the purposes of this set of instructions, we will be using the follo= wing paths. +{| +|Edk2 source tree: || $HOME/src/edk2 +|- +|Native GCC 4.x compiler installation: || /usr/bin/gcc +|- +|Intel ASL Compiler installation: || /usr/bin/iasl +|} + +You will need to change the commands if you want to use different locati= ons, but this is not recommended unless you are sure that you know what y= ou are doing. + +=3D=3D=3DInternet proxies=3D=3D=3D + +If your network utilizes a firewall with a web proxy, then you may need = to configure your proxy information for various command line applications= to work. You may need to consult with your network administrator to fin= d out the computer name and port to use for proxy setup. The following c= ommands are common examples of how you would configure your proxy by sett= ing an environment variable: + +
+bash$ export http_proxy=3Dhttp://proxy.domain.com:proxy_port
+bash$ export ftp_proxy=3D$http_proxy
+
+ +To utilize the subversion source control command behind an internet fire= wall with a web proxy, you should configure the ~/.subversion/servers fil= e. + +=3D=3D=3DUbuntu 20.04 LTS=3D=3D=3D + +Note: These instructions utilize GCC5 & NASM compiler support (added in = early 2016), along with git (replaces subversion). GCC 4.x is still suppo= rted. GCC5 is not mandatory. + +=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D + +These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. + +=3D=3D=3D=3DInstall required software from apt=3D=3D=3D=3D + +Several Ubuntu packages will be needed to set up the build environment f= or EDK II. The following command will install all required packages: + +
+bash$ sudo apt install build-essential uuid-dev iasl git  nasm  python-i=
s-python3
+
+ +:build-essential - Informational list of build-essential packages +:uuid-dev - Universally Unique ID library (headers and static libraries= ) +:iasl - Intel ASL compiler/decompiler (also provided by acpica-tools) +:git - support for git revision control system +:nasm - General-purpose x86 assembler +:python-is-python3 - Ubuntu 20.04 python command is 'python3' but edk2 t= ools use 'python' + + +=3D=3D=3DContinue with common instructions=3D=3D=3D + +The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. + + + +=3D=3D=3DUbuntu 16.04 LTS / Ubuntu 16.10=3D=3D=3D + +Note: These instructions utilize GCC5 & NASM compiler support (added in = early 2016), along with git (replaces subversion). GCC 4.x is still suppo= rted. GCC5 is not mandatory. + +=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D + +These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. + +=3D=3D=3D=3DInstall required software from apt=3D=3D=3D=3D + +Several Ubuntu packages will be needed to set up the build environment f= or EDK II. The following command will install all required packages: + +
+bash$ sudo apt-get install build-essential uuid-dev iasl git gcc-5 nasm =
python3-distutils
+
+ +:build-essential - Informational list of build-essential packages +:uuid-dev - Universally Unique ID library (headers and static libraries= ) +:iasl - Intel ASL compiler/decompiler (also provided by acpica-tools) +:git - support for git revision control system +:gcc-5 - GNU C compiler (v5.4.0 as of Ubuntu 16.04 LTS) +:nasm - General-purpose x86 assembler +:python3-distutils - distutils module from the Python standard library + +=3D=3D=3DContinue with common instructions=3D=3D=3D + +The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. + + +=3D=3DInstructions for older Linux Environments=3D=3D + +Note: the instructions below have not been updated for compilers newer t= han GCC 4.4, git (replaces subversion) or NASM. Newer builds may fail wit= hout satisfying these dependecies. We recommend moving to newer Linux dis= tributions unless you have a dependency on a specific version. + +=3D=3D=3DNote: Limitations of GCC 4.4=3D=3D=3D + +Note: The GCC 4.4 toolchain only supports building images for the IA32 a= nd X64 architectures. We recommend using newer toolchains. + +Also, in some cases if GCC 4.4 is installed under Linux x86 (32-bit mode= ), then it may only support building UEFI images for the IA32 architectur= e. + +=3D=3D=3DArch Linux 2010.05=3D=3D=3D +Note: Arch Linux is not officially supported or tested by the edk2 proje= ct at this time. + +=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D + +These instructions will utilize Arch Linux's built in command shell (bas= h) via the GNOME Terminal application. To open the Terminal application,= locate it under the Applications menu and the System Tools sub-menu. + +=3D=3D=3D=3DInstall required software with pacman=3D=3D=3D=3D + +To install the required packages, you must be root. Therefore we use 's= u' to become the root user. + +
+bash$ su -
+bash$ pacman -S base-devel glibc iasl python2 subversion
+bash$ exit
+
+ + +Continue with common instructions + + +The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. + +=3D=3D=3DFedora 13=3D=3D=3D +Note: Fedora is not officially supported or tested by the edk2 project a= t this time. + +Note: x86 (32-bit) Fedora will install GCC 4.4 which is only capable of = building UEFI for the IA32 architecture. + +=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D + +These instructions will utilize Fedora's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the System Tools sub-menu. + +=3D=3D=3D=3DInstall required software with yum=3D=3D=3D=3D + +To install the required packages, you must be root. Therefore we use 's= u' to become the root user. + +
+bash$ su -
+bash$ yum groupinstall development-tools
+bash$ yum install iasl libuuid-devel
+bash$ exit
+
+ + +Continue with common instructions + + +The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. + +=3D=3D=3DMandriva 2010=3D=3D=3D +Note: Mandriva is not officially supported or tested by the edk2 project= at this time. + +Note: x86 (32-bit) Mandriva will install GCC 4.4 which is only capable o= f building UEFI for the IA32 architecture. + +=3D=3D=3D=3DOpen the Terminal program=3D=3D=3D=3D + +These instructions will utilize Mandriva's built in command shell (bash)= via the Terminal application. To open the Terminal application, locate = it under the Applications menu and the Tools sub-menu. + +=3D=3D=3D=3DInstall required software with urpmi=3D=3D=3D=3D + +To install the required packages, you must be root. Therefore we use 's= u' to become the root user. + +
+bash$ su -
+bash$ urpmi task-c++-devel iasl libuuid-devel subversion
+bash$ exit
+
+ + +Continue with common instructions + + +The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. + +=3D=3D=3DopenSUSE 12.1=3D=3D=3D + +Note: openSUSE is not officially supported or tested by the edk2 project= at this time. + +=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D + +These instructions will utilize openSUSE's built in command shell (bash)= via the GNOME Terminal application. To open the Terminal application, c= lick the 'Computer' menu, click the 'More Applications' button, and then = enter 'terminal' into the filter text box. + +=3D=3D=3D=3DInstall required software with zypper=3D=3D=3D=3D + +Several openSUSE packages will be needed to fully set up an edk2 build e= nvironment. In order to easily install all the requirements, you need to= run this command. + +
+bash> sudo zypper in -t pattern devel_basis
+
+ + +Continue with common instructions + + +The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. + +=3D=3D=3DUbuntu 10.10=3D=3D=3D +Notes: +* The Ubuntu platform is not officially supported or tested by the edk2 = project at this time. +* Both the x86 (32-bit) and x86-64 (64-bit) Ubuntu versions will install= GCC 4.4 which is capable of building UEFI for both the IA32 and X64 arch= itectures. +* These instructions should work for Ubuntu 10.04 as well + +=3D=3D=3D=3DOpen the GNOME Terminal program=3D=3D=3D=3D + +These instructions will utilize Ubuntu's built in command shell (bash) v= ia the GNOME Terminal application. To open the Terminal application, loc= ate it under the Applications menu and the Accessories sub-menu. + +=3D=3D=3D=3DInstall required software from apt=3D=3D=3D=3D + +Several ubuntu packages will be needed to fully set up an edk2 build env= ironment. In order to easily install all the requirements, you need to r= un this command. + +
+bash$ sudo apt-get install build-essential subversion uuid-dev iasl
+
+ + +=3D=3D=3DContinue with common instructions=3D=3D=3D + +The [[Common instructions|remaining instructions]] are common for most U= NIX-like systems. + + +=3DSee Also=3D + * [[Unix-like systems]] - Instructions which walk through building the M= ingw GCC cross-compiler \ No newline at end of file diff --git a/Windows-systems.mediawiki b/Windows-systems.mediawiki index ebb717a22464..6be6e9187be8 100644 --- a/Windows-systems.mediawiki +++ b/Windows-systems.mediawiki @@ -1,156 +1,162 @@ -__NOTOC__ -This page provides step-by-step instructions or setting up a [http://www= .tianocore.org/edk2/ EDK II] build environment on Windows systems. - -''Table of Contents'' -* [[Windows-systems#github-help|GitHub Help]] -* [[Windows-systems#how-to-setup-the-edk-ii-tree| How to Setup the EDK I= I Tree]] -* [[Windows-systems#download| Download]] Checkout EDK II source tree fr= om Github=20 -* [[Windows-systems#compile-tools |Compile Tools]] Build EDK II BaseTool= s for Windows=20 -* [[Windows-systems#build | BUILD]] EDK II - -=3D=3DGitHub Help=3D=3D - -GitHub (https://help.github.com/index.html) provides step-by-step instru= ctions for user registration and basic features supported by GitHub. - -=3D=3D=3D Git GUI Interface for Windows OS =3D=3D=3D -* Git for Windows OS is available at: (http://git-scm.com/download/win) -* TortoiseGit for windows OS is available at (https://tortoisegit.org/do= wnload/) - -=3D=3D'''GitHub EDK II Project Repositories'''=3D=3D - -* The EDK II project repository is available at https://github.com/tiano= core/edk2.=20 - -Content that is not released under an accepted open source license can b= e found at https://github.com/tianocore/edk2-non-osi.

-Note: the steps below will pull the latest code from edk2 master. To wor= k from a stable release, please refer to the Microsoft Windows build step= s for [[UDK2017]]: https://github.com/tianocore/tianocore.github.io/wiki/= UDK2017-How-to-Build#how-to-build-windows-system=20 - -=3D=3D=3DInternet proxies=3D=3D=3D - -If your network utilizes a firewall with a web proxy, then you may need = to configure your proxy information for various command line applications= to work. You may need to consult with your network administrator to fin= d out the computer name and port to use for proxy setup. The following c= ommands are common '''Git Bash''' examples of how you would configure you= r proxy by setting an environment variable: - -
-    $ git config --global https.proxy .domain.com:
-    $ git config --global http.proxy .domain.com:
-
- - -=3D=3D'''How to Setup the EDK II Tree'''=3D=3D -'''Note:''' Some of the following examples use the Multiple Workspace fe= ature to configure the EDK II BaseTools. More information on the Multipl= e Workspace feature can be found at the following location.
-* [[Multiple_Workspace]] - -=3D=3D'''Download'''=3D=3D -Download/Checkout the EDK II source tree from Github -=3D=3D=3D Download Using a Web browser =3D=3D=3D - -# Download EDK II Project -## Open https://github.com/tianocore/edk2 in web browser -## Click on the ''Clone or Download'' button (Right Green) -## Click on Download ZIP -## Unzip to C:/ -## Rename directory =E2=80=9Cedk2-master=E2=80=9D to =E2=80=9Cedk2=E2=80= =9D =20 - -Continue to [[Windows-systems#compile-tools |Compile Tools]]=20 - -=3D=3D=3D Using '''Git for Windows''' Application =3D=3D=3D -=3D=3D=3D=3D ''Git GUI''=3D=3D=3D=3D -# Clone the EDK II project repository -## Open Git GUI -## Use ''Clone Exiting Repository'' with Source location https://github.= com/tianocore/edk2.git -## Select a Target directory C:/edk2 -## Check Recursively clone submodules too -## click Clone button - -Continue to [[Windows-systems#compile-tools |Compile Tools]] section - -=3D=3D=3D=3D ''Git CMD'' =3D=3D=3D=3D -If you use the command line version, then you can easily checkout the ed= k2 to the C:\edk2 directory with the following git command: -Main repository: https://github.com/tianocore/edk2 -
-    $git clone https://github.com/tianocore/edk2
-
- -Continue to [[Windows-systems#compile-tools |Compile Tools]] and then [[= Windows-systems#build | BUILD]] sections - -=3D=3D'''Compile Tools'''=3D=3D -=3D=3D=3D=3D=3DFor EDK II project developers on Windows with source Base= Tools:=3D=3D=3D=3D=3D -* Create a workspace directory -* Change to the workspace directory -* Clone the EDK II project repository (See [[Windows-systems#download| D= ownload]] section above) -** Example: git clone https://github.com/tianocore/edk2 -* Install Python37 or late version (https://www.python.org/) to run pyt= hon tool from source=20 -* Compile BaseTools C source tools -Example: -* Inside Git Bash -
-     $ git clone https://github.com/tianocore/edk2
-
-=3D=3D=3D=3D=3DCompile BaseTools=3D=3D=3D=3D=3D -Example: -*Open Command prompt and CD C:\edk2: -
+__NOTOC__
+
+  Note: New build instructions are available. It is recommended to start=
 with the new instructions if learning how to
+        build edk2 for the first time. This page is retained for referen=
ce.
+
+New instructions: [[Build-Instructions.md|Build Instructions]]
+
+This page provides step-by-step instructions or setting up a [http://www=
.tianocore.org/edk2/ EDK II] build environment on Windows systems.
+
+''Table of Contents''
+* [[Windows-systems#github-help|GitHub Help]]
+* [[Windows-systems#how-to-setup-the-edk-ii-tree| How to Setup the EDK I=
I Tree]]
+* [[Windows-systems#download| Download]]  Checkout EDK II source tree fr=
om Github
+* [[Windows-systems#compile-tools |Compile Tools]] Build EDK II BaseTool=
s for Windows
+* [[Windows-systems#build | BUILD]] EDK II
+
+=3D=3DGitHub Help=3D=3D
+
+GitHub (https://help.github.com/index.html) provides step-by-step instru=
ctions for user registration and basic features supported by GitHub.
+
+=3D=3D=3D Git GUI Interface for Windows OS =3D=3D=3D
+* Git for Windows OS is available at: (http://git-scm.com/download/win)
+* TortoiseGit for windows OS is available at (https://tortoisegit.org/do=
wnload/)
+
+=3D=3D'''GitHub EDK II Project Repositories'''=3D=3D
+
+* The EDK II project repository is available at https://github.com/tiano=
core/edk2.
+
+Content that is not released under an accepted open source license can b=
e found at https://github.com/tianocore/edk2-non-osi.

+Note: the steps below will pull the latest code from edk2 master. To wor= k from a stable release, please refer to the Microsoft Windows build step= s for [[UDK2017]]: https://github.com/tianocore/tianocore.github.io/wiki/= UDK2017-How-to-Build#how-to-build-windows-system + +=3D=3D=3DInternet proxies=3D=3D=3D + +If your network utilizes a firewall with a web proxy, then you may need = to configure your proxy information for various command line applications= to work. You may need to consult with your network administrator to fin= d out the computer name and port to use for proxy setup. The following c= ommands are common '''Git Bash''' examples of how you would configure you= r proxy by setting an environment variable: + +
+    $ git config --global https.proxy .domain.com:
+    $ git config --global http.proxy .domain.com:
+
+ + +=3D=3D'''How to Setup the EDK II Tree'''=3D=3D +'''Note:''' Some of the following examples use the Multiple Workspace fe= ature to configure the EDK II BaseTools. More information on the Multipl= e Workspace feature can be found at the following location.
+* [[Multiple_Workspace]] + +=3D=3D'''Download'''=3D=3D +Download/Checkout the EDK II source tree from Github +=3D=3D=3D Download Using a Web browser =3D=3D=3D + +# Download EDK II Project +## Open https://github.com/tianocore/edk2 in web browser +## Click on the ''Clone or Download'' button (Right Green) +## Click on Download ZIP +## Unzip to C:/ +## Rename directory =E2=80=9Cedk2-master=E2=80=9D to =E2=80=9Cedk2=E2=80= =9D + +Continue to [[Windows-systems#compile-tools |Compile Tools]] + +=3D=3D=3D Using '''Git for Windows''' Application =3D=3D=3D +=3D=3D=3D=3D ''Git GUI''=3D=3D=3D=3D +# Clone the EDK II project repository +## Open Git GUI +## Use ''Clone Exiting Repository'' with Source location https://github.= com/tianocore/edk2.git +## Select a Target directory C:/edk2 +## Check Recursively clone submodules too +## click Clone button + +Continue to [[Windows-systems#compile-tools |Compile Tools]] section + +=3D=3D=3D=3D ''Git CMD'' =3D=3D=3D=3D +If you use the command line version, then you can easily checkout the ed= k2 to the C:\edk2 directory with the following git command: +Main repository: https://github.com/tianocore/edk2 +
+    $git clone https://github.com/tianocore/edk2
+
+ +Continue to [[Windows-systems#compile-tools |Compile Tools]] and then [[= Windows-systems#build | BUILD]] sections + +=3D=3D'''Compile Tools'''=3D=3D +=3D=3D=3D=3D=3DFor EDK II project developers on Windows with source Base= Tools:=3D=3D=3D=3D=3D +* Create a workspace directory +* Change to the workspace directory +* Clone the EDK II project repository (See [[Windows-systems#download| D= ownload]] section above) +** Example: git clone https://github.com/tianocore/edk2 +* Install Python37 or late version (https://www.python.org/) to run pyt= hon tool from source +* Compile BaseTools C source tools +Example: +* Inside Git Bash +
+     $ git clone https://github.com/tianocore/edk2
+
+=3D=3D=3D=3D=3DCompile BaseTools=3D=3D=3D=3D=3D +Example: +*Open Command prompt and CD C:\edk2: +
      C:\edk2> set PYTHON_HOME=3DC:\Python37
-     C:\edk2> edksetup.bat Rebuild
-
- - -=3D=3D'''Build'''=3D=3D -* Set up the [[Nasm-Setup| Nasm]] open source assembly compiler -* Set up the [[Asl Setup| ASL Compiler]]=20 -* [[Windows-systems#compile-tools |Compile Tools]] above -* Open a Windows CMD prompt: -* Change to the edk2 directory -* Run the edksetup.bat script - - C:\Users\MySid> CD \edk2 - C:\edk2> edksetup - -=3D=3D=3DBuild MdeModulePkg=3D=3D=3D - - -=3D=3D=3D=3DModify Conf files=3D=3D=3D=3D - -You will need to edit the Conf\target.txt file. First, change the ACTIV= E_PLATFORM to the MdeModulePkg: - -
-C:\edk2> notepad Conf\target.txt
-
- -ACTIVE_PLATFORM should look like this in Conf\target.txt: - -
-ACTIVE_PLATFORM       =3D MdeModulePkg/MdeModulePkg.dsc
-
- -Modify TOOL_CHAIN_TAG in target.txt for the toolchain installed on your = system. There are many options, so review the tools_def.txt to find the a= ppropriate toolchain for your system. Search for 'Supported Tool Chains'= in tools_def.txt to see the valid options for TOOL_CHAIN_TAG.=20 -
-TOOL_CHAIN_TAG        =3D VS2015x86
-
- - - -See also: [[Windows-systems-ToolChain-Matrix]] for how to change the Too= l Chain Tag. - -Also, consider if you want to build a different processor architecture b= y changing the TARGET_ARCH value in target.txt. Please consider that cer= tain toolchains only support building certain processor architectures. - -=3D=3D=3D=3DBuild Hello World! (and the rest of MdeModulePkg)=3D=3D=3D=3D - -Now you should be able to simply run the build command to compile the Md= eModulePkg. - -
-C:\edk2> build
-
- -As a tangible result of the build, you should have the HelloWorld UEFI a= pplication. If you have a UEFI system available to you which matches the= processor architecture that you built, then this application should be a= ble to run successfully under the shell. - -
-C:\edk2> dir /s Build\MdeModule\DEBUG_...\IA32\HelloWorld.efi
-
- -=3D=3D=3DBuild [[OVMF]] (OPTIONAL)=3D=3D=3D - -Once your build environment is set up you might be interested in buildin= g the [[OVMF]] platform which is included in the main edk2 source tree. = Since [[OVMF]] builds a full system firmware image this may be of intere= st to UEFI system firmware developers. - -=3DSee Also=3D -* [[Getting-Started-Writing-Simple-Application]] - + C:\edk2> edksetup.bat Rebuild +
+ + +=3D=3D'''Build'''=3D=3D +* Set up the [[Nasm-Setup| Nasm]] open source assembly compiler +* Set up the [[Asl Setup| ASL Compiler]] +* [[Windows-systems#compile-tools |Compile Tools]] above +* Open a Windows CMD prompt: +* Change to the edk2 directory +* Run the edksetup.bat script + + C:\Users\MySid> CD \edk2 + C:\edk2> edksetup + +=3D=3D=3DBuild MdeModulePkg=3D=3D=3D + + +=3D=3D=3D=3DModify Conf files=3D=3D=3D=3D + +You will need to edit the Conf\target.txt file. First, change the ACTIV= E_PLATFORM to the MdeModulePkg: + +
+C:\edk2> notepad Conf\target.txt
+
+ +ACTIVE_PLATFORM should look like this in Conf\target.txt: + +
+ACTIVE_PLATFORM       =3D MdeModulePkg/MdeModulePkg.dsc
+
+ +Modify TOOL_CHAIN_TAG in target.txt for the toolchain installed on your = system. There are many options, so review the tools_def.txt to find the a= ppropriate toolchain for your system. Search for 'Supported Tool Chains'= in tools_def.txt to see the valid options for TOOL_CHAIN_TAG. +
+TOOL_CHAIN_TAG        =3D VS2015x86
+
+ + + +See also: [[Windows-systems-ToolChain-Matrix]] for how to change the Too= l Chain Tag. + +Also, consider if you want to build a different processor architecture b= y changing the TARGET_ARCH value in target.txt. Please consider that cer= tain toolchains only support building certain processor architectures. + +=3D=3D=3D=3DBuild Hello World! (and the rest of MdeModulePkg)=3D=3D=3D=3D + +Now you should be able to simply run the build command to compile the Md= eModulePkg. + +
+C:\edk2> build
+
+ +As a tangible result of the build, you should have the HelloWorld UEFI a= pplication. If you have a UEFI system available to you which matches the= processor architecture that you built, then this application should be a= ble to run successfully under the shell. + +
+C:\edk2> dir /s Build\MdeModule\DEBUG_...\IA32\HelloWorld.efi
+
+ +=3D=3D=3DBuild [[OVMF]] (OPTIONAL)=3D=3D=3D + +Once your build environment is set up you might be interested in buildin= g the [[OVMF]] platform which is included in the main edk2 source tree. = Since [[OVMF]] builds a full system firmware image this may be of intere= st to UEFI system firmware developers. + +=3DSee Also=3D +* [[Getting-Started-Writing-Simple-Application]] + \ No newline at end of file --=20 2.28.0.windows.1