+## @file
+# Setup the environment for unix-like systems running a bash-like shell.
+# This file must be "sourced" not merely executed. For example: ". edksetup.sh"
#
-# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-#
-# Setup the environment for unix-like systems running a bash-like shell.
-# This file must be "sourced" not merely executed. For example: ". edksetup.sh"
#
SetWorkspace() {
$(CP) ${dst} $(OUTPUT_DIR)\r
$(CP) ${dst} $(BIN_DIR)\r
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
-\r
+ -$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR) \r
<Command.GCC>\r
$(CP) ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug\r
$(OBJCOPY) --strip-unneeded -R .eh_frame ${src}\r
/** @file\r
+Binder function implementations for ANSI C libraries.\r
\r
-Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- BinderFuncs.c\r
-\r
-Abstract:\r
-\r
- Binder function implementations for ANSI C libraries.\r
-\r
**/\r
\r
#include "BinderFuncs.h"\r
/** @file\r
-\r
-Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Prototypes for binder functions that allow common code to be written which then \r
+links to implementation of these functions which is appropriate for the specific \r
+environment that they are running under.\r
+ \r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- BinderFuncs.h\r
-\r
-Abstract:\r
-\r
- Prototypes for binder functions that allow common code to be\r
- written which then links to implementation of these functions\r
- which is appropriate for the specific environment that they\r
- are running under.\r
-\r
**/\r
\r
#ifndef BinderFuncs_h_INCLUDED\r
/** @file\r
+Common basic Library Functions\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- CommonLib.c\r
-\r
-Abstract:\r
-\r
- Common basic Library Functions\r
- \r
**/\r
\r
#include <stdio.h>\r
/** @file\r
+Common library assistance routines.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- CommonLib.h\r
-\r
-Abstract:\r
-\r
- Common library assistance routines.\r
-\r
**/\r
\r
#ifndef _EFI_COMMON_LIB_H\r
#ifdef __cplusplus\r
extern "C" {\r
#endif\r
+\r
//\r
// Function declarations\r
//\r
/** @file\r
-\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Header file for compression routine.\r
+Providing both EFI and Tiano Compress algorithms.\r
+ \r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- Compress.h\r
-\r
-Abstract:\r
-\r
- Header file for compression routine.\r
- Providing both EFI and Tiano Compress algorithms.\r
\r
**/\r
\r
/** @file\r
+CalcuateCrc32 routine.\r
\r
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- crc32.c\r
-\r
-Abstract:\r
-\r
- CalcuateCrc32 routine.\r
- \r
**/\r
\r
#include <stdlib.h>\r
/** @file\r
+Header file for CalcuateCrc32 routine\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- Crc32.h\r
-\r
-Abstract:\r
-\r
- Header file for CalcuateCrc32 routine\r
- \r
**/\r
\r
#ifndef _CRC32_H\r
/** @file\r
+Decompressor. Algorithm Ported from OPSD code (Decomp.asm) for Efi and Tiano \r
+compress algorithm.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- Decompress.c\r
-\r
-Abstract:\r
-\r
- Decompressor. Algorithm Ported from OPSD code (Decomp.asm)\r
- for Efi and Tiano compress algorithm.\r
-\r
--*/\r
\r
#include <stdlib.h>\r
/** @file\r
+Header file for compression routine\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
- \r
- Decompress.h\r
-\r
-Abstract:\r
-\r
- Header file for compression routine\r
- \r
**/\r
\r
#ifndef _EFI_DECOMPRESS_H\r
/** @file\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman \r
+coding. LZ77 transforms the source data into a sequence of Original Characters \r
+and Pointers to repeated strings. This sequence is further divided into Blocks \r
+and Huffman codings are applied to each Block.\r
+ \r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- EfiCompress.c\r
-\r
-Abstract:\r
-\r
- Compression routine. The compression algorithm is a mixture of\r
- LZ77 and Huffman coding. LZ77 transforms the source data into a\r
- sequence of Original Characters and Pointers to repeated strings.\r
- This sequence is further divided into Blocks and Huffman codings\r
- are applied to each Block.\r
-\r
**/\r
\r
#include "Compress.h"\r
/** @file\r
+EFI tools utility functions to display warning, error, and informational messages\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- EfiUtilityMsgs.c\r
-\r
-Abstract:\r
-\r
- EFI tools utility functions to display warning, error, and informational\r
- messages.\r
-\r
--*/\r
\r
#include <stdio.h>\r
/** @file\r
+Defines and prototypes for common EFI utility error and debug messages.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- EfiUtilityMsgs.h\r
-\r
-Abstract:\r
-\r
- Defines and prototypes for common EFI utility error and debug messages.\r
- \r
**/\r
\r
#ifndef _EFI_UTILITY_MSGS_H_\r
/** @file\r
+EFI Firmware Volume routines which work on a Fv image in buffers.\r
\r
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- FirmwareVolumeBuffer.c\r
-\r
-Abstract:\r
-\r
- EFI Firmware Volume routines which work on a Fv image in buffers.\r
-\r
**/\r
\r
#include "FirmwareVolumeBufferLib.h"\r
) \\r
)\r
\r
+\r
+//\r
+// Local prototypes\r
+//\r
+\r
STATIC\r
UINT32\r
FvBufGetSecHdrLen(\r
/** @file\r
+EFI Firmware Volume routines which work on a Fv image in buffers.\r
\r
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- FirmwareVolumeBufferLib.h\r
- \r
-Abstract:\r
-\r
- EFI Firmware Volume routines which work on a Fv image in buffers.\r
-\r
**/\r
\r
#ifndef FirmwareVolumeBuffer_h_INCLUDED\r
/** @file\r
+These functions assist in parsing and manipulating a Firmware Volume.\r
\r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- FvLib.c\r
-\r
-Abstract:\r
-\r
- These functions assist in parsing and manipulating a Firmware Volume.\r
-\r
**/\r
\r
//\r
/** @file\r
-\r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
+These functions assist in parsing and manipulating a Firmware Volume.\r
+ \r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- FvLib.h\r
-\r
-Abstract:\r
-\r
- These functions assist in parsing and manipulating a Firmware Volume.\r
-\r
**/\r
\r
#ifndef _EFI_FV_LIB_H\r
/** @file\r
+This contains some useful functions for accessing files.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- MemoryFile.c\r
-\r
-Abstract:\r
-\r
- This contains some useful functions for accessing files.\r
-\r
**/\r
\r
#include <assert.h>\r
/** @file\r
+Header file for helper functions useful for accessing files.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- MemoryFile.h\r
-\r
-Abstract:\r
-\r
- Header file for helper functions useful for accessing files.\r
-\r
**/\r
\r
#ifndef _EFI_MEMORY_FILE_H\r
/** @file\r
+File for memory allocation tracking functions.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- MyAlloc.c\r
-\r
-Abstract:\r
-\r
- File for memory allocation tracking functions.\r
-\r
**/\r
\r
#include "MyAlloc.h"\r
/** @file\r
+Header file for memory allocation tracking functions.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- MyAlloc.h\r
-\r
-Abstract:\r
-\r
- Header file for memory allocation tracking functions.\r
-\r
**/\r
\r
#ifndef _MYALLOC_H_\r
/** @file\r
+Functions useful to operate file directories by parsing file path.\r
\r
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- StringFuncs.c\r
-\r
-Abstract:\r
-\r
- Functions useful to operate file directories by parsing file path.\r
-\r
**/\r
\r
#include <stdio.h>\r
/** @file\r
+Header file for helper functions useful to operate file directories by parsing \r
+file path.\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- OsPath.h\r
-\r
-Abstract:\r
-\r
- Header file for helper functions useful to operate file directories \r
- by parsing file path. \r
-\r
**/\r
\r
#ifndef _EFI_OS_PATH_H\r
/** @file\r
+Helper functions for parsing GuidedSectionTools.txt\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- ParseGuidedSectionTools.c\r
-\r
-Abstract:\r
-\r
- Helper functions for parsing GuidedSectionTools.txt\r
-\r
**/\r
\r
#include <assert.h>\r
/** @file\r
+Header file for helper functions for parsing GuidedSectionTools.txt\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- ParseGuidedSectionTools.h\r
-\r
-Abstract:\r
-\r
- Header file for helper functions for parsing GuidedSectionTools.txt\r
-\r
**/\r
\r
#ifndef _EFI_PARSE_GUIDED_SECTION_TOOLS_H\r
/** @file\r
+This contains some useful functions for parsing INF files.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- ParseInf.c\r
-\r
-Abstract:\r
-\r
- This contains some useful functions for parsing INF files.\r
-\r
---*/\r
+**/\r
\r
#include <assert.h>\r
#include <string.h>\r
/** @file\r
+Header file for helper functions useful for parsing INF files.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- ParseInf.h\r
-\r
-Abstract:\r
-\r
- Header file for helper functions useful for parsing INF files.\r
-\r
**/\r
\r
#ifndef _EFI_PARSE_INF_H\r
/** @file\r
Function prototypes and defines on Memory Only PE COFF loader\r
\r
- Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
- Module Name: PeCoffLib.h\r
-\r
**/\r
\r
#ifndef __BASE_PE_COFF_LIB_H__\r
/** @file\r
+IA32, X64 and IPF Specific relocation fixups\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- PeCoffLoaderEx.c\r
-\r
-Abstract:\r
-\r
- IA32, X64, IPF, ARM and AArch64 Specific relocation fixups\r
-\r
-Revision History\r
-\r
--*/\r
\r
#include <Common/UefiBaseTypes.h>\r
/** @file\r
+Generic but simple file parsing routines.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- SimpleFileParsing.c \r
-\r
-Abstract:\r
-\r
- Generic but simple file parsing routines.\r
-\r
--*/\r
\r
#include <stdio.h>\r
/** @file\r
+Function prototypes and defines for the simple file parsing routines.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- SimpleFileParsing.h\r
-\r
-Abstract:\r
-\r
- Function prototypes and defines for the simple file parsing routines.\r
-\r
**/\r
\r
#ifndef _SIMPLE_FILE_PARSING_H_\r
/** @file\r
+Function prototypes and defines for string routines.\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- StringFuncs.c\r
-\r
-Abstract:\r
-\r
- Function prototypes and defines for string routines.\r
-\r
**/\r
\r
#include <string.h>\r
-/**\r
+/** @file\r
+String routines implementation\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- StringFuncs.h\r
-\r
-Abstract:\r
-\r
- String routines implementation.\r
-\r
**/\r
\r
#ifndef _EFI_STRING_FUNCS_H\r
/** @file\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman \r
+coding. LZ77 transforms the source data into a sequence of Original Characters \r
+and Pointers to repeated strings. This sequence is further divided into Blocks \r
+and Huffman codings are applied to each Block.\r
+ \r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- TianoCompress.c\r
-\r
-Abstract:\r
-\r
- Compression routine. The compression algorithm is a mixture of\r
- LZ77 and Huffman coding. LZ77 transforms the source data into a\r
- sequence of Original Characters and Pointers to repeated strings.\r
- This sequence is further divided into Blocks and Huffman codings\r
- are applied to each Block.\r
-\r
**/\r
\r
#include "Compress.h"\r
/** @file\r
+Include file for the WinNt Library\r
\r
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
- WinNtInclude.h\r
-\r
-Abstract:\r
- Include file for the WinNt Library\r
-\r
**/\r
\r
#ifndef __WIN_NT_INCLUDE_H__\r
/** @file\r
-\r
+Creates and EFILDR image.\r
+This tool combines several PE Image files together using following format denoted as EBNF:\r
+FILE := EFILDR_HEADER\r
+ EFILDR_IMAGE +\r
+ <PeImageFileContent> +\r
+The order of EFILDR_IMAGE is same as the order of placing PeImageFileContent.\r
+ \r
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- efildrimage.c\r
-\r
-Abstract:\r
-\r
- Creates and EFILDR image.\r
- This tool combines several PE Image files together using following format denoted as EBNF:\r
- FILE := EFILDR_HEADER\r
- EFILDR_IMAGE +\r
- <PeImageFileContent> +\r
- The order of EFILDR_IMAGE is same as the order of placing PeImageFileContent.\r
-\r
-Revision History\r
-\r
**/\r
\r
\r
/** @file\r
+Utility program to create an EFI option ROM image from binary and EFI PE32 files.\r
\r
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- EfiRom.c\r
- \r
-Abstract:\r
-\r
- Utility program to create an EFI option ROM image from binary and \r
- EFI PE32 files.\r
-\r
**/\r
\r
#include "EfiUtilityMsgs.h"\r
/** @file\r
+This file contains the relevant declarations required to generate Option Rom File\r
\r
-Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-\r
-Module Name: \r
-\r
- EfiRom.h\r
-\r
-Abstract:\r
-\r
- This file contains the relevant declarations required\r
- to generate Option Rom File\r
-\r
**/\r
\r
#ifndef __EFI_ROM_H__\r
/** @file\r
-\r
+Reading/writing MBR/DBR.\r
+ NOTE:\r
+ If we write MBR to disk, we just update the MBR code and the partition table wouldn't be over written.\r
+ If we process DBR, we will patch MBR to set first partition active if no active partition exists.\r
+ \r
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- genbootsector.c\r
- \r
-Abstract:\r
- Reading/writing MBR/DBR.\r
- NOTE:\r
- If we write MBR to disk, we just update the MBR code and the partition table wouldn't be over written.\r
- If we process DBR, we will patch MBR to set first partition active if no active partition exists.\r
-\r
**/\r
\r
#include <windows.h>\r
/** @file\r
+Calculate Crc32 value and Verify Crc32 value for input data.\r
\r
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- GenCrc32.c\r
-\r
-Abstract:\r
- Calculate Crc32 value and Verify Crc32 value for input data.\r
-\r
**/\r
\r
#include <stdio.h>\r
-/**\r
+/** @file\r
+This file contains functions required to generate a Firmware File System file.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- GenFfs.c\r
-\r
-Abstract:\r
-\r
- This file contains functions required to generate a Firmware File System\r
- file.\r
-\r
**/\r
\r
#include <stdio.h>\r
// Open output file to write ffs data.\r
//\r
remove(OutputFileName);\r
- FfsFile = fopen (OutputFileName, "wb");\r
+ FfsFile = fopen (LongFilePath (OutputFileName), "wb");\r
if (FfsFile == NULL) {\r
Error (NULL, 0, 0001, "Error opening file", OutputFileName);\r
goto Finish;\r
/** @file\r
+ This contains all code necessary to build the GenFvImage.exe utility. \r
+ This utility relies heavily on the GenFvImage Lib. Definitions for both\r
+ can be found in the Tiano Firmware Volume Generation Utility \r
+ Specification, review draft.\r
\r
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- GenFv.c\r
-\r
-Abstract:\r
-\r
- This contains all code necessary to build the GenFvImage.exe utility. \r
- This utility relies heavily on the GenFvImage Lib. Definitions for both\r
- can be found in the Tiano Firmware Volume Generation Utility \r
- Specification, review draft.\r
-\r
**/\r
\r
//\r
/** @file\r
+This file contains the internal functions required to generate a Firmware Volume.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- GenFvInternalLib.c\r
-\r
-Abstract:\r
-\r
- This file contains the internal functions required to generate a Firmware Volume.\r
-\r
**/\r
\r
//\r
/** @file\r
-\r
+This file contains describes the public interfaces to the GenFvImage Library.\r
+The basic purpose of the library is to create Firmware Volume images.\r
+ \r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
- \r
- GenFvInternalLib.h\r
-\r
-Abstract:\r
-\r
- This file contains describes the public interfaces to the GenFvImage Library.\r
- The basic purpose of the library is to create Firmware Volume images.\r
-\r
**/\r
\r
#ifndef _EFI_GEN_FV_INTERNAL_LIB_H\r
/** @file\r
+Elf32 Convert solution\r
\r
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
Portions copyright (c) 2013, ARM Ltd. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
/** @file\r
+Header file for Elf32 Convert solution\r
\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
/** @file\r
+Elf64 convert solution\r
\r
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
/** @file\r
+Header file for Elf64 convert solution\r
\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
/** @file\r
+Elf convert solution\r
\r
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
/** @file\r
+Header file for Elf convert solution\r
\r
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
/** @file\r
+Converts a pe32+ image to an FW, Te image type, or other specific image.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- GenFw.c\r
-\r
-Abstract:\r
-\r
- Converts a pe32+ image to an FW, Te image type, or other specific image.\r
-\r
**/\r
\r
#include "WinNtInclude.h"\r
/** @file\r
+Header file for GenFw\r
\r
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
/** @file\r
-\r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
- GenPage.c\r
- \r
-Abstract:\r
Pre-Create a 4G page table (2M pages).\r
It's used in DUET x64 build needed to enter LongMode.\r
\r
(\r
Directory-Ptr Directory {512}\r
) {4}\r
+\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials \r
+are licensed and made available under the terms and conditions of the BSD License \r
+which accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
+ \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
**/\r
\r
#include <stdio.h>\r
/** @file \r
+x64 Long Mode Virtual Memory Management Definitions \r
\r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ References:\r
+ 1) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 1:Basic Architecture, Intel\r
+ 2) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel\r
+ 3) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel\r
+ 4) AMD64 Architecture Programmer's Manual Volume 2: System Programming\r
+ \r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
- VirtualMemory.h\r
\r
-Abstract:\r
-\r
- x64 Long Mode Virtual Memory Management Definitions \r
-\r
- References:\r
- 1) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 1:Basic Architecture, Intel\r
- 2) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel\r
- 3) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel\r
- 4) AMD64 Architecture Programmer's Manual Volume 2: System Programming\r
**/\r
\r
#ifndef _VIRTUAL_MEMORY_H_\r
/** @file\r
+Creates output file that is a properly formed section per the PI spec.\r
\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- GenSection.c\r
-\r
-Abstract:\r
-\r
- Creates output file that is a properly formed section per the PI spec.\r
-\r
**/\r
\r
#include <stdio.h>\r
-/**\r
+/** @file\r
+This file contains functions required to generate a boot strap file (BSF) also \r
+known as the Volume Top File (VTF)\r
\r
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-\r
-Module Name:\r
-\r
- GenVtf.c\r
-\r
-Abstract:\r
-\r
- This file contains functions required to generate a boot strap file (BSF)\r
- also known as the Volume Top File (VTF)\r
-\r
**/\r
\r
//\r
/** @file\r
-\r
-Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This file contains the relevant declarations required to generate Boot Strap File\r
+ \r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-\r
-Module Name: \r
-\r
- GenVtf.h\r
-\r
-Abstract:\r
-\r
- This file contains the relevant declarations required\r
- to generate Boot Strap File\r
-\r
**/\r
\r
//\r
/** @file\r
-\r
+Reading/writing MBR/DBR.\r
+ NOTE:\r
+ If we write MBR to disk, we just update the MBR code and the partition table wouldn't be over written.\r
+ If we process DBR, we will patch MBR to set first partition active if no active partition exists.\r
+ \r
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- GnuGenBootSector.c\r
- \r
-Abstract:\r
- Reading/writing MBR/DBR.\r
- NOTE:\r
- If we write MBR to disk, we just update the MBR code and the partition table wouldn't be over written.\r
- If we process DBR, we will patch MBR to set first partition active if no active partition exists.\r
-\r
**/\r
\r
#include "CommonLib.h"\r
\r
This file is stand alone self consistent set of definitions. \r
\r
- Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
- File Name: BaseTypes.h\r
-\r
**/\r
\r
#ifndef __BASE_TYPES_H__\r
/** @file\r
- This file is for build version number auto generation\r
+This file is for build version number auto generation\r
\r
- Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials \r
- are licensed and made available under the terms and conditions of the BSD License \r
- which accompanies this distribution. The full text of the license may be found at \r
- http://opensource.org/licenses/bsd-license.php \r
+Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
- File Name: BuildVersion.h\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
\r
/** @file\r
EDK II specific HII relative definition.\r
\r
- Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: MdeModuleHii.h\r
-\r
**/\r
\r
#ifndef _MDEMODULE_HII_H\r
/** @file\r
The firmware file related definitions in PI.\r
+ \r
+ @par Revision Reference:\r
+ Version 1.0.\r
\r
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: PiFirmwareFile.h\r
-\r
- @par Revision Reference:\r
- Version 1.0.\r
-\r
**/\r
\r
#ifndef __PI_FIRMWARE_FILE_H__\r
/** @file\r
The firmware volume related definitions in PI.\r
\r
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ @par Revision Reference:\r
+ Version 1.2C\r
+\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: PiFirmwareVolume.h\r
-\r
- @par Revision Reference:\r
- Version 1.2C\r
-\r
**/\r
\r
#ifndef __PI_FIRMWAREVOLUME_H__\r
/** @file\r
Defines data types and constants introduced in UEFI.\r
\r
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: UefiBaseTypes.h\r
-\r
**/\r
\r
#ifndef __UEFI_BASETYPE_H__\r
/** @file\r
Defines for the EFI Capsule functionality.\r
+ @par Revision Reference:\r
+ These definitions are from Uefi Spec.\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: Capsule.h\r
-\r
- @par Revision Reference:\r
- These definitions are from Uefi Spec.\r
-\r
**/\r
\r
#ifndef _EFI_CAPSULE_H_\r
IFR is primarily consumed by the EFI presentation engine, and produced by EFI\r
internal application and drivers as well as all add-in card option-ROM drivers\r
\r
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ @par Revision Reference:\r
+ These definitions are from UEFI2.1.\r
+\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: UefiInternalFormRepresentation.h\r
-\r
- @par Revision Reference:\r
- These definitions are from UEFI2.1.\r
-\r
**/\r
\r
#ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__\r
/** @file\r
- This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.\r
+ This includes some definitions introduced in UEFI that will be used in both PEI \r
+ and DXE phases.\r
\r
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: UefiMultiPhase.h\r
-\r
**/\r
\r
#ifndef __UEFI_MULTIPHASE_H__\r
/**@file\r
Header file for EFI Variable Services.\r
\r
- Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: VariableFormat.h\r
-\r
**/\r
\r
#ifndef __VARIABLE_FORMAT_H__\r
working block, the header structure of the variable block, FTW\r
working block, or event log block.\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: WorkingBlockHeader.h\r
-\r
**/\r
\r
#ifndef __EFI_WORKING_BLOCK_HEADER_H__\r
/** @file\r
Terminal Device Path Vendor Guid.\r
-\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ @par Revision Reference:\r
+ GUIDs defined in UEFI 2.0 spec.\r
+ \r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: PcAnsi.h\r
-\r
- @par Revision Reference:\r
- GUIDs defined in UEFI 2.0 spec.\r
-\r
**/\r
\r
#ifndef __PC_ANSI_H__\r
/** @file\r
Guid used to define the Firmware File System. See PI spec volume 3 for more\r
details.\r
+ \r
+ @par Revision Reference:\r
+ Guids defined in PI Spec Volume 3\r
\r
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: PiFirmwareFileSystem.h\r
-\r
- @par Revision Reference:\r
- Guids defined in PI Spec Volume 3\r
-\r
**/\r
\r
#ifndef __FIRMWARE_FILE_SYSTEM2_GUID_H__\r
/** @file\r
Processor or Compiler specific defines and types for x64.\r
\r
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: ProcessorBind.h\r
-\r
**/\r
\r
#ifndef __PROCESSOR_BIND_H__\r
This file contains some basic ACPI definitions that are consumed by drivers\r
that do not care about ACPI versions.\r
\r
- Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: Acpi.h\r
-\r
**/\r
\r
#ifndef _ACPI_H_\r
/** @file\r
ACPI 1.0b definitions from the ACPI Specification, revision 1.0b\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: Acpi1_0.h\r
-\r
**/\r
\r
#ifndef _ACPI_1_0_H_\r
/** @file\r
ACPI 2.0 definitions from the ACPI Specification, revision 2.0\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: Acpi2_0.h\r
-\r
**/\r
\r
#ifndef _ACPI_2_0_H_\r
/** @file\r
ACPI 3.0 definitions from the ACPI Specification Revision 3.0 September 2, 2004\r
\r
- Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: Acpi3_0.h\r
-\r
**/\r
\r
#ifndef _ACPI_3_0_H_\r
/** @file\r
Support for EFI PCI specification.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
- http://opensource.org/licenses/bsd-license.php\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: EfiPci.h\r
-\r
**/\r
\r
#ifndef _EFI_PCI_H_\r
in the PCI Firmware Specification, version 3.0 draft version 0.5.\r
Specification is available at http://www.pcisig.com.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
- http://opensource.org/licenses/bsd-license.php\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: MemoryMappedConfigurationSpaceAccessTable.h\r
-\r
**/\r
\r
#ifndef _MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_H_\r
\r
@bug Fix text - doc as defined in MSFT EFI specification.\r
\r
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: PeImage.h\r
-\r
**/\r
\r
#ifndef __PE_IMAGE_H__\r
/** @file\r
Support for PCI 2.2 standard.\r
\r
- Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
- http://opensource.org/licenses/bsd-license.php\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: pci22.h\r
-\r
**/\r
\r
#ifndef _PCI22_H\r
/** @file\r
Support for PCI 2.3 standard.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
- http://opensource.org/licenses/bsd-license.php\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: pci23.h\r
-\r
**/\r
\r
#ifndef _PCI23_H\r
/** @file\r
Support for PCI 3.0 standard.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
- http://opensource.org/licenses/bsd-license.php\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: pci30.h\r
-\r
**/\r
\r
#ifndef _PCI30_H\r
\r
Abstraction of a very simple graphics device.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: GraphicsOutput.h\r
-\r
**/\r
\r
#ifndef __GRAPHICS_OUTPUT_H__\r
section. There may be multiple different GUIDs associated with the GUIDed\r
section extraction protocol. That is, all instances of the GUIDed section\r
extraction protocol must have the same interface structure.\r
-\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ \r
+ @par Revision Reference: PI\r
+ Version 1.00.\r
+ \r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
- http://opensource.org/licenses/bsd-license.php\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: EfiGuidedSectionExtraction.h\r
-\r
- @par Revision Reference: PI\r
- Version 1.00.\r
-\r
**/\r
\r
#ifndef __EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__\r
This file defines the Human Interface Infrastructure protocol which will\r
be used by resources which want to publish IFR/Font/String data and have it\r
collected by the Configuration engine.\r
+ \r
+ @par Revision Reference:\r
+ This protocol is defined in HII spec 0.92.\r
\r
- Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: HiiFramework.h\r
-\r
- @par Revision Reference:\r
- This protocol is defined in HII spec 0.92.\r
-\r
**/\r
\r
#ifndef _FRAMEWORK_HII_H_\r
\r
Abstraction of a very simple graphics device.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File name: UgaDraw.h\r
-\r
**/\r
\r
#ifndef __UGA_DRAW_H__\r
/** @file\r
Processor or Compiler specific defines and types x64 (Intel(r) EM64T, AMD64).\r
\r
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at:\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- File Name: ProcessorBind.h\r
-\r
**/\r
\r
#ifndef __PROCESSOR_BIND_H__\r
+@REM @file\r
+@REM This script will exec LzmaCompress tool with --f86 option that enables \r
+@REM converter for x86 code.\r
@REM\r
-@REM This script will exec LzmaCompress tool with --f86 option that enables converter for x86 code.\r
-@REM\r
-@REM Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+@REM Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>\r
@REM This program and the accompanying materials\r
@REM are licensed and made available under the terms and conditions of the BSD License\r
@REM which accompanies this distribution. The full text of the license may be found at\r
@REM ## @file\r
+@REM # Makefile\r
@REM #\r
-@REM # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+@REM # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
@REM # This program and the accompanying materials\r
@REM # are licensed and made available under the terms and conditions of the BSD License\r
@REM # which accompanies this distribution. The full text of the license may be found at\r
@REM #\r
@REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
+@REM # \r
\r
@echo off\r
+@set TOOL_ERROR=0\r
setlocal\r
SET NMAKE_COMMAND=%1\r
SHIFT\r
ECHO Building %1\r
pushd %1\r
nmake %NMAKE_COMMAND%\r
-if ERRORLEVEL 1 goto error\r
+if ERRORLEVEL 1 (\r
+ set /A TOOL_ERROR= %TOOL_ERROR% + %ERRORLEVEL%\r
+ goto error\r
+)\r
ECHO %1 built successfully (%NMAKE_COMMAND%)\r
ECHO.\r
shift\r
\r
:error\r
popd\r
+set /A TOOL_ERROR=%TOOL_ERROR%+%ERRORLEVEL%\r
ENDLOCAL\r
ECHO Error while making %1!\r
VERIFY OTHER 2>NUL\r
\r
:exit\r
+exit /B %TOOL_ERROR%\r
## @file\r
+# Makefiles\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
## @file\r
+# Makefile\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
\r
DEPFILES = $(OBJECTS:%.o=%.d)\r
\r
## @file\r
+# Makefiles\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
\r
include $(MAKEROOT)/Makefiles/header.makefile\r
\r
## @file\r
+# Makefile\r
#\r
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
\r
!INCLUDE ..\Makefiles\ms.common\r
\r
## @file\r
+# Makefile\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
\r
!IFNDEF EDK_TOOLS_PATH\r
!ERROR "Please set your EDK_TOOLS_PATH!"\r
## @file\r
+# Makefile\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
\r
#DEPFILES = $(OBJECTS:%.o=%.d)\r
\r
/** @file\r
+Efi Compressor\r
\r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
## @file\r
+# Makefile\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
## @file\r
+# Makefile\r
#\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
\r
!INCLUDE ..\Makefiles\ms.common\r
\r
/** @file\r
+Python Utility\r
\r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at\r
/** @file\r
-\r
-Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman \r
+coding. LZ77 transforms the source data into a sequence of Original Characters \r
+and Pointers to repeated strings.\r
+This sequence is further divided into Blocks and Huffman codings are applied to \r
+each Block.\r
+ \r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- TianoCompress.c\r
-\r
-Abstract:\r
-\r
- Compression routine. The compression algorithm is a mixture of\r
- LZ77 and Huffman coding. LZ77 transforms the source data into a\r
- sequence of Original Characters and Pointers to repeated strings.\r
- This sequence is further divided into Blocks and Huffman codings\r
- are applied to each Block.\r
-\r
**/\r
\r
#include "Compress.h"\r
//\r
// Copy the file contents to the output buffer.\r
//\r
- InputFile = fopen (InputFileName, "rb");\r
+ InputFile = fopen (LongFilePath (InputFileName), "rb");\r
if (InputFile == NULL) {\r
Error (NULL, 0, 0001, "Error opening file: %s", InputFileName);\r
return EFI_ABORTED;\r
//\r
// Copyright declaration\r
// \r
- fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");\r
+ fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");\r
\r
//\r
// Details Option\r
goto ERROR;\r
}\r
\r
- InputFile = fopen (InputFileName, "rb");\r
+ InputFile = fopen (LongFilePath (InputFileName), "rb");\r
if (InputFile == NULL) {\r
Error (NULL, 0, 0001, "Error opening input file", InputFileName);\r
goto ERROR;\r
}\r
\r
if (OutputFileName != NULL) {\r
- OutputFile = fopen (OutputFileName, "wb");\r
+ OutputFile = fopen (LongFilePath (OutputFileName), "wb");\r
if (OutputFile == NULL) {\r
Error (NULL, 0, 0001, "Error opening output file for writing", OutputFileName);\r
if (InputFile != NULL) {\r
}\r
} else {\r
OutputFileName = DEFAULT_OUTPUT_FILE;\r
- OutputFile = fopen (OutputFileName, "wb");\r
+ OutputFile = fopen (LongFilePath (OutputFileName), "wb");\r
}\r
\r
if (ENCODE) {\r
/** @file\r
Internal include file for Tiano Decompress Libary.\r
\r
- Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- Module Name: TianoDecompress.h\r
-\r
**/\r
\r
#ifndef __TIANO_DECOMPRESS_H__\r
/** @file\r
+Defines and prototypes for the UEFI VFR compiler internal use.\r
\r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- EfiVfr.h\r
-\r
-Abstract:\r
-\r
- Defines and prototypes for the UEFI VFR compiler internal use.\r
- \r
+ \r
**/\r
\r
#ifndef _EFIVFR_H_\r
-/*++\r
+/*++ @file\r
+Vfr Syntax\r
+\r
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
- VfrSyntax.g\r
-\r
-Abstract:\r
-\r
--*/\r
\r
#header<<\r
/** @file\r
+The tool dumps the contents of a firmware volume\r
\r
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- VolInfo.c\r
-\r
-Abstract:\r
-\r
- The tool dumps the contents of a firmware volume\r
-\r
**/\r
\r
#include <stdio.h>\r
CHAR8 Line[MAX_LINE_LEN];\r
GUID_TO_BASENAME *GPtr;\r
\r
- if ((Fptr = fopen (FileName, "r")) == NULL) {\r
+ if ((Fptr = fopen (LongFilePath (FileName), "r")) == NULL) {\r
printf ("ERROR: Failed to open input cross-reference file '%s'\n", FileName);\r
return EFI_DEVICE_ERROR;\r
}\r
/** @file\r
+Local Definitions for the VolInfo utility\r
\r
-Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-Module Name:\r
-\r
- VolInfo.c\r
-\r
-Abstract:\r
-\r
- Local Definitions for the VolInfo utility\r
-\r
**/\r
\r
#ifndef _VOLINFO_H_\r
from GenPcdDb import CreatePcdDatabaseCode\r
from Workspace.MetaFileCommentParser import UsageList\r
\r
+import InfSectionParser\r
+\r
## Regular expression for splitting Dependency Expression string into tokens\r
gDepexTokenPattern = re.compile("(\(|\)|\w+| \S+\.inf)")\r
\r
+#\r
+# Match name = variable\r
+#\r
+gEfiVarStoreNamePattern = re.compile("\s*name\s*=\s*(\w+)")\r
+#\r
+# The format of guid in efivarstore statement likes following and must be correct:\r
+# guid = {0xA04A27f4, 0xDF00, 0x4D42, {0xB5, 0x52, 0x39, 0x51, 0x13, 0x02, 0x11, 0x3D}}\r
+#\r
+gEfiVarStoreGuidPattern = re.compile("\s*guid\s*=\s*({.*?{.*?}\s*})")\r
+\r
## Mapping Makefile type\r
gMakeTypeMap = {"MSFT":"nmake", "GCC":"gmake"}\r
\r
\r
## Build rule configuration file\r
-gBuildRuleFile = 'Conf/build_rule.txt'\r
+gDefaultBuildRuleFile = 'Conf/build_rule.txt'\r
\r
## Build rule default version\r
AutoGenReqBuildRuleVerNum = "0.1"\r
gAutoGenStringFormFileName = "%(module_name)sStrDefs.hpk"\r
gAutoGenDepexFileName = "%(module_name)s.depex"\r
\r
+gInfSpecVersion = "0x00010017"\r
+\r
#\r
# Template string to generic AsBuilt INF\r
#\r
gAsBuiltInfHeaderString = TemplateString("""${header_comments}\r
\r
+# DO NOT EDIT\r
+# FILE auto-generated\r
+\r
[Defines]\r
- INF_VERSION = 0x00010016\r
+ INF_VERSION = ${module_inf_version}\r
BASE_NAME = ${module_name}\r
FILE_GUID = ${module_guid}\r
- MODULE_TYPE = ${module_module_type}\r
- VERSION_STRING = ${module_version_string}${BEGIN}\r
+ MODULE_TYPE = ${module_module_type}${BEGIN}\r
+ VERSION_STRING = ${module_version_string}${END}${BEGIN}\r
PCD_IS_DRIVER = ${pcd_is_driver_string}${END}${BEGIN}\r
UEFI_SPECIFICATION_VERSION = ${module_uefi_specification_version}${END}${BEGIN}\r
- PI_SPECIFICATION_VERSION = ${module_pi_specification_version}${END}\r
-\r
-[Packages]${BEGIN}\r
+ PI_SPECIFICATION_VERSION = ${module_pi_specification_version}${END}${BEGIN}\r
+ ENTRY_POINT = ${module_entry_point}${END}${BEGIN}\r
+ UNLOAD_IMAGE = ${module_unload_image}${END}${BEGIN}\r
+ CONSTRUCTOR = ${module_constructor}${END}${BEGIN}\r
+ DESTRUCTOR = ${module_destructor}${END}${BEGIN}\r
+ SHADOW = ${module_shadow}${END}${BEGIN}\r
+ PCI_VENDOR_ID = ${module_pci_vendor_id}${END}${BEGIN}\r
+ PCI_DEVICE_ID = ${module_pci_device_id}${END}${BEGIN}\r
+ PCI_CLASS_CODE = ${module_pci_class_code}${END}${BEGIN}\r
+ PCI_REVISION = ${module_pci_revision}${END}${BEGIN}\r
+ BUILD_NUMBER = ${module_build_number}${END}${BEGIN}\r
+ SPEC = ${module_spec}${END}${BEGIN}\r
+ UEFI_HII_RESOURCE_SECTION = ${module_uefi_hii_resource_section}${END}${BEGIN}\r
+ MODULE_UNI_FILE = ${module_uni_file}${END}\r
+\r
+[Packages.${module_arch}]${BEGIN}\r
${package_item}${END}\r
\r
[Binaries.${module_arch}]${BEGIN}\r
[PatchPcd.${module_arch}]${BEGIN}\r
${patchablepcd_item}\r
${END}\r
+\r
[Protocols.${module_arch}]${BEGIN}\r
${protocol_item}\r
${END}\r
+\r
[Ppis.${module_arch}]${BEGIN}\r
${ppi_item}\r
${END}\r
+\r
[Guids.${module_arch}]${BEGIN}\r
${guid_item}\r
${END}\r
+\r
[PcdEx.${module_arch}]${BEGIN}\r
${pcd_item}\r
${END}\r
\r
+[LibraryClasses.${module_arch}]\r
+## @LIB_INSTANCES${BEGIN}\r
+# ${libraryclasses_item}${END}\r
+\r
+${depexsection_item}\r
+\r
+${tail_comments}\r
+\r
+[BuildOptions.${module_arch}]\r
## @AsBuilt${BEGIN}\r
## ${flags_item}${END}\r
""")\r
ExtraData="Build target [%s] is not supported by the platform. [Valid target: %s]"\r
% (self.BuildTarget, " ".join(self.Platform.BuildTargets)))\r
\r
+ # Validate SKU ID\r
+ if not self.SkuId:\r
+ self.SkuId = 'DEFAULT'\r
+\r
+ if self.SkuId not in self.Platform.SkuIds:\r
+ EdkLogger.error("build", PARAMETER_INVALID,\r
+ ExtraData="SKU-ID [%s] is not supported by the platform. [Valid SKU-ID: %s]"\r
+ % (self.SkuId, " ".join(self.Platform.SkuIds.keys())))\r
+\r
# parse FDF file to get PCDs in it, if any\r
if not self.FdfFile:\r
self.FdfFile = self.Platform.FlashDefinition\r
DecPcds = {}\r
DecPcdsKey = set()\r
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)\r
+ #Collect package set information from INF of FDF\r
PkgSet = set()\r
for Inf in ModuleList:\r
ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch)\r
# Check PCD type and definition between DSC and DEC\r
#\r
self._CheckPcdDefineAndType()\r
- \r
- if self.FdfFile:\r
- self._CheckDuplicateInFV(Fdf)\r
- \r
+\r
+# if self.FdfFile:\r
+# self._CheckDuplicateInFV(Fdf)\r
+\r
self._BuildDir = None\r
self._FvDir = None\r
self._MakeFileDir = None\r
ExtraData=None\r
)\r
Count += 1\r
- \r
+ ## Generate fds command\r
def _GenFdsCommand(self):\r
return (GenMake.TopLevelMakefile(self)._TEMPLATE_.Replace(GenMake.TopLevelMakefile(self)._TemplateDict)).strip()\r
\r
# get library/modules for build\r
self.LibraryBuildDirectoryList = []\r
self.ModuleBuildDirectoryList = []\r
- # get the original module/package/platform objects\r
- self.LibraryBuildDirectoryList = []\r
- self.ModuleBuildDirectoryList = []\r
return True\r
\r
def __repr__(self):\r
Ma = ModuleAutoGen(self.Workspace, ModuleFile, self.BuildTarget,\r
self.ToolChain, self.Arch, self.MetaFile)\r
Ma.CreateMakeFile(True)\r
- Ma.CreateAsBuiltInf()\r
+ #Ma.CreateAsBuiltInf()\r
\r
# no need to create makefile for the platform more than once\r
if self.IsMakeFileCreated:\r
if PcdFromModule.DatumType == "VOID*" and PcdFromModule.MaxDatumSize in [None, '']:\r
NoDatumTypePcdList.add("%s.%s [%s]" % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, F))\r
\r
+ # Check the PCD from Binary INF or Source INF\r
if M.IsBinaryModule == True:\r
PcdFromModule.IsFromBinaryInf = True\r
+\r
+ # Check the PCD from DSC or not \r
if (PcdFromModule.TokenCName, PcdFromModule.TokenSpaceGuidCName) in self.Platform.Pcds.keys():\r
PcdFromModule.IsFromDsc = True\r
else:\r
PcdFromModule.IsFromBinaryInf == False:\r
# Print warning message to let the developer make a determine.\r
if PcdFromModule not in PcdNotInDb:\r
- EdkLogger.warn("build",\r
- "A PCD listed in the DSC (%s.%s, %s) is used by a module not in the FDF. If the PCD is not used by any module listed in the FDF this PCD will be ignored. " \\r
- % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, self.Platform.MetaFile.Path),\r
- File=self.MetaFile, \\r
- ExtraData=None)\r
+ # EdkLogger.warn("build",\r
+ # "A PCD listed in the DSC (%s.%s, %s) is used by a module not in the FDF. If the PCD is not used by any module listed in the FDF this PCD will be ignored. " \\r
+ # % (PcdFromModule.TokenSpaceGuidCName, PcdFromModule.TokenCName, self.Platform.MetaFile.Path),\r
+ # File=self.MetaFile, \\r
+ # ExtraData=None)\r
PcdNotInDb.append(PcdFromModule)\r
continue\r
# If one of the Source built modules listed in the DSC is not listed in \r
elif PcdFromModule not in self._NonDynaPcdList_ and PcdFromModule.Type in TAB_PCDS_PATCHABLE_IN_MODULE:\r
self._NonDynaPcdList_.append(PcdFromModule)\r
if PcdFromModule in self._DynaPcdList_ and PcdFromModule.Phase == 'PEI' and PcdFromModule.Type in GenC.gDynamicExPcd:\r
+ # Overwrite the phase of any the same PCD existing, if Phase is PEI.\r
+ # It is to solve the case that a dynamic PCD used by a PEM module/PEI \r
+ # module & DXE module at a same time.\r
+ # Overwrite the type of the PCDs in source INF by the type of AsBuild\r
+ # INF file as DynamicEx. \r
Index = self._DynaPcdList_.index(PcdFromModule)\r
self._DynaPcdList_[Index].Phase = PcdFromModule.Phase\r
self._DynaPcdList_[Index].Type = PcdFromModule.Type\r
# If PCD is listed in a PcdsDynamicHii, PcdsDynamicExHii, PcdsDynamicHii or PcdsDynamicExHii\r
# section, and the PCD is not used by any module that is listed in the DSC file, the build \r
# provide a warning message.\r
- for PcdKey in self.Platform.Pcds.keys():\r
- Pcd = self.Platform.Pcds[PcdKey]\r
- if Pcd not in self._DynamicPcdList + PcdNotInDb and \\r
- Pcd.Type in [TAB_PCDS_DYNAMIC, TAB_PCDS_DYNAMIC_DEFAULT, TAB_PCDS_DYNAMIC_HII, TAB_PCDS_DYNAMIC_EX, TAB_PCDS_DYNAMIC_EX_DEFAULT, TAB_PCDS_DYNAMIC_EX_HII]:\r
- # Print warning message to let the developer make a determine.\r
- EdkLogger.warn("build",\r
- "A %s PCD listed in the DSC (%s.%s, %s) is not used by any module." \\r
- % (Pcd.Type, Pcd.TokenSpaceGuidCName, Pcd.TokenCName, self.Platform.MetaFile.Path),\r
- File=self.MetaFile, \\r
- ExtraData=None)\r
+ #for PcdKey in self.Platform.Pcds.keys():\r
+ # Pcd = self.Platform.Pcds[PcdKey]\r
+ # if Pcd not in self._DynamicPcdList + PcdNotInDb and \\r
+ # Pcd.Type in [TAB_PCDS_DYNAMIC, TAB_PCDS_DYNAMIC_DEFAULT, TAB_PCDS_DYNAMIC_HII, TAB_PCDS_DYNAMIC_EX, TAB_PCDS_DYNAMIC_EX_DEFAULT, TAB_PCDS_DYNAMIC_EX_HII]:\r
+ # # Print warning message to let the developer make a determine.\r
+ #EdkLogger.warn("build",\r
+ # "A %s PCD listed in the DSC (%s.%s, %s) is not used by any module." \\r
+ # % (Pcd.Type, Pcd.TokenSpaceGuidCName, Pcd.TokenCName, self.Platform.MetaFile.Path),\r
+ # File=self.MetaFile, \\r
+ # ExtraData=None)\r
#\r
# Sort dynamic PCD list to:\r
# 1) If PCD's datum type is VOID* and value is unicode string which starts with L, the PCD item should \r
self._EdkIIBuildOption = self._ExpandBuildOption(self.Platform.BuildOptions, EDKII_NAME)\r
return self._EdkIIBuildOption\r
\r
- ## Parse build_rule.txt in $(WORKSPACE)/Conf/build_rule.txt\r
+ ## Parse build_rule.txt in Conf Directory.\r
#\r
# @retval BuildRule object\r
#\r
if TAB_TAT_DEFINES_BUILD_RULE_CONF in self.Workspace.TargetTxt.TargetTxtDictionary:\r
BuildRuleFile = self.Workspace.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_BUILD_RULE_CONF]\r
if BuildRuleFile in [None, '']:\r
- BuildRuleFile = gBuildRuleFile\r
+ BuildRuleFile = gDefaultBuildRuleFile\r
self._BuildRule = BuildRule(BuildRuleFile)\r
if self._BuildRule._FileVersion == "":\r
self._BuildRule._FileVersion = AutoGenReqBuildRuleVerNum\r
return False\r
\r
self.SourceDir = self.MetaFile.SubDir\r
+ if self.SourceDir.upper().find(self.WorkspaceDir.upper()) == 0:\r
+ self.SourceDir = self.SourceDir[len(self.WorkspaceDir) + 1:]\r
+\r
self.SourceOverrideDir = None\r
# use overrided path defined in DSC file\r
if self.MetaFile.Key in GlobalData.gOverrideDir:\r
\r
## Return the module meta-file GUID\r
def _GetGuid(self):\r
+ #\r
+ # To build same module more than once, the module path with FILE_GUID overridden has\r
+ # the file name FILE_GUIDmodule.inf, but the relative path (self.MetaFile.File) is the realy path\r
+ # in DSC. The overridden GUID can be retrieved from file name\r
+ #\r
+ if os.path.basename(self.MetaFile.File) != os.path.basename(self.MetaFile.Path):\r
+ #\r
+ # Length of GUID is 36\r
+ #\r
+ return os.path.basename(self.MetaFile.Path)[:36]\r
return self.Module.Guid\r
\r
## Return the module version\r
continue\r
PackageList.append(Package)\r
return PackageList\r
-\r
+ \r
+ ## Get the depex string\r
+ #\r
+ # @return : a string contain all depex expresion.\r
+ def _GetDepexExpresionString(self):\r
+ DepexStr = ''\r
+ DepexList = []\r
+ ## DPX_SOURCE IN Define section.\r
+ if self.Module.DxsFile:\r
+ return DepexStr\r
+ for M in [self.Module] + self.DependentLibraryList:\r
+ Filename = M.MetaFile.Path\r
+ InfObj = InfSectionParser.InfSectionParser(Filename)\r
+ DepexExpresionList = InfObj.GetDepexExpresionList()\r
+ for DepexExpresion in DepexExpresionList:\r
+ for key in DepexExpresion.keys():\r
+ Arch, ModuleType = key\r
+ # the type of build module is USER_DEFINED.\r
+ # All different DEPEX section tags would be copied into the As Built INF file\r
+ # and there would be separate DEPEX section tags\r
+ if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:\r
+ if (Arch.upper() == self.Arch.upper()) and (ModuleType.upper() != TAB_ARCH_COMMON):\r
+ DepexList.append({(Arch, ModuleType): DepexExpresion[key][:]})\r
+ else:\r
+ if Arch.upper() == TAB_ARCH_COMMON or \\r
+ (Arch.upper() == self.Arch.upper() and \\r
+ ModuleType.upper() in [TAB_ARCH_COMMON, self.ModuleType.upper()]):\r
+ DepexList.append({(Arch, ModuleType): DepexExpresion[key][:]})\r
+ \r
+ #the type of build module is USER_DEFINED.\r
+ if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:\r
+ for Depex in DepexList:\r
+ for key in Depex.keys():\r
+ DepexStr += '[Depex.%s.%s]\n' % key\r
+ DepexStr += '\n'.join(['# '+ val for val in Depex[key]])\r
+ DepexStr += '\n\n'\r
+ if not DepexStr:\r
+ return '[Depex.%s]\n' % self.Arch\r
+ return DepexStr\r
+ \r
+ #the type of build module not is USER_DEFINED.\r
+ Count = 0\r
+ for Depex in DepexList:\r
+ Count += 1\r
+ if DepexStr != '':\r
+ DepexStr += ' AND '\r
+ DepexStr += '('\r
+ for D in Depex.values():\r
+ DepexStr += ' '.join([val for val in D])\r
+ Index = DepexStr.find('END')\r
+ if Index > -1 and Index == len(DepexStr) - 3:\r
+ DepexStr = DepexStr[:-3]\r
+ DepexStr = DepexStr.strip()\r
+ DepexStr += ')'\r
+ if Count == 1:\r
+ DepexStr = DepexStr.lstrip('(').rstrip(')').strip()\r
+ if not DepexStr:\r
+ return '[Depex.%s]\n' % self.Arch\r
+ return '[Depex.%s]\n# ' % self.Arch + DepexStr\r
+ \r
## Merge dependency expression\r
#\r
# @retval list The token list of the dependency expression after parsed\r
## Return a list of files which can be built from source\r
#\r
# What kind of files can be built is determined by build rules in\r
- # $(WORKSPACE)/Conf/build_rule.txt and toolchain family.\r
+ # $(CONF_DIRECTORY)/build_rule.txt and toolchain family.\r
#\r
def _GetSourceFileList(self):\r
if self._SourceFileList == None:\r
self._IncludePathList.append(str(Inc))\r
return self._IncludePathList\r
\r
+ ## Get HII EX PCDs which maybe used by VFR\r
+ #\r
+ # efivarstore used by VFR may relate with HII EX PCDs\r
+ # Get the variable name and GUID from efivarstore and HII EX PCD\r
+ # List the HII EX PCDs in As Built INF if both name and GUID match.\r
+ #\r
+ # @retval list HII EX PCDs\r
+ #\r
+ def _GetPcdsMaybeUsedByVfr(self):\r
+ if not self.SourceFileList:\r
+ return []\r
+\r
+ NameGuids = []\r
+ for SrcFile in self.SourceFileList:\r
+ if SrcFile.Ext.lower() != '.vfr':\r
+ continue\r
+ Vfri = os.path.join(self.OutputDir, SrcFile.BaseName + '.i')\r
+ if not os.path.exists(Vfri):\r
+ continue\r
+ VfriFile = open(Vfri, 'r')\r
+ Content = VfriFile.read()\r
+ VfriFile.close()\r
+ Pos = Content.find('efivarstore')\r
+ while Pos != -1:\r
+ #\r
+ # Make sure 'efivarstore' is the start of efivarstore statement\r
+ # In case of the value of 'name' (name = efivarstore) is equal to 'efivarstore'\r
+ #\r
+ Index = Pos - 1\r
+ while Index >= 0 and Content[Index] in ' \t\r\n':\r
+ Index -= 1\r
+ if Index >= 0 and Content[Index] != ';':\r
+ Pos = Content.find('efivarstore', Pos + len('efivarstore'))\r
+ continue\r
+ #\r
+ # 'efivarstore' must be followed by name and guid\r
+ #\r
+ Name = gEfiVarStoreNamePattern.search(Content, Pos)\r
+ if not Name:\r
+ break\r
+ Guid = gEfiVarStoreGuidPattern.search(Content, Pos)\r
+ if not Guid:\r
+ break\r
+ NameArray = ConvertStringToByteArray('L"' + Name.group(1) + '"')\r
+ NameGuids.append((NameArray, GuidStructureStringToGuidString(Guid.group(1))))\r
+ Pos = Content.find('efivarstore', Name.end())\r
+ if not NameGuids:\r
+ return []\r
+ HiiExPcds = []\r
+ for Pcd in self.PlatformInfo.Platform.Pcds.values():\r
+ if Pcd.Type != TAB_PCDS_DYNAMIC_EX_HII:\r
+ continue\r
+ for SkuName in Pcd.SkuInfoList:\r
+ SkuInfo = Pcd.SkuInfoList[SkuName]\r
+ Name = ConvertStringToByteArray(SkuInfo.VariableName)\r
+ Value = GuidValue(SkuInfo.VariableGuid, self.PlatformInfo.PackageList)\r
+ if not Value:\r
+ continue\r
+ Guid = GuidStructureStringToGuidString(Value)\r
+ if (Name, Guid) in NameGuids and Pcd not in HiiExPcds:\r
+ HiiExPcds.append(Pcd)\r
+ break\r
+\r
+ return HiiExPcds\r
+\r
## Create AsBuilt INF file the module\r
#\r
def CreateAsBuiltInf(self):\r
break\r
if Found: break\r
\r
+ VfrPcds = self._GetPcdsMaybeUsedByVfr()\r
+ for Pkg in self.PlatformInfo.PackageList:\r
+ if Pkg in Packages:\r
+ continue\r
+ for VfrPcd in VfrPcds:\r
+ if ((VfrPcd.TokenCName, VfrPcd.TokenSpaceGuidCName, 'DynamicEx') in Pkg.Pcds or\r
+ (VfrPcd.TokenCName, VfrPcd.TokenSpaceGuidCName, 'Dynamic') in Pkg.Pcds):\r
+ Packages += [Pkg]\r
+ break\r
+\r
ModuleType = self.ModuleType\r
if ModuleType == 'UEFI_DRIVER' and self.DepexGenerated:\r
ModuleType = 'DXE_DRIVER'\r
if self.PcdIsDriver != '':\r
DriverType = self.PcdIsDriver\r
\r
+ Guid = self.Guid\r
+ MDefs = self.Module.Defines\r
+\r
AsBuiltInfDict = {\r
'module_name' : self.Name,\r
- 'module_guid' : self.Guid,\r
+ 'module_guid' : Guid,\r
'module_module_type' : ModuleType,\r
- 'module_version_string' : self.Version,\r
+ 'module_version_string' : [MDefs['VERSION_STRING']] if 'VERSION_STRING' in MDefs else [],\r
'pcd_is_driver_string' : [],\r
'module_uefi_specification_version' : [],\r
'module_pi_specification_version' : [],\r
+ 'module_entry_point' : self.Module.ModuleEntryPointList,\r
+ 'module_unload_image' : self.Module.ModuleUnloadImageList,\r
+ 'module_constructor' : self.Module.ConstructorList,\r
+ 'module_destructor' : self.Module.DestructorList,\r
+ 'module_shadow' : [MDefs['SHADOW']] if 'SHADOW' in MDefs else [],\r
+ 'module_pci_vendor_id' : [MDefs['PCI_VENDOR_ID']] if 'PCI_VENDOR_ID' in MDefs else [],\r
+ 'module_pci_device_id' : [MDefs['PCI_DEVICE_ID']] if 'PCI_DEVICE_ID' in MDefs else [],\r
+ 'module_pci_class_code' : [MDefs['PCI_CLASS_CODE']] if 'PCI_CLASS_CODE' in MDefs else [],\r
+ 'module_pci_revision' : [MDefs['PCI_REVISION']] if 'PCI_REVISION' in MDefs else [],\r
+ 'module_build_number' : [MDefs['BUILD_NUMBER']] if 'BUILD_NUMBER' in MDefs else [],\r
+ 'module_spec' : [MDefs['SPEC']] if 'SPEC' in MDefs else [],\r
+ 'module_uefi_hii_resource_section' : [MDefs['UEFI_HII_RESOURCE_SECTION']] if 'UEFI_HII_RESOURCE_SECTION' in MDefs else [],\r
+ 'module_uni_file' : [MDefs['MODULE_UNI_FILE']] if 'MODULE_UNI_FILE' in MDefs else [],\r
'module_arch' : self.Arch,\r
'package_item' : ['%s' % (Package.MetaFile.File.replace('\\','/')) for Package in Packages],\r
'binary_item' : [],\r
'flags_item' : [],\r
'libraryclasses_item' : []\r
}\r
- AsBuiltInfDict['module_inf_version'] = '0x%08x' % self.AutoGenVersion\r
+\r
+ if self.AutoGenVersion > int(gInfSpecVersion, 0):\r
+ AsBuiltInfDict['module_inf_version'] = '0x%08x' % self.AutoGenVersion\r
+ else:\r
+ AsBuiltInfDict['module_inf_version'] = gInfSpecVersion\r
+\r
if DriverType:\r
AsBuiltInfDict['pcd_is_driver_string'] += [DriverType]\r
\r
StartPos = Index\r
break\r
AsBuiltInfDict['header_comments'] = '\n'.join(HeaderComments[StartPos:]).replace(':#', '://')\r
+ AsBuiltInfDict['tail_comments'] = '\n'.join(self.Module.TailComments)\r
+\r
GenList = [\r
(self.ProtocolList, self._ProtocolComments, 'protocol_item'),\r
(self.PpiList, self._PpiComments, 'ppi_item'),\r
if PcdComments:\r
PcdItem = PcdComments + '\n ' + PcdItem\r
AsBuiltInfDict['patchablepcd_item'].append(PcdItem)\r
- for Pcd in Pcds:\r
+\r
+ HiiPcds = []\r
+ for Pcd in Pcds + VfrPcds:\r
PcdComments = ''\r
PcdCommentList = []\r
HiiInfo = ''\r
+ SkuId = ''\r
if Pcd.Type == TAB_PCDS_DYNAMIC_EX_HII:\r
for SkuName in Pcd.SkuInfoList:\r
SkuInfo = Pcd.SkuInfoList[SkuName]\r
+ SkuId = SkuInfo.SkuId\r
HiiInfo = '## %s|%s|%s' % (SkuInfo.VariableName, SkuInfo.VariableGuid, SkuInfo.VariableOffset)\r
break\r
+ if SkuId:\r
+ #\r
+ # Don't generate duplicated HII PCD\r
+ #\r
+ if (SkuId, Pcd.TokenSpaceGuidCName, Pcd.TokenCName) in HiiPcds:\r
+ continue\r
+ else:\r
+ HiiPcds.append((SkuId, Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
if (Pcd.TokenSpaceGuidCName, Pcd.TokenCName) in self._PcdComments:\r
PcdCommentList = self._PcdComments[Pcd.TokenSpaceGuidCName, Pcd.TokenCName][:]\r
if HiiInfo:\r
UsageIndex = -1\r
+ UsageStr = ''\r
for Index, Comment in enumerate(PcdCommentList):\r
for Usage in UsageList:\r
if Comment.find(Usage) != -1:\r
+ UsageStr = Usage\r
UsageIndex = Index\r
break\r
if UsageIndex != -1:\r
- PcdCommentList[UsageIndex] = PcdCommentList[UsageIndex] + ' ' + HiiInfo\r
+ PcdCommentList[UsageIndex] = '## %s %s %s' % (UsageStr, HiiInfo, PcdCommentList[UsageIndex].replace(UsageStr, '')) \r
else:\r
- PcdCommentList.append('## ' + HiiInfo)\r
+ PcdCommentList.append('## UNDEFINED ' + HiiInfo)\r
PcdComments = '\n '.join(PcdCommentList)\r
PcdEntry = Pcd.TokenSpaceGuidCName + '.' + Pcd.TokenCName\r
if PcdComments:\r
for Item in self.BuildOption:\r
if 'FLAGS' in self.BuildOption[Item]:\r
AsBuiltInfDict['flags_item'] += ['%s:%s_%s_%s_%s_FLAGS = %s' % (self.ToolChainFamily, self.BuildTarget, self.ToolChain, self.Arch, Item, self.BuildOption[Item]['FLAGS'].strip())]\r
+\r
+ # Generated LibraryClasses section in comments.\r
+ for Library in self.LibraryAutoGenList:\r
+ AsBuiltInfDict['libraryclasses_item'] += [Library.MetaFile.File.replace('\\', '/')]\r
+ \r
+ # Generated depex expression section in comments.\r
+ AsBuiltInfDict['depexsection_item'] = ''\r
+ DepexExpresion = self._GetDepexExpresionString()\r
+ if DepexExpresion:\r
+ AsBuiltInfDict['depexsection_item'] = DepexExpresion\r
\r
AsBuiltInf = TemplateString()\r
AsBuiltInf.Append(gAsBuiltInfHeaderString.Replace(AsBuiltInfDict))\r
MODULE_FILE_BASE_NAME = ${module_file_base_name}\r
BASE_NAME = $(MODULE_NAME)\r
MODULE_RELATIVE_DIR = ${module_relative_directory}\r
+PACKAGE_RELATIVE_DIR = ${package_relative_directory}\r
MODULE_DIR = $(WORKSPACE)${separator}${module_relative_directory}\r
\r
MODULE_ENTRY_POINT = ${module_entry_point}\r
Command = self._MAKE_TEMPLATE_[self._FileType] % {"file":os.path.join(D, MakefileName)}\r
LibraryMakeCommandList.append(Command)\r
\r
+ package_rel_dir = self._AutoGenObject.SourceDir\r
+ if os.sep in package_rel_dir:\r
+ package_rel_dir = package_rel_dir[package_rel_dir.index(os.sep) + 1:]\r
+\r
MakefileTemplateDict = {\r
"makefile_header" : self._FILE_HEADER_[self._FileType],\r
"makefile_path" : os.path.join("$(MODULE_BUILD_DIR)", MakefileName),\r
"module_file" : self._AutoGenObject.MetaFile.Name,\r
"module_file_base_name" : self._AutoGenObject.MetaFile.BaseName,\r
"module_relative_directory" : self._AutoGenObject.SourceDir,\r
- "module_extra_defines" : ["%s = %s" % (k, v) for k,v in self._AutoGenObject.Module.Defines.iteritems()],\r
+ "package_relative_directory": package_rel_dir,\r
+ "module_extra_defines" : ["%s = %s" % (k, v) for k, v in self._AutoGenObject.Module.Defines.iteritems()],\r
\r
"architecture" : self._AutoGenObject.Arch,\r
"toolchain_tag" : self._AutoGenObject.ToolChain,\r
def GetModuleBuildDirectoryList(self):\r
DirList = []\r
for ModuleAutoGen in self._AutoGenObject.ModuleAutoGenList:\r
- DirList.append(os.path.join(self._AutoGenObject.BuildDir, ModuleAutoGen.BuildDir))\r
+ if not ModuleAutoGen.IsBinaryModule:\r
+ DirList.append(os.path.join(self._AutoGenObject.BuildDir, ModuleAutoGen.BuildDir))\r
return DirList\r
\r
## Get the root directory list for intermediate files of all libraries build\r
def GetLibraryBuildDirectoryList(self):\r
DirList = []\r
for LibraryAutoGen in self._AutoGenObject.LibraryAutoGenList:\r
- DirList.append(os.path.join(self._AutoGenObject.BuildDir, LibraryAutoGen.BuildDir))\r
+ if not LibraryAutoGen.IsBinaryModule:\r
+ DirList.append(os.path.join(self._AutoGenObject.BuildDir, LibraryAutoGen.BuildDir))\r
return DirList\r
\r
_TemplateDict = property(_CreateTemplateDict)\r
#\r
class TopLevelMakefile(BuildFile):\r
## template used to generate toplevel makefile\r
- _TEMPLATE_ = TemplateString('''${BEGIN}\tGenFds -f ${fdf_file} -o ${platform_build_directory} -t ${toolchain_tag} -b ${build_target} -p ${active_platform} -a ${build_architecture_list} ${extra_options}${END}${BEGIN} -r ${fd} ${END}${BEGIN} -i ${fv} ${END}${BEGIN} -C ${cap} ${END}${BEGIN} -D ${macro} ${END}''')\r
+ _TEMPLATE_ = TemplateString('''${BEGIN}\tGenFds -f ${fdf_file} --conf=${conf_directory} -o ${platform_build_directory} -t ${toolchain_tag} -b ${build_target} -p ${active_platform} -a ${build_architecture_list} ${extra_options}${END}${BEGIN} -r ${fd} ${END}${BEGIN} -i ${fv} ${END}${BEGIN} -C ${cap} ${END}${BEGIN} -D ${macro} ${END}''')\r
\r
## Constructor of TopLevelMakefile\r
#\r
if GlobalData.gCaseInsensitive:\r
ExtraOption += " -c"\r
\r
+ if GlobalData.gIgnoreSource:\r
+ ExtraOption += " --ignore-sources"\r
+\r
MakefileName = self._FILE_NAME_[self._FileType]\r
SubBuildCommandList = []\r
for A in PlatformInfo.ArchList:\r
"platform_guid" : PlatformInfo.Guid,\r
"platform_version" : PlatformInfo.Version,\r
"platform_build_directory" : PlatformInfo.BuildDir,\r
+ "conf_directory" : GlobalData.gConfDirectory,\r
\r
"toolchain_tag" : PlatformInfo.ToolChain,\r
"build_target" : PlatformInfo.BuildTarget,\r
def GetModuleBuildDirectoryList(self):\r
DirList = []\r
for ModuleAutoGen in self._AutoGenObject.ModuleAutoGenList:\r
- DirList.append(os.path.join(self._AutoGenObject.BuildDir, ModuleAutoGen.BuildDir))\r
+ if not ModuleAutoGen.IsBinaryModule:\r
+ DirList.append(os.path.join(self._AutoGenObject.BuildDir, ModuleAutoGen.BuildDir))\r
return DirList\r
\r
## Get the root directory list for intermediate files of all libraries build\r
def GetLibraryBuildDirectoryList(self):\r
DirList = []\r
for LibraryAutoGen in self._AutoGenObject.LibraryAutoGenList:\r
- DirList.append(os.path.join(self._AutoGenObject.BuildDir, LibraryAutoGen.BuildDir))\r
+ if not LibraryAutoGen.IsBinaryModule:\r
+ DirList.append(os.path.join(self._AutoGenObject.BuildDir, LibraryAutoGen.BuildDir))\r
return DirList\r
\r
_TemplateDict = property(_CreateTemplateDict)\r
--- /dev/null
+## @file\r
+# Parser a Inf file and Get specify section data.\r
+#\r
+# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+\r
+## Import Modules\r
+#\r
+\r
+import Common.EdkLogger as EdkLogger\r
+from Common.BuildToolError import *\r
+from Common.DataType import *\r
+ \r
+\r
+class InfSectionParser():\r
+ def __init__(self, FilePath):\r
+ self._FilePath = FilePath\r
+ self._FileSectionDataList = []\r
+ self._ParserInf()\r
+ \r
+ def _ParserInf(self):\r
+ Filename = self._FilePath\r
+ FileLinesList = []\r
+ UserExtFind = False\r
+ FindEnd = True\r
+ FileLastLine = False\r
+ SectionLine = ''\r
+ SectionData = []\r
+ \r
+ try:\r
+ FileLinesList = open(Filename, "r", 0).readlines()\r
+ except BaseException:\r
+ EdkLogger.error("build", AUTOGEN_ERROR, 'File %s is opened failed.' % Filename)\r
+ \r
+ for Index in range(0, len(FileLinesList)):\r
+ line = str(FileLinesList[Index]).strip()\r
+ if Index + 1 == len(FileLinesList):\r
+ FileLastLine = True\r
+ NextLine = ''\r
+ else:\r
+ NextLine = str(FileLinesList[Index + 1]).strip()\r
+ if UserExtFind and FindEnd == False:\r
+ if line:\r
+ SectionData.append(line)\r
+ if line.lower().startswith(TAB_SECTION_START) and line.lower().endswith(TAB_SECTION_END):\r
+ SectionLine = line\r
+ UserExtFind = True\r
+ FindEnd = False\r
+ \r
+ if (NextLine != '' and NextLine[0] == TAB_SECTION_START and \\r
+ NextLine[-1] == TAB_SECTION_END) or FileLastLine:\r
+ UserExtFind = False\r
+ FindEnd = True\r
+ self._FileSectionDataList.append({SectionLine: SectionData[:]})\r
+ SectionData = []\r
+ SectionLine = ''\r
+ \r
+\r
+ # Get depex expresion\r
+ #\r
+ # @return: a list include some dictionary that key is section and value is a list contain all data.\r
+ def GetDepexExpresionList(self):\r
+ DepexExpresionList = []\r
+ if not self._FileSectionDataList:\r
+ return DepexExpresionList\r
+ for SectionDataDict in self._FileSectionDataList:\r
+ for key in SectionDataDict.keys():\r
+ if key.lower() == "[depex]" or key.lower().startswith("[depex."):\r
+ SectionLine = key.lstrip(TAB_SECTION_START).rstrip(TAB_SECTION_END)\r
+ SubSectionList = [SectionLine]\r
+ if str(SectionLine).find(TAB_COMMA_SPLIT) > -1:\r
+ SubSectionList = str(SectionLine).split(TAB_COMMA_SPLIT)\r
+ for SubSection in SubSectionList:\r
+ SectionList = SubSection.split(TAB_SPLIT)\r
+ SubKey = ()\r
+ if len(SectionList) == 1:\r
+ SubKey = (TAB_ARCH_COMMON, TAB_ARCH_COMMON)\r
+ elif len(SectionList) == 2:\r
+ SubKey = (SectionList[1], TAB_ARCH_COMMON)\r
+ elif len(SectionList) == 3:\r
+ SubKey = (SectionList[1], SectionList[2])\r
+ else:\r
+ EdkLogger.error("build", AUTOGEN_ERROR, 'Section %s is invalid.' % key)\r
+ DepexExpresionList.append({SubKey: SectionDataDict[key]})\r
+ return DepexExpresionList\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+## @file\r
+# This file is used to parse a strings file and create or add to a string database \r
+# file.\r
+#\r
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-#\r
-#This file is used to parse a strings file and create or add to a string database file.\r
-#\r
-\r
##\r
# Import Modules\r
#\r
+## @file\r
+# This file is used to collect all defined strings in multiple uni files\r
+#\r
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-#\r
-#This file is used to collect all defined strings in multiple uni files\r
-#\r
-\r
##\r
# Import Modules\r
#\r
TAB_INF_GUIDTYPE_VAR = 'Variable'\r
TAB_INF_GUIDTYPE_PROTOCOL = 'PROTOCOL'\r
TAB_INF_GUIDTYPE_PPI = 'PPI'\r
-TAB_INF_GUIDTYPE_UNDEFINED = 'UNDEFINED'\r
+TAB_INF_USAGE_UNDEFINED = 'UNDEFINED'\r
\r
#\r
# Dec Definitions\r
## @file\r
# This file is used to define common static strings used by INF/DEC/DSC files\r
#\r
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# FDF parser\r
#\r
gFdfParser = None\r
+\r
+#\r
+# If a module is built more than once with different PCDs or library classes\r
+# a temporary INF file with same content is created, the temporary file is removed\r
+# when build exits.\r
+#\r
+gTempInfs = []\r
+\r
import re\r
import cPickle\r
import array\r
+import shutil\r
from UserDict import IterableUserDict\r
from UserList import UserList\r
\r
## Dictionary used to store dependencies of files\r
gDependencyDatabase = {} # arch : {file path : [dependent files list]}\r
\r
+## Routine to process duplicated INF\r
+#\r
+# This function is called by following two cases:\r
+# Case 1 in DSC:\r
+# [components.arch]\r
+# Pkg/module/module.inf\r
+# Pkg/module/module.inf {\r
+# <Defines>\r
+# FILE_GUID = 0D1B936F-68F3-4589-AFCC-FB8B7AEBC836\r
+# }\r
+# Case 2 in FDF:\r
+# INF Pkg/module/module.inf\r
+# INF FILE_GUID = 0D1B936F-68F3-4589-AFCC-FB8B7AEBC836 Pkg/module/module.inf\r
+#\r
+# This function copies Pkg/module/module.inf to\r
+# Conf/.cache/0D1B936F-68F3-4589-AFCC-FB8B7AEBC836module.inf\r
+#\r
+# @param Path Original PathClass object\r
+# @param BaseName New file base name\r
+#\r
+# @retval return the new PathClass object\r
+#\r
+def ProcessDuplicatedInf(Path, BaseName, Workspace):\r
+ Filename = os.path.split(Path.File)[1]\r
+ if '.' in Filename:\r
+ Filename = BaseName + Path.BaseName + Filename[Filename.rfind('.'):]\r
+ else:\r
+ Filename = BaseName + Path.BaseName\r
+\r
+ #\r
+ # If -N is specified on command line, cache is disabled\r
+ # The directory has to be created\r
+ #\r
+ DbDir = os.path.split(GlobalData.gDatabasePath)[0]\r
+ if not os.path.exists(DbDir):\r
+ os.makedirs(DbDir)\r
+ #\r
+ # A temporary INF is copied to database path which must have write permission\r
+ # The temporary will be removed at the end of build\r
+ # In case of name conflict, the file name is \r
+ # FILE_GUIDBaseName (0D1B936F-68F3-4589-AFCC-FB8B7AEBC836module.inf)\r
+ #\r
+ TempFullPath = os.path.join(DbDir,\r
+ Filename)\r
+ RtPath = PathClass(Path.File, Workspace)\r
+ #\r
+ # Modify the full path to temporary path, keep other unchanged\r
+ #\r
+ # To build same module more than once, the module path with FILE_GUID overridden has\r
+ # the file name FILE_GUIDmodule.inf, but the relative path (self.MetaFile.File) is the real path\r
+ # in DSC which is used as relative path by C files and other files in INF. \r
+ # A trick was used: all module paths are PathClass instances, after the initialization\r
+ # of PathClass, the PathClass.Path is overridden by the temporary INF path.\r
+ #\r
+ # The reason for creating a temporary INF is:\r
+ # Platform.Modules which is the base to create ModuleAutoGen objects is a dictionary,\r
+ # the key is the full path of INF, the value is an object to save overridden library instances, PCDs.\r
+ # A different key for the same module is needed to create different output directory,\r
+ # retrieve overridden PCDs, library instances.\r
+ #\r
+ # The BaseName is the FILE_GUID which is also the output directory name.\r
+ #\r
+ #\r
+ RtPath.Path = TempFullPath\r
+ RtPath.BaseName = BaseName\r
+ #\r
+ # If file exists, compare contents\r
+ #\r
+ if os.path.exists(TempFullPath):\r
+ with open(str(Path), 'rb') as f1: Src = f1.read()\r
+ with open(TempFullPath, 'rb') as f2: Dst = f2.read()\r
+ if Src == Dst:\r
+ return RtPath\r
+ GlobalData.gTempInfs.append(TempFullPath)\r
+ shutil.copy2(str(Path), TempFullPath)\r
+ return RtPath\r
+\r
+## Remove temporary created INFs whose paths were saved in gTempInfs\r
+#\r
+def ClearDuplicatedInf():\r
+ for File in GlobalData.gTempInfs:\r
+ if os.path.exists(File):\r
+ os.remove(File)\r
+\r
## callback routine for processing variable option\r
#\r
# This function can be used to process variable number of option values. The\r
return os.path.sep.join(P1[:Index])\r
return os.path.sep.join(P1)\r
\r
+#\r
+# Convert string to C format array\r
+#\r
+def ConvertStringToByteArray(Value):\r
+ Value = Value.strip()\r
+ if not Value:\r
+ return None\r
+ if Value[0] == '{':\r
+ if not Value.endswith('}'):\r
+ return None\r
+ Value = Value.replace(' ', '').replace('{', '').replace('}', '')\r
+ ValFields = Value.split(',')\r
+ try:\r
+ for Index in range(len(ValFields)):\r
+ ValFields[Index] = str(int(ValFields[Index], 0))\r
+ except ValueError:\r
+ return None\r
+ Value = '{' + ','.join(ValFields) + '}'\r
+ return Value\r
+\r
+ Unicode = False\r
+ if Value.startswith('L"'):\r
+ if not Value.endswith('"'):\r
+ return None\r
+ Value = Value[1:]\r
+ Unicode = True\r
+ elif not Value.startswith('"') or not Value.endswith('"'):\r
+ return None\r
+\r
+ Value = eval(Value) # translate escape character\r
+ NewValue = '{'\r
+ for Index in range(0,len(Value)):\r
+ if Unicode:\r
+ NewValue = NewValue + str(ord(Value[Index]) % 0x10000) + ','\r
+ else:\r
+ NewValue = NewValue + str(ord(Value[Index]) % 0x100) + ','\r
+ Value = NewValue + '0}'\r
+ return Value\r
+\r
class PathClass(object):\r
def __init__(self, File='', Root='', AlterRoot='', Type='', IsBinary=False,\r
Arch='COMMON', ToolChainFamily='', Target='', TagName='', ToolCode=''):\r
import GlobalData\r
from Common.LongFilePathSupport import OpenLongFilePath as open\r
\r
-gDefaultTargetTxtFile = "Conf/target.txt"\r
+gDefaultTargetTxtFile = "target.txt"\r
\r
## TargetTxtClassObject\r
#\r
DataType.TAB_TAT_DEFINES_TARGET_ARCH : [],\r
DataType.TAB_TAT_DEFINES_BUILD_RULE_CONF : '',\r
}\r
+ self.ConfDirectoryPath = ""\r
if Filename != None:\r
self.LoadTargetTxtFile(Filename)\r
\r
def ConvertTextFileToDict(self, FileName, CommentCharacter, KeySplitCharacter):\r
F = None\r
try:\r
- F = open(FileName,'r')\r
+ F = open(FileName, 'r')\r
+ self.ConfDirectoryPath = os.path.dirname(FileName)\r
except:\r
EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=FileName)\r
if F != None:\r
if Key in [DataType.TAB_TAT_DEFINES_ACTIVE_PLATFORM, DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF, \\r
DataType.TAB_TAT_DEFINES_ACTIVE_MODULE, DataType.TAB_TAT_DEFINES_BUILD_RULE_CONF]:\r
self.TargetTxtDictionary[Key] = Value.replace('\\', '/')\r
+ if Key == DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF and self.TargetTxtDictionary[Key]:\r
+ if self.TargetTxtDictionary[Key].startswith("Conf/"):\r
+ Tools_Def = os.path.join(self.ConfDirectoryPath, self.TargetTxtDictionary[Key].strip())\r
+ if not os.path.exists(Tools_Def) or not os.path.isfile(Tools_Def):\r
+ # If Conf/Conf does not exist, try just the Conf/ directory\r
+ Tools_Def = os.path.join(self.ConfDirectoryPath, self.TargetTxtDictionary[Key].replace("Conf/", "", 1).strip())\r
+ else:\r
+ # The File pointed to by TOOL_CHAIN_CONF is not in a Conf/ directory\r
+ Tools_Def = os.path.join(self.ConfDirectoryPath, self.TargetTxtDictionary[Key].strip())\r
+ self.TargetTxtDictionary[Key] = Tools_Def\r
+ if Key == DataType.TAB_TAT_DEFINES_BUILD_RULE_CONF and self.TargetTxtDictionary[Key]:\r
+ if self.TargetTxtDictionary[Key].startswith("Conf/"):\r
+ Build_Rule = os.path.join(self.ConfDirectoryPath, self.TargetTxtDictionary[Key].strip())\r
+ if not os.path.exists(Build_Rule) or not os.path.isfile(Build_Rule):\r
+ # If Conf/Conf does not exist, try just the Conf/ directory\r
+ Build_Rule = os.path.join(self.ConfDirectoryPath, self.TargetTxtDictionary[Key].replace("Conf/", "", 1).strip())\r
+ else:\r
+ # The File pointed to by BUILD_RULE_CONF is not in a Conf/ directory\r
+ Build_Rule = os.path.join(self.ConfDirectoryPath, self.TargetTxtDictionary[Key].strip())\r
+ self.TargetTxtDictionary[Key] = Build_Rule\r
elif Key in [DataType.TAB_TAT_DEFINES_TARGET, DataType.TAB_TAT_DEFINES_TARGET_ARCH, \\r
DataType.TAB_TAT_DEFINES_TOOL_CHAIN_TAG]:\r
self.TargetTxtDictionary[Key] = Value.split()\r
print Item\r
## TargetTxtDict\r
#\r
-# Load target.txt in input workspace dir\r
+# Load target.txt in input Conf dir\r
#\r
-# @param WorkSpace: Workspace dir\r
+# @param ConfDir: Conf dir\r
#\r
# @retval Target An instance of TargetTxtClassObject() with loaded target.txt\r
#\r
-def TargetTxtDict(WorkSpace):\r
+def TargetTxtDict(ConfDir):\r
Target = TargetTxtClassObject()\r
- Target.LoadTargetTxtFile(os.path.normpath(os.path.join(WorkSpace, gDefaultTargetTxtFile)))\r
+ Target.LoadTargetTxtFile(os.path.normpath(os.path.join(ConfDir, gDefaultTargetTxtFile)))\r
return Target\r
\r
##\r
gMacroRefPattern = re.compile('(DEF\([^\(\)]+\))')\r
gEnvRefPattern = re.compile('(ENV\([^\(\)]+\))')\r
gMacroDefPattern = re.compile("DEFINE\s+([^\s]+)")\r
-gDefaultToolsDefFile = "Conf/tools_def.txt"\r
+gDefaultToolsDefFile = "tools_def.txt"\r
\r
## ToolDefClassObject\r
#\r
\r
## ToolDefDict\r
#\r
-# Load tools_def.txt in input workspace dir\r
+# Load tools_def.txt in input Conf dir\r
#\r
-# @param WorkSpace: Workspace dir\r
+# @param ConfDir: Conf dir\r
#\r
# @retval ToolDef An instance of ToolDefClassObject() with loaded tools_def.txt\r
#\r
-def ToolDefDict(WorkSpace):\r
- Target = TargetTxtDict(WorkSpace)\r
+def ToolDefDict(ConfDir):\r
+ Target = TargetTxtDict(ConfDir)\r
ToolDef = ToolDefClassObject()\r
if DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF in Target.TargetTxtDictionary:\r
- gDefaultToolsDefFile = Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF]\r
- ToolDef.LoadToolDefFile(os.path.normpath(os.path.join(WorkSpace, gDefaultToolsDefFile)))\r
+ ToolsDefFile = Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF]\r
+ if ToolsDefFile:\r
+ ToolDef.LoadToolDefFile(os.path.normpath(ToolsDefFile))\r
+ else:\r
+ ToolDef.LoadToolDefFile(os.path.normpath(os.path.join(ConfDir, gDefaultToolsDefFile)))\r
+ else:\r
+ ToolDef.LoadToolDefFile(os.path.normpath(os.path.join(ConfDir, gDefaultToolsDefFile)))\r
return ToolDef\r
\r
##\r
## @file\r
# This file is used to define class for data structure used in ECC\r
#\r
-# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
MODEL_FILE_FDF = 1014\r
MODEL_FILE_INC = 1015\r
MODEL_FILE_CIF = 1016\r
+MODEL_FILE_UNI = 1017\r
MODEL_FILE_OTHERS = 1099\r
\r
MODEL_IDENTIFIER_FILE_HEADER = 2001\r
from Ffs import Ffs\r
import Section\r
import subprocess\r
-import os\r
+import Common.LongFilePathOs as os\r
from GenFdsGlobalVariable import GenFdsGlobalVariable\r
from CommonDataClass.FdfClass import CompressSectionClassObject\r
\r
from AutoGen.GenDepex import DependencyExpression\r
from Common import EdkLogger\r
from Common.BuildToolError import *\r
+from Common.Misc import PathClass\r
\r
## generate data section\r
#\r
\r
def __FindGuidValue(self, CName):\r
for Arch in GenFdsGlobalVariable.ArchList:\r
- for PkgDb in GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform, \r
- Arch, \r
- GenFdsGlobalVariable.TargetName, \r
- GenFdsGlobalVariable.ToolChainTag):\r
+ PkgList = GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform,\r
+ Arch,\r
+ GenFdsGlobalVariable.TargetName,\r
+ GenFdsGlobalVariable.ToolChainTag)\r
+ for Inf in GenFdsGlobalVariable.FdfParser.Profile.InfList:\r
+ ModuleFile = PathClass(Inf, GenFdsGlobalVariable.WorkSpaceDir)\r
+ ModuleData = GenFdsGlobalVariable.WorkSpace.BuildObject[\r
+ ModuleFile,\r
+ Arch,\r
+ GenFdsGlobalVariable.TargetName,\r
+ GenFdsGlobalVariable.ToolChainTag\r
+ ]\r
+ for Pkg in ModuleData.Packages:\r
+ if Pkg not in PkgList:\r
+ PkgList.append(Pkg)\r
+ for PkgDb in PkgList:\r
if CName in PkgDb.Ppis:\r
return PkgDb.Ppis[CName]\r
if CName in PkgDb.Protocols:\r
## @file\r
# process rule section generation\r
#\r
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
"""If File List is empty"""\r
if FileList == [] :\r
if self.Optional == True:\r
- GenFdsGlobalVariable.VerboseLogger( "Optional Section don't exist!")\r
- return [], None\r
+ GenFdsGlobalVariable.VerboseLogger("Optional Section don't exist!")\r
+ return [], None\r
else:\r
- EdkLogger.error("GenFds", GENFDS_ERROR, "Output file for %s section could not be found for %s" % (SectionType, InfFileName))\r
+ EdkLogger.error("GenFds", GENFDS_ERROR, "Output file for %s section could not be found for %s" % (SectionType, InfFileName))\r
\r
else:\r
"""Convert the File to Section file one by one """\r
self.CurrentFvName = None\r
self.__Token = ""\r
self.__SkippedChars = ""\r
+ GlobalData.gFdfParser = self\r
\r
# Used to section info\r
self.__CurSection = []\r
ffsInf.CurrentLineNum = self.CurrentLineNumber\r
ffsInf.CurrentLineContent = self.__CurrentLine()\r
\r
+ #Replace $(SAPCE) with real space\r
+ ffsInf.InfFileName = ffsInf.InfFileName.replace('$(SPACE)', ' ')\r
+\r
if ffsInf.InfFileName.replace('$(WORKSPACE)', '').find('$') == -1:\r
#do case sensitive check for file path\r
ErrorCode, ErrorInfo = PathClass(NormPath(ffsInf.InfFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()\r
# @param FfsInfObj for whom option is got\r
#\r
def __GetInfOptions(self, FfsInfObj):\r
+ if self.__IsKeyword("FILE_GUID"):\r
+ if not self.__IsToken("="):\r
+ raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
+ if not self.__GetNextGuid():\r
+ raise Warning("expected GUID value", self.FileName, self.CurrentLineNumber)\r
+ FfsInfObj.OverrideGuid = self.__Token\r
\r
if self.__IsKeyword( "RuleOverride"):\r
if not self.__IsToken( "="):\r
\r
\r
if self.__GetNextToken():\r
- p = re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\)|\*)')\r
- if p.match(self.__Token):\r
+ p = re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\))')\r
+ if p.match(self.__Token) and p.match(self.__Token).span()[1] == len(self.__Token):\r
FfsInfObj.KeyStringList.append(self.__Token)\r
if not self.__IsToken(","):\r
return\r
else:\r
FfsFileObj.CurrentLineNum = self.CurrentLineNumber\r
FfsFileObj.CurrentLineContent = self.__CurrentLine()\r
- FfsFileObj.FileName = self.__Token\r
+ FfsFileObj.FileName = self.__Token.replace('$(SPACE)', ' ')\r
self.__VerifyFile(FfsFileObj.FileName)\r
\r
if not self.__IsToken( "}"):\r
\r
elif self.FileName != None:\r
self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)\r
+ #Replace $(SAPCE) with real space\r
+ self.FileName = self.FileName.replace('$(SPACE)', ' ')\r
SectionFiles = [GenFdsGlobalVariable.MacroExtend(self.FileName, Dict)]\r
\r
else:\r
from Common.String import *\r
from Common.Misc import PathClass\r
from Common.Misc import GuidStructureByteArrayToGuidString\r
+from Common.Misc import ProcessDuplicatedInf\r
from Common import EdkLogger\r
from Common.BuildToolError import *\r
from GuidSection import GuidSection\r
self.CurrentLineContent = None\r
self.FileName = None\r
self.InfFileName = None\r
+ self.OverrideGuid = None\r
+ self.PatchedBinFile = ''\r
\r
## GetFinalTargetSuffixMap() method\r
#\r
GenFdsGlobalVariable.VerboseLogger( " Begine parsing INf file : %s" %self.InfFileName)\r
\r
self.InfFileName = self.InfFileName.replace('$(WORKSPACE)', '')\r
- if self.InfFileName[0] == '\\' or self.InfFileName[0] == '/' :\r
+ if len(self.InfFileName) > 1 and self.InfFileName[0] == '\\' and self.InfFileName[1] == '\\':\r
+ pass\r
+ elif self.InfFileName[0] == '\\' or self.InfFileName[0] == '/' :\r
self.InfFileName = self.InfFileName[1:]\r
\r
if self.InfFileName.find('$') == -1:\r
ErrorCode, ErrorInfo = PathClassObj.Validate(".inf")\r
if ErrorCode != 0:\r
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)\r
- \r
+\r
+ if self.OverrideGuid:\r
+ PathClassObj = ProcessDuplicatedInf(PathClassObj, self.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir)\r
if self.CurrentArch != None:\r
\r
Inf = GenFdsGlobalVariable.WorkSpace.BuildObject[PathClassObj, self.CurrentArch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
"INF %s specified in FDF could not be found in build ARCH %s!" \\r
% (self.InfFileName, GenFdsGlobalVariable.ArchList))\r
\r
+ if self.OverrideGuid:\r
+ self.ModuleGuid = self.OverrideGuid\r
+\r
if len(self.SourceFileList) != 0 and not self.InDsc:\r
EdkLogger.warn("GenFds", GENFDS_ERROR, "Module %s NOT found in DSC file; Is it really a binary module?" % (self.InfFileName))\r
\r
or PcdValueInImg > FfsInfStatement._MAX_SIZE_TYPE[Pcd.DatumType]:\r
EdkLogger.error("GenFds", GENFDS_ERROR, "The size of %s type PCD '%s.%s' doesn't match its data type." \\r
% (Pcd.DatumType, Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
- Pcd.DefaultValue = DefaultValue\r
- self.PatchPcds.append(Pcd)\r
+ self.PatchPcds.append((Pcd, DefaultValue))\r
+\r
self.InfModule = Inf\r
self.PcdIsDriver = Inf.PcdIsDriver\r
self.IsBinaryModule = Inf.IsBinaryModule\r
self.EfiOutputPath = self.__GetEFIOutPutPath__()\r
GenFdsGlobalVariable.VerboseLogger( "ModuelEFIPath: " + self.EfiOutputPath)\r
\r
-## PatchEfiFile\r
+ ## PatchEfiFile\r
#\r
# Patch EFI file with patch PCD\r
#\r
# @retval: Full path of patched EFI file: self.OutputPath + EfiFile base name\r
# If passed in file does not end with efi, return as is\r
#\r
- def PatchEfiFile(self, EfiFile):\r
- if os.path.splitext(EfiFile)[1].lower() != '.efi':\r
- return EfiFile\r
+ def PatchEfiFile(self, EfiFile, FileType):\r
if not self.PatchPcds:\r
return EfiFile\r
+ if FileType != 'PE32' and self.ModuleType != "USER_DEFINED":\r
+ return EfiFile\r
+ if self.PatchedBinFile:\r
+ EdkLogger.error("GenFds", GENFDS_ERROR,\r
+ 'Only one binary file can be patched:\n'\r
+ ' a binary file has been patched: %s\n'\r
+ ' current file: %s' % (self.PatchedBinFile, EfiFile),\r
+ File=self.InfFileName)\r
Basename = os.path.basename(EfiFile)\r
Output = os.path.join(self.OutputPath, Basename)\r
CopyLongFilePath(EfiFile, Output)\r
- for Pcd in self.PatchPcds:\r
- RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Pcd.DefaultValue, Pcd.MaxDatumSize)\r
+ for Pcd, Value in self.PatchPcds:\r
+ RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Value, Pcd.MaxDatumSize)\r
if RetVal:\r
EdkLogger.error("GenFds", GENFDS_ERROR, RetStr, File=self.InfFileName)\r
+ self.PatchedBinFile = os.path.normpath(EfiFile)\r
return Output\r
## GenFfs() method\r
#\r
#\r
# Allow binary type module not specify override rule in FDF file.\r
# \r
- if len(self.BinFileList) >0 and not self.InDsc:\r
+ if len(self.BinFileList) > 0:\r
if self.Rule == None or self.Rule == "":\r
self.Rule = "BINARY"\r
\r
(ModulePath, FileName) = os.path.split(self.InfFileName)\r
Index = FileName.rfind('.')\r
FileName = FileName[0:Index]\r
+ if self.OverrideGuid:\r
+ FileName = self.OverrideGuid\r
Arch = "NoneArch"\r
if self.CurrentArch != None:\r
Arch = self.CurrentArch\r
from Common.String import *\r
from Common.Misc import DirCache,PathClass\r
from Common.Misc import SaveFileOnChange\r
+from Common.Misc import ClearDuplicatedInf\r
from Common.Misc import GuidStructureStringToGuidString\r
from Common.BuildVersion import gBUILD_VERSION\r
\r
\r
GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform), Workspace)\r
\r
- BuildConfigurationFile = os.path.normpath(os.path.join(GenFdsGlobalVariable.WorkSpaceDir, "Conf/target.txt"))\r
+ if (Options.ConfDirectory):\r
+ # Get alternate Conf location, if it is absolute, then just use the absolute directory name\r
+ ConfDirectoryPath = os.path.normpath(Options.ConfDirectory)\r
+ if ConfDirectoryPath.startswith('"'):\r
+ ConfDirectoryPath = ConfDirectoryPath[1:]\r
+ if ConfDirectoryPath.endswith('"'):\r
+ ConfDirectoryPath = ConfDirectoryPath[:-1]\r
+ if not os.path.isabs(ConfDirectoryPath):\r
+ # Since alternate directory name is not absolute, the alternate directory is located within the WORKSPACE\r
+ # This also handles someone specifying the Conf directory in the workspace. Using --conf=Conf\r
+ ConfDirectoryPath = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, ConfDirectoryPath)\r
+ else:\r
+ # Get standard WORKSPACE/Conf, use the absolute path to the WORKSPACE/Conf\r
+ ConfDirectoryPath = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, 'Conf')\r
+ GenFdsGlobalVariable.ConfDir = ConfDirectoryPath\r
+ BuildConfigurationFile = os.path.normpath(os.path.join(ConfDirectoryPath, "target.txt"))\r
if os.path.isfile(BuildConfigurationFile) == True:\r
TargetTxtClassObject.TargetTxtClassObject(BuildConfigurationFile)\r
else:\r
EdkLogger.error("GenFds", FILE_NOT_FOUND, ExtraData=BuildConfigurationFile)\r
\r
+ #Set global flag for build mode\r
+ GlobalData.gIgnoreSource = Options.IgnoreSources\r
+\r
if Options.Macros:\r
for Pair in Options.Macros:\r
- Pair = Pair.strip('"')\r
+ if Pair.startswith('"'):\r
+ Pair = Pair[1:]\r
+ if Pair.endswith('"'):\r
+ Pair = Pair[:-1]\r
List = Pair.split('=')\r
if len(List) == 2:\r
if List[0].strip() == "EFI_SOURCE":\r
os.environ["WORKSPACE"] = Workspace\r
\r
"""call Workspace build create database"""\r
- BuildWorkSpace = WorkspaceDatabase(None)\r
+ GlobalData.gDatabasePath = os.path.normpath(os.path.join(ConfDirectoryPath, GlobalData.gDatabasePath))\r
+ BuildWorkSpace = WorkspaceDatabase(GlobalData.gDatabasePath)\r
BuildWorkSpace.InitDatabase()\r
\r
#\r
"\nPython",\r
CODE_ERROR,\r
"Tools code failure",\r
- ExtraData="Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!\n",\r
+ ExtraData="Please send email to edk2-devel@lists.sourceforge.net for help, attaching following call stack trace!\n",\r
RaiseError=False\r
)\r
EdkLogger.quiet(traceback.format_exc())\r
ReturnCode = CODE_ERROR\r
+ finally:\r
+ ClearDuplicatedInf()\r
return ReturnCode\r
\r
gParamCheck = []\r
action="callback", callback=SingleCheckCallback)\r
Parser.add_option("-D", "--define", action="append", type="string", dest="Macros", help="Macro: \"Name [= Value]\".")\r
Parser.add_option("-s", "--specifyaddress", dest="FixedAddress", action="store_true", type=None, help="Specify driver load address.")\r
+ Parser.add_option("--conf", action="store", type="string", dest="ConfDirectory", help="Specify the customized Conf directory.")\r
+ Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")\r
+\r
(Options, args) = Parser.parse_args()\r
return Options\r
\r
LibDir = ''\r
WorkSpace = None\r
WorkSpaceDir = ''\r
+ ConfDir = ''\r
EdkSourceDir = ''\r
OutputDirFromDscDict = {}\r
TargetName = ''\r
def __LoadBuildRule():\r
if GenFdsGlobalVariable.__BuildRuleDatabase:\r
return GenFdsGlobalVariable.__BuildRuleDatabase\r
- BuildConfigurationFile = os.path.normpath(os.path.join(GenFdsGlobalVariable.WorkSpaceDir, "Conf/target.txt"))\r
+ BuildConfigurationFile = os.path.normpath(os.path.join(GenFdsGlobalVariable.ConfDir, "target.txt"))\r
TargetTxt = TargetTxtClassObject()\r
if os.path.isfile(BuildConfigurationFile) == True:\r
TargetTxt.LoadTargetTxtFile(BuildConfigurationFile)\r
\r
TargetList = set()\r
FileList = []\r
- for File in Inf.Sources:\r
- if File.TagName in ("", "*", GenFdsGlobalVariable.ToolChainTag) and \\r
- File.ToolChainFamily in ("", "*", GenFdsGlobalVariable.ToolChainFamily):\r
- FileList.append((File, DataType.TAB_UNKNOWN_FILE))\r
- \r
+\r
+ if not Inf.IsBinaryModule:\r
+ for File in Inf.Sources:\r
+ if File.TagName in ("", "*", GenFdsGlobalVariable.ToolChainTag) and \\r
+ File.ToolChainFamily in ("", "*", GenFdsGlobalVariable.ToolChainFamily):\r
+ FileList.append((File, DataType.TAB_UNKNOWN_FILE))\r
+\r
for File in Inf.Binaries:\r
if File.Target in ['COMMON', '*', GenFdsGlobalVariable.TargetName]:\r
FileList.append((File, File.Type))\r
'$(EDK_SOURCE)' : GenFdsGlobalVariable.EdkSourceDir,\r
# '$(OUTPUT_DIRECTORY)': GenFdsGlobalVariable.OutputDirFromDsc,\r
'$(TARGET)' : GenFdsGlobalVariable.TargetName,\r
- '$(TOOL_CHAIN_TAG)' : GenFdsGlobalVariable.ToolChainTag\r
+ '$(TOOL_CHAIN_TAG)' : GenFdsGlobalVariable.ToolChainTag,\r
+ '$(SPACE)' : ' '\r
}\r
OutputDir = GenFdsGlobalVariable.OutputDirFromDscDict[GenFdsGlobalVariable.ArchList[0]]\r
if Arch != 'COMMON' and Arch in GenFdsGlobalVariable.ArchList:\r
HeaderLength = str(self.ExtraHeaderSize)\r
\r
if self.ProcessRequired == "NONE" and HeaderLength == None:\r
- if TempFileSize > InputFileSize and TempFileSize % 4 == 0:\r
+ if TempFileSize > InputFileSize:\r
FileHandleIn.seek(0)\r
BufferIn = FileHandleIn.read()\r
FileHandleOut.seek(0)\r
if self.KeyStringList == None or self.KeyStringList == []:\r
Target = GenFdsGlobalVariable.TargetName\r
ToolChain = GenFdsGlobalVariable.ToolChainTag\r
- ToolDb = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.WorkSpaceDir).ToolsDefTxtDatabase\r
+ ToolDb = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.ConfDir).ToolsDefTxtDatabase\r
if ToolChain not in ToolDb['TOOL_CHAIN_TAG']:\r
EdkLogger.error("GenFds", GENFDS_ERROR, "Can not find external tool because tool tag %s is not defined in tools_def.txt!" % ToolChain)\r
self.KeyStringList = [Target+'_'+ToolChain+'_'+self.CurrentArchList[0]]\r
for Arch in self.CurrentArchList:\r
- if Target+'_'+ToolChain+'_'+Arch not in self.KeyStringList:\r
- self.KeyStringList.append(Target+'_'+ToolChain+'_'+Arch)\r
- \r
- ToolDefinition = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.WorkSpaceDir).ToolsDefTxtDictionary\r
+ if Target + '_' + ToolChain + '_' + Arch not in self.KeyStringList:\r
+ self.KeyStringList.append(Target + '_' + ToolChain + '_' + Arch)\r
+\r
+ ToolDefinition = ToolDefClassObject.ToolDefDict(GenFdsGlobalVariable.ConfDir).ToolsDefTxtDictionary\r
ToolPathTmp = None\r
for ToolDef in ToolDefinition.items():\r
if self.NameGuid == ToolDef[1]:\r
if FileType != None:\r
for File in FfsInf.BinFileList:\r
if File.Arch == "COMMON" or FfsInf.CurrentArch == File.Arch:\r
- if File.Type == FileType or (int(FfsInf.PiSpecVersion, 16) >= 0x0001000A and FileType == 'DXE_DPEX'and File.Type == 'SMM_DEPEX'):\r
+ if File.Type == FileType or (int(FfsInf.PiSpecVersion, 16) >= 0x0001000A \\r
+ and FileType == 'DXE_DPEX'and File.Type == 'SMM_DEPEX') \\r
+ or (FileType == 'TE'and File.Type == 'PE32'):\r
if '*' in FfsInf.TargetOverrideList or File.Target == '*' or File.Target in FfsInf.TargetOverrideList or FfsInf.TargetOverrideList == []:\r
- FileList.append(FfsInf.PatchEfiFile(File.Path))\r
+ FileList.append(FfsInf.PatchEfiFile(File.Path, File.Type))\r
else:\r
GenFdsGlobalVariable.InfLogger ("\nBuild Target \'%s\' of File %s is not in the Scope of %s specified by INF %s in FDF" %(File.Target, File.File, FfsInf.TargetOverrideList, FfsInf.InfFileName))\r
else:\r
+## @file\r
+# Target Tool Parser\r
#\r
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
#\r
"\nTrim",\r
CODE_ERROR,\r
"Unknown fatal error when trimming [%s]" % InputFile,\r
- ExtraData="\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",\r
+ ExtraData="\n(Please send email to edk2-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",\r
RaiseError=False\r
)\r
EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())\r
MSG_UPDATE_PACKAGE_DATABASE = _("Update Distribution Package Database ...")\r
MSG_PYTHON_ON = _("(Python %s on %s) ")\r
MSG_SEARCH_FOR_HELP = _(\r
- "\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for\n"\r
+ "\n(Please send email to edk2-devel@lists.sourceforge.net for\n"\r
" help, attach the following call stack trace.)\n")\r
MSG_REMOVE_TEMP_FILE_STARTED = _("Removing temp files started ... ")\r
MSG_REMOVE_TEMP_FILE_DONE = _("Removing temp files ... Done.")\r
UsageList = ("PRODUCES", "PRODUCED", "ALWAYS_PRODUCES", "ALWAYS_PRODUCED", "SOMETIMES_PRODUCES",\r
"SOMETIMES_PRODUCED", "CONSUMES", "CONSUMED", "ALWAYS_CONSUMES", "ALWAYS_CONSUMED",\r
"SOMETIMES_CONSUMES", "SOMETIMES_CONSUMED", "SOMETIME_CONSUMES")\r
+ErrorMsgMap = {\r
+ MODEL_EFI_GUID : "The usage for this GUID is not listed in this INF: %s[%d]:%s",\r
+ MODEL_EFI_PPI : "The usage for this PPI is not listed in this INF: %s[%d]:%s.",\r
+ MODEL_EFI_PROTOCOL : "The usage for this Protocol is not listed in this INF: %s[%d]:%s.",\r
+ MODEL_PCD_DYNAMIC : "The usage for this PCD is not listed in this INF: %s[%d]:%s."\r
+}\r
\r
+def CheckInfComment(SectionType, Comments, InfFile, LineNo, ValueList):\r
+ if SectionType in [MODEL_PCD_PATCHABLE_IN_MODULE, MODEL_PCD_DYNAMIC_EX, MODEL_PCD_DYNAMIC]:\r
+ CheckUsage(Comments, UsageList, InfFile, LineNo, ValueList[0]+'.'+ValueList[1], ErrorMsgMap[MODEL_PCD_DYNAMIC])\r
+ elif SectionType in [MODEL_EFI_GUID, MODEL_EFI_PPI]:\r
+ CheckUsage(Comments, UsageList, InfFile, LineNo, ValueList[0], ErrorMsgMap[SectionType])\r
+ elif SectionType == MODEL_EFI_PROTOCOL:\r
+ CheckUsage(Comments, UsageList + ("TO_START", "BY_START"), InfFile, LineNo, ValueList[0], ErrorMsgMap[SectionType])\r
+\r
+def CheckUsage(Comments, Usages, InfFile, LineNo, Value, ErrorMsg):\r
+ for Comment in Comments:\r
+ for Word in Comment[0].replace('#', ' ').split():\r
+ if Word in Usages:\r
+ return\r
+ EdkLogger.error(\r
+ "Parser", FORMAT_INVALID,\r
+ ErrorMsg % (InfFile, LineNo, Value)\r
+ )\r
from Common.LongFilePathSupport import OpenLongFilePath as open\r
\r
from MetaFileTable import MetaFileStorage\r
+from MetaFileCommentParser import CheckInfComment\r
\r
## A decorator used to parse macro definition\r
def ParseMacro(Parser):\r
continue\r
if Comment:\r
Comments.append((Comment, Index + 1))\r
+ if GlobalData.gOptions and GlobalData.gOptions.CheckUsage:\r
+ CheckInfComment(self._SectionType, Comments, str(self.MetaFile), Index + 1, self._ValueList)\r
#\r
# Model, Value1, Value2, Value3, Arch, Platform, BelongsToItem=-1,\r
# LineBegin=-1, ColumnBegin=-1, LineEnd=-1, ColumnEnd=-1, Enabled=-1\r
"FIX_LOAD_TOP_MEMORY_ADDRESS"\r
]\r
\r
+ SubSectionDefineKeywords = [\r
+ "FILE_GUID"\r
+ ]\r
+\r
SymbolPattern = ValueExpression.SymbolPattern\r
\r
## Constructor of DscParser\r
if not self._ValueList[2]:\r
EdkLogger.error('Parser', FORMAT_INVALID, "No value specified",\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
- if not self._ValueList[1] in self.DefineKeywords:\r
+ if (not self._ValueList[1] in self.DefineKeywords and\r
+ (self._InSubsection and self._ValueList[1] not in self.SubSectionDefineKeywords)):\r
EdkLogger.error('Parser', FORMAT_INVALID,\r
"Unknown keyword found: %s. "\r
"If this is a macro you must "\r
"add it as a DEFINE in the DSC" % self._ValueList[1],\r
ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
- self._Defines[self._ValueList[1]] = self._ValueList[2]\r
+ if not self._InSubsection:\r
+ self._Defines[self._ValueList[1]] = self._ValueList[2]\r
self._ItemType = self.DataType[TAB_DSC_DEFINES.upper()]\r
\r
@ParseMacro\r
self.__RetrievePcdValue()\r
self._Content = self._RawTable.GetAll()\r
self._ContentIndex = 0\r
+ self._InSubsection = False\r
while self._ContentIndex < len(self._Content) :\r
Id, self._ItemType, V1, V2, V3, S1, S2, Owner, self._From, \\r
LineStart, ColStart, LineEnd, ColEnd, Enabled = self._Content[self._ContentIndex]\r
self._LineIndex = LineStart - 1\r
self._ValueList = [V1, V2, V3]\r
\r
+ if Owner > 0 and Owner in self._IdMapping:\r
+ self._InSubsection = True\r
+ else:\r
+ self._InSubsection = False\r
try:\r
Processer[self._ItemType]()\r
except EvaluationException, Excpt:\r
\r
Type, Name, Value = self._ValueList\r
Value = ReplaceMacro(Value, self._Macros, False)\r
+ #\r
+ # If it is <Defines>, return\r
+ #\r
+ if self._InSubsection:\r
+ self._ValueList = [Type, Name, Value]\r
+ return\r
+\r
if self._ItemType == MODEL_META_DATA_DEFINE:\r
if self._SectionType == MODEL_META_DATA_HEADER:\r
self._FileLocalMacros[Name] = Value\r
from BuildClassObject import *\r
from WorkspaceCommon import GetDeclaredPcd\r
from Common.Misc import AnalyzeDscPcd\r
+from Common.Misc import ProcessDuplicatedInf\r
import re\r
from Common.Parsing import IsValidWord\r
\r
+import Common.GlobalData as GlobalData\r
+\r
## Platform build information from DSC file\r
#\r
# This class is used to retrieve information stored in database and convert them\r
self._Target = Target\r
self._Toolchain = Toolchain\r
self._Clear()\r
+ self._HandleOverridePath()\r
\r
## XXX[key] = value\r
def __setitem__(self, key, value):\r
self._VpdToolGuid = None\r
self.__Macros = None\r
\r
+\r
+ ## handle Override Path of Module\r
+ def _HandleOverridePath(self):\r
+ RecordList = self._RawData[MODEL_META_DATA_COMPONENT, self._Arch]\r
+ Macros = self._Macros\r
+ Macros["EDK_SOURCE"] = GlobalData.gEcpSource\r
+ for Record in RecordList:\r
+ ModuleId = Record[5]\r
+ LineNo = Record[6]\r
+ ModuleFile = PathClass(NormPath(Record[0]), GlobalData.gWorkspace, Arch=self._Arch)\r
+ RecordList = self._RawData[MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH, self._Arch, None, ModuleId]\r
+ if RecordList != []:\r
+ SourceOverridePath = os.path.join(GlobalData.gWorkspace, NormPath(RecordList[0][0]))\r
+\r
+ # Check if the source override path exists\r
+ if not os.path.isdir(SourceOverridePath):\r
+ EdkLogger.error('build', FILE_NOT_FOUND, Message='Source override path does not exist:', File=self.MetaFile, ExtraData=SourceOverridePath, Line=LineNo)\r
+\r
+ #Add to GlobalData Variables\r
+ GlobalData.gOverrideDir[ModuleFile.Key] = SourceOverridePath\r
+\r
## Get current effective macros\r
def _GetMacros(self):\r
if self.__Macros == None:\r
Macros = self._Macros\r
Macros["EDK_SOURCE"] = GlobalData.gEcpSource\r
for Record in RecordList:\r
+ DuplicatedFile = False\r
ModuleFile = PathClass(NormPath(Record[0], Macros), GlobalData.gWorkspace, Arch=self._Arch)\r
ModuleId = Record[5]\r
LineNo = Record[6]\r
# Check duplication\r
# If arch is COMMON, no duplicate module is checked since all modules in all component sections are selected\r
if self._Arch != 'COMMON' and ModuleFile in self._Modules:\r
- EdkLogger.error('build', FILE_DUPLICATED, File=self.MetaFile, ExtraData=str(ModuleFile), Line=LineNo)\r
+ DuplicatedFile = True\r
\r
Module = ModuleBuildClassObject()\r
Module.MetaFile = ModuleFile\r
\r
- # get module override path\r
- RecordList = self._RawData[MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH, self._Arch, None, ModuleId]\r
- if RecordList != []:\r
- Module.SourceOverridePath = os.path.join(GlobalData.gWorkspace, NormPath(RecordList[0][0], Macros))\r
-\r
- # Check if the source override path exists\r
- if not os.path.isdir(Module.SourceOverridePath):\r
- EdkLogger.error('build', FILE_NOT_FOUND, Message = 'Source override path does not exist:', File=self.MetaFile, ExtraData=Module.SourceOverridePath, Line=LineNo)\r
- \r
- #Add to GlobalData Variables\r
- GlobalData.gOverrideDir[ModuleFile.Key] = Module.SourceOverridePath\r
-\r
# get module private library instance\r
RecordList = self._RawData[MODEL_EFI_LIBRARY_CLASS, self._Arch, None, ModuleId]\r
for Record in RecordList:\r
OptionString = Module.BuildOptions[ToolChainFamily, ToolChain]\r
Module.BuildOptions[ToolChainFamily, ToolChain] = OptionString + " " + Option\r
\r
+ RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch, None, ModuleId]\r
+ if DuplicatedFile and not RecordList:\r
+ EdkLogger.error('build', FILE_DUPLICATED, File=self.MetaFile, ExtraData=str(ModuleFile), Line=LineNo)\r
+ if RecordList:\r
+ if len(RecordList) != 1:\r
+ EdkLogger.error('build', OPTION_UNKNOWN, 'Only FILE_GUID can be listed in <Defines> section.',\r
+ File=self.MetaFile, ExtraData=str(ModuleFile), Line=LineNo)\r
+ ModuleFile = ProcessDuplicatedInf(ModuleFile, RecordList[0][2], GlobalData.gWorkspace)\r
+ ModuleFile.Arch = self._Arch\r
+\r
self._Modules[ModuleFile] = Module\r
return self._Modules\r
\r
def _ValidatePcd(self, PcdCName, TokenSpaceGuid, Setting, PcdType, LineNo):\r
if self._DecPcds == None:\r
self._DecPcds = GetDeclaredPcd(self, self._Bdb, self._Arch, self._Target, self._Toolchain)\r
+ FdfInfList = []\r
+ if GlobalData.gFdfParser:\r
+ FdfInfList = GlobalData.gFdfParser.Profile.InfList\r
+\r
+ PkgSet = set()\r
+ for Inf in FdfInfList:\r
+ ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace, Arch=self._Arch)\r
+ if ModuleFile in self._Modules:\r
+ continue\r
+ ModuleData = self._Bdb[ModuleFile, self._Arch, self._Target, self._Toolchain]\r
+ PkgSet.update(ModuleData.Packages)\r
+ DecPcds = {}\r
+ for Pkg in PkgSet:\r
+ for Pcd in Pkg.Pcds:\r
+ DecPcds[Pcd[0], Pcd[1]] = Pkg.Pcds[Pcd]\r
+ self._DecPcds.update(DecPcds)\r
+\r
if (PcdCName, TokenSpaceGuid) not in self._DecPcds:\r
EdkLogger.error('build', PARSER_ERROR,\r
- "Pcd (%s.%s) defined in DSC is not declared in DEC files." % (TokenSpaceGuid, PcdCName),\r
+ "Pcd (%s.%s) defined in DSC is not declared in DEC files. Arch: ['%s']" % (TokenSpaceGuid, PcdCName, self._Arch),\r
File=self.MetaFile, Line=LineNo)\r
ValueList, IsValid, Index = AnalyzeDscPcd(Setting, PcdType, self._DecPcds[PcdCName, TokenSpaceGuid].DatumType)\r
if not IsValid and PcdType not in [MODEL_PCD_FEATURE_FLAG, MODEL_PCD_FIXED_AT_BUILD]:\r
# items defined _PROPERTY_ don't need additional processing\r
if Name in self:\r
self[Name] = Value\r
+ if self._Defs == None:\r
+ self._Defs = sdict()\r
+ self._Defs[Name] = Value\r
# some special items in [Defines] section need special treatment\r
elif Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION', 'EDK_RELEASE_VERSION', 'PI_SPECIFICATION_VERSION'):\r
if Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION'):\r
EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No [Depex] section or no valid expression in [Depex] section for [%s] module" \\r
% self.ModuleType, File=self.MetaFile)\r
\r
+ if len(RecordList) != 0 and self.ModuleType == 'USER_DEFINED':\r
+ for Record in RecordList:\r
+ if Record[4] not in ['PEIM', 'DXE_DRIVER', 'DXE_SMM_DRIVER']:\r
+ EdkLogger.error('build', FORMAT_INVALID,\r
+ "'%s' module must specify the type of [Depex] section" % self.ModuleType,\r
+ File=self.MetaFile)\r
+\r
Depex = sdict()\r
for Record in RecordList:\r
DepexStr = ReplaceMacro(Record[0], self._Macros, False)\r
#\r
class WorkspaceDatabase(object):\r
\r
- # default database file path\r
- _DB_PATH_ = "Conf/.cache/build.db"\r
\r
#\r
# internal class used for call corresponding file parser and caching the result\r
def __init__(self, DbPath, RenewDb=False):\r
self._DbClosedFlag = False\r
if not DbPath:\r
- DbPath = os.path.normpath(os.path.join(GlobalData.gWorkspace, self._DB_PATH_))\r
+ DbPath = os.path.normpath(os.path.join(GlobalData.gWorkspace, 'Conf', GlobalData.gDatabasePath))\r
\r
# don't create necessary path for db in memory\r
if DbPath != ':memory:':\r
gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']\r
\r
## build configuration file\r
-gBuildConfiguration = "Conf/target.txt"\r
-gBuildCacheDir = "Conf/.cache"\r
-gToolsDefinition = "Conf/tools_def.txt"\r
+gBuildConfiguration = "target.txt"\r
+gToolsDefinition = "tools_def.txt"\r
\r
TemporaryTablePattern = re.compile(r'^_\d+_\d+_[a-fA-F0-9]+$')\r
TmpTableDict = {}\r
#\r
def AddDependency(self, Dependency):\r
for Dep in Dependency:\r
- self.DependencyList.append(BuildTask.New(Dep)) # BuildTask list\r
+ if not Dep.BuildObject.IsBinaryModule:\r
+ self.DependencyList.append(BuildTask.New(Dep)) # BuildTask list\r
\r
## The thread wrapper of LaunchCommand function\r
#\r
self.SkipAutoGen = BuildOptions.SkipAutoGen\r
self.Reparse = BuildOptions.Reparse\r
self.SkuId = BuildOptions.SkuId\r
+ self.ConfDirectory = BuildOptions.ConfDirectory\r
self.SpawnMode = True\r
self.BuildReport = BuildReport(BuildOptions.ReportFile, BuildOptions.ReportType)\r
self.TargetTxt = TargetTxtClassObject()\r
self.ToolDef = ToolDefClassObject()\r
#Set global flag for build mode\r
GlobalData.gIgnoreSource = BuildOptions.IgnoreSources\r
+\r
+ if self.ConfDirectory:\r
+ # Get alternate Conf location, if it is absolute, then just use the absolute directory name\r
+ ConfDirectoryPath = os.path.normpath(self.ConfDirectory)\r
+\r
+ if not os.path.isabs(ConfDirectoryPath):\r
+ # Since alternate directory name is not absolute, the alternate directory is located within the WORKSPACE\r
+ # This also handles someone specifying the Conf directory in the workspace. Using --conf=Conf\r
+ ConfDirectoryPath = os.path.join(self.WorkspaceDir, ConfDirectoryPath)\r
+ else:\r
+ # Get standard WORKSPACE/Conf use the absolute path to the WORKSPACE/Conf\r
+ ConfDirectoryPath = os.path.join(self.WorkspaceDir, 'Conf')\r
+ GlobalData.gConfDirectory = ConfDirectoryPath\r
+ GlobalData.gDatabasePath = os.path.normpath(os.path.join(ConfDirectoryPath, GlobalData.gDatabasePath))\r
+\r
if BuildOptions.DisableCache:\r
self.Db = WorkspaceDatabase(":memory:")\r
else:\r
- self.Db = WorkspaceDatabase(None, self.Reparse)\r
- self.BuildDatabase = self.Db.BuildObject\r
- self.Platform = None\r
+ self.Db = WorkspaceDatabase(GlobalData.gDatabasePath, self.Reparse)\r
+ self.BuildDatabase = self.Db.BuildObject\r
+ self.Platform = None\r
self.LoadFixAddress = 0\r
self.UniFlag = BuildOptions.Flag\r
self.BuildModules = []\r
#\r
# Check target.txt and tools_def.txt and Init them\r
#\r
- BuildConfigurationFile = os.path.normpath(os.path.join(self.WorkspaceDir, gBuildConfiguration))\r
+ BuildConfigurationFile = os.path.normpath(os.path.join(GlobalData.gConfDirectory, gBuildConfiguration))\r
if os.path.isfile(BuildConfigurationFile) == True:\r
StatusCode = self.TargetTxt.LoadTargetTxtFile(BuildConfigurationFile)\r
\r
ToolDefinitionFile = self.TargetTxt.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF]\r
if ToolDefinitionFile == '':\r
ToolDefinitionFile = gToolsDefinition\r
- ToolDefinitionFile = os.path.normpath(os.path.join(self.WorkspaceDir, ToolDefinitionFile))\r
+ ToolDefinitionFile = os.path.normpath(os.path.join(self.WorkspaceDir, 'Conf', ToolDefinitionFile))\r
if os.path.isfile(ToolDefinitionFile) == True:\r
StatusCode = self.ToolDef.LoadToolDefFile(ToolDefinitionFile)\r
else:\r
# First should close DB.\r
#\r
self.Db.Close()\r
- RemoveDirectory(gBuildCacheDir, True)\r
+ RemoveDirectory(os.path.dirname(GlobalData.gDatabasePath), True)\r
except WindowsError, X:\r
EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))\r
return True\r
EdkLogger.SetLevel(OldLogLevel)\r
\r
def DumpBuildData(self):\r
- CacheDirectory = os.path.join(self.WorkspaceDir, gBuildCacheDir)\r
+ CacheDirectory = os.path.dirname(GlobalData.gDatabasePath)\r
Utils.CreateDirectory(CacheDirectory)\r
Utils.DataDump(Utils.gFileTimeStampCache, os.path.join(CacheDirectory, "gFileTimeStampCache"))\r
Utils.DataDump(Utils.gDependencyDatabase, os.path.join(CacheDirectory, "gDependencyDatabase"))\r
\r
def RestoreBuildData(self):\r
- FilePath = os.path.join(self.WorkspaceDir, gBuildCacheDir, "gFileTimeStampCache")\r
+ FilePath = os.path.join(os.path.dirname(GlobalData.gDatabasePath), "gFileTimeStampCache")\r
if Utils.gFileTimeStampCache == {} and os.path.isfile(FilePath):\r
Utils.gFileTimeStampCache = Utils.DataRestore(FilePath)\r
if Utils.gFileTimeStampCache == None:\r
Utils.gFileTimeStampCache = {}\r
\r
- FilePath = os.path.join(self.WorkspaceDir, gBuildCacheDir, "gDependencyDatabase")\r
+ FilePath = os.path.join(os.path.dirname(GlobalData.gDatabasePath), "gDependencyDatabase")\r
if Utils.gDependencyDatabase == {} and os.path.isfile(FilePath):\r
Utils.gDependencyDatabase = Utils.DataRestore(FilePath)\r
if Utils.gDependencyDatabase == None:\r
"This option can also be specified by setting *_*_*_BUILD_FLAGS in [BuildOptions] section of platform DSC. If they are both specified, this value "\\r
"will override the setting in [BuildOptions] section of platform DSC.")\r
Parser.add_option("-N", "--no-cache", action="store_true", dest="DisableCache", default=False, help="Disable build cache mechanism")\r
+ Parser.add_option("--conf", action="store", type="string", dest="ConfDirectory", help="Specify the customized Conf directory.")\r
+ Parser.add_option("--check-usage", action="store_true", dest="CheckUsage", default=False, help="Check usage content of entries listed in INF file.")\r
Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")\r
\r
(Opt, Args)=Parser.parse_args()\r
"\nbuild",\r
CODE_ERROR,\r
"Unknown fatal error when processing [%s]" % MetaFile,\r
- ExtraData="\n(Please send email to edk2-buildtools-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",\r
+ ExtraData="\n(Please send email to edk2-devel@lists.sourceforge.net for help, attaching following call stack trace!)\n",\r
RaiseError=False\r
)\r
EdkLogger.quiet("(Python %s on %s) " % (platform.python_version(), sys.platform) + traceback.format_exc())\r
ReturnCode = CODE_ERROR\r
finally:\r
Utils.Progressor.Abort()\r
+ Utils.ClearDuplicatedInf()\r
\r
if ReturnCode == 0:\r
Conclusion = "Done"\r
+## @file\r
#\r
-# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>\r
+#\r
+# Copyright (c) 2009 - 2014, Apple Inc. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r