| 
									
										
										
										
											2022-12-02 11:46:09 -05:00
										 |  |  | ::
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   Note: New build instructions are available. It is recommended to start with
 | 
					
						
							|  |  |  |   the new instructions if learning how to build edk2 and/or BaseTools for the
 | 
					
						
							|  |  |  |   first time. This page is retained for reference.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | New instructions: `Build Instructions`_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .. _`Build Instructions`: https://github.com/tianocore/tianocore.github.io/wiki/Build-Instructions
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | This directory contains the EDK II build tools and template files.
 | 
					
						
							| 
									
										
										
										
											2007-10-17 01:54:36 +00:00
										 |  |  | Templates are located in the Conf directory, while the tools executables for
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | Microsoft Windows Operating Systems are located in the Bin\\Win32 directory, other
 | 
					
						
							| 
									
										
										
										
											2019-02-06 15:44:39 +08:00
										 |  |  | directory contains tools source.
 | 
					
						
							| 
									
										
										
										
											2007-10-17 01:54:36 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | Build step to generate the binary tools
 | 
					
						
							|  |  |  | ---------------------------------------
 | 
					
						
							| 
									
										
										
										
											2007-10-17 01:54:36 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | Windows/Visual Studio Notes
 | 
					
						
							|  |  |  | ===========================
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-28 16:06:52 +08:00
										 |  |  | To build the BaseTools, you should run the standard vsvars32.bat script
 | 
					
						
							|  |  |  | from your preferred Visual Studio installation or you can run get_vsvars.bat
 | 
					
						
							|  |  |  | to use latest automatically detected version.
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | In addition to this, you should set the following environment variables::
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |  * EDK_TOOLS_PATH - Path to the BaseTools sub directory under the edk2 tree
 | 
					
						
							|  |  |  |  * BASE_TOOLS_PATH - The directory where the BaseTools source is located.
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  |    (It is the same directory where this README.rst is located.)
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | After this, you can run the toolsetup.bat file, which is in the same
 | 
					
						
							|  |  |  | directory as this file.  It should setup the remainder of the environment,
 | 
					
						
							|  |  |  | and build the tools if necessary.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | Unix-like operating systems
 | 
					
						
							|  |  |  | ===========================
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | To build on Unix-like operating systems, you only need to type ``make`` in
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | the base directory of the project.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | Ubuntu Notes
 | 
					
						
							|  |  |  | ============
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | On Ubuntu, the following command should install all the necessary build
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  | packages to build all the C BaseTools::
 | 
					
						
							| 
									
										
										
										
											2009-07-17 09:10:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-08 07:13:14 +08:00
										 |  |  |  sudo apt install build-essential uuid-dev
 |