There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -4,7 +4,7 @@ Abstract:
|
|||||||
Patch the BPB information in boot sector image file.
|
Patch the BPB information in boot sector image file.
|
||||||
Patch the MBR code in MBR image file.
|
Patch the MBR code in MBR image file.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -116,7 +116,7 @@ Return:
|
|||||||
FILE *FileHandle;
|
FILE *FileHandle;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
FileHandle = fopen (FileName, "r+b");
|
FileHandle = fopen (LongFilePath (FileName), "r+b");
|
||||||
if (FileHandle == NULL) {
|
if (FileHandle == NULL) {
|
||||||
DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "Open file: %s", FileName);
|
DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "Open file: %s", FileName);
|
||||||
return 0;
|
return 0;
|
||||||
@ -154,7 +154,7 @@ Return:
|
|||||||
FILE *FileHandle;
|
FILE *FileHandle;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
FileHandle = fopen (FileName, "rb");
|
FileHandle = fopen (LongFilePath (FileName), "rb");
|
||||||
if (FileHandle == NULL) {
|
if (FileHandle == NULL) {
|
||||||
DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E0001: Error opening file: %s", FileName);
|
DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E0001: Error opening file: %s", FileName);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -23,6 +23,11 @@ Abstract:
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <unistd.h>
|
||||||
|
#else
|
||||||
|
#include <direct.h>
|
||||||
|
#endif
|
||||||
#include "CommonLib.h"
|
#include "CommonLib.h"
|
||||||
#include "EfiUtilityMsgs.h"
|
#include "EfiUtilityMsgs.h"
|
||||||
|
|
||||||
@ -196,7 +201,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the file
|
// Open the file
|
||||||
//
|
//
|
||||||
InputFile = fopen (InputFileName, "rb");
|
InputFile = fopen (LongFilePath (InputFileName), "rb");
|
||||||
if (InputFile == NULL) {
|
if (InputFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening the input file", InputFileName);
|
Error (NULL, 0, 0001, "Error opening the input file", InputFileName);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -297,7 +302,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the file
|
// Open the file
|
||||||
//
|
//
|
||||||
OutputFile = fopen (OutputFileName, "wb");
|
OutputFile = fopen (LongFilePath (OutputFileName), "wb");
|
||||||
if (OutputFile == NULL) {
|
if (OutputFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening the output file", OutputFileName);
|
Error (NULL, 0, 0001, "Error opening the output file", OutputFileName);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -582,3 +587,124 @@ char *strlwr(char *s)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define WINDOWS_EXTENSION_PATH "\\\\?\\"
|
||||||
|
#define WINDOWS_UNC_EXTENSION_PATH "\\\\?\\UNC"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Global data to store full file path. It is not required to be free.
|
||||||
|
//
|
||||||
|
CHAR8 mCommonLibFullPath[MAX_LONG_FILE_PATH];
|
||||||
|
|
||||||
|
CHAR8 *
|
||||||
|
LongFilePath (
|
||||||
|
IN CHAR8 *FileName
|
||||||
|
)
|
||||||
|
/*++
|
||||||
|
|
||||||
|
Routine Description:
|
||||||
|
Convert FileName to the long file path, which can support larger than 260 length.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
FileName - FileName.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
LongFilePath A pointer to the converted long file path.
|
||||||
|
|
||||||
|
--*/
|
||||||
|
{
|
||||||
|
#ifdef __GNUC__
|
||||||
|
//
|
||||||
|
// __GNUC__ may not be good way to differentiate unix and windows. Need more investigation here.
|
||||||
|
// unix has no limitation on file path. Just return FileName.
|
||||||
|
//
|
||||||
|
return FileName;
|
||||||
|
#else
|
||||||
|
CHAR8 *RootPath;
|
||||||
|
CHAR8 *PathPointer;
|
||||||
|
CHAR8 *NextPointer;
|
||||||
|
|
||||||
|
PathPointer = (CHAR8 *) FileName;
|
||||||
|
|
||||||
|
if (FileName != NULL) {
|
||||||
|
//
|
||||||
|
// Add the extension string first to support long file path.
|
||||||
|
//
|
||||||
|
mCommonLibFullPath[0] = 0;
|
||||||
|
strcpy (mCommonLibFullPath, WINDOWS_EXTENSION_PATH);
|
||||||
|
|
||||||
|
if (strlen (FileName) > 1 && FileName[0] == '\\' && FileName[1] == '\\') {
|
||||||
|
//
|
||||||
|
// network path like \\server\share to \\?\UNC\server\share
|
||||||
|
//
|
||||||
|
strcpy (mCommonLibFullPath, WINDOWS_UNC_EXTENSION_PATH);
|
||||||
|
FileName ++;
|
||||||
|
} else if (strlen (FileName) < 3 || FileName[1] != ':' || (FileName[2] != '\\' && FileName[2] != '/')) {
|
||||||
|
//
|
||||||
|
// Relative file path. Convert it to absolute path.
|
||||||
|
//
|
||||||
|
RootPath = getcwd (NULL, 0);
|
||||||
|
if (RootPath != NULL) {
|
||||||
|
strcat (mCommonLibFullPath, RootPath);
|
||||||
|
if (FileName[0] != '\\' && FileName[0] != '/') {
|
||||||
|
//
|
||||||
|
// Attach directory separator
|
||||||
|
//
|
||||||
|
strcat (mCommonLibFullPath, "\\");
|
||||||
|
}
|
||||||
|
free (RootPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Construct the full file path
|
||||||
|
//
|
||||||
|
strcat (mCommonLibFullPath, FileName);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Convert directory separator '/' to '\\'
|
||||||
|
//
|
||||||
|
PathPointer = (CHAR8 *) mCommonLibFullPath;
|
||||||
|
do {
|
||||||
|
if (*PathPointer == '/') {
|
||||||
|
*PathPointer = '\\';
|
||||||
|
}
|
||||||
|
} while (*PathPointer ++ != '\0');
|
||||||
|
|
||||||
|
//
|
||||||
|
// Convert "\\.\\" to "\\", because it doesn't work with WINDOWS_EXTENSION_PATH.
|
||||||
|
//
|
||||||
|
while ((PathPointer = strstr (mCommonLibFullPath, "\\.\\")) != NULL) {
|
||||||
|
*PathPointer = '\0';
|
||||||
|
strcat (mCommonLibFullPath, PathPointer + 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Convert "\\..\\" to last directory, because it doesn't work with WINDOWS_EXTENSION_PATH.
|
||||||
|
//
|
||||||
|
while ((PathPointer = strstr (mCommonLibFullPath, "\\..\\")) != NULL) {
|
||||||
|
NextPointer = PathPointer + 3;
|
||||||
|
do {
|
||||||
|
PathPointer --;
|
||||||
|
} while (PathPointer > mCommonLibFullPath && *PathPointer != ':' && *PathPointer != '\\');
|
||||||
|
|
||||||
|
if (*PathPointer == '\\') {
|
||||||
|
//
|
||||||
|
// Skip one directory
|
||||||
|
//
|
||||||
|
*PathPointer = '\0';
|
||||||
|
strcat (mCommonLibFullPath, NextPointer);
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
// No directory is found. Just break.
|
||||||
|
//
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PathPointer = mCommonLibFullPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PathPointer;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -25,6 +25,12 @@ Abstract:
|
|||||||
#include <Common/UefiBaseTypes.h>
|
#include <Common/UefiBaseTypes.h>
|
||||||
#include <Common/BuildVersion.h>
|
#include <Common/BuildVersion.h>
|
||||||
#define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
|
#define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
|
||||||
|
|
||||||
|
#define MAX_LONG_FILE_PATH 500
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// Function declarations
|
// Function declarations
|
||||||
//
|
//
|
||||||
@ -145,6 +151,27 @@ PrintGuidToBuffer (
|
|||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
CHAR8 *
|
||||||
|
LongFilePath (
|
||||||
|
IN CHAR8 *FileName
|
||||||
|
);
|
||||||
|
/*++
|
||||||
|
|
||||||
|
Routine Description:
|
||||||
|
Convert FileName to the long file path, which can support larger than 260 length.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
FileName - FileName.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
LongFilePath A pointer to the converted long file path.
|
||||||
|
|
||||||
|
--*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ASSERT(x) assert(x)
|
#define ASSERT(x) assert(x)
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -26,10 +26,6 @@ Abstract:
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <Common/UefiBaseTypes.h>
|
#include <Common/UefiBaseTypes.h>
|
||||||
|
|
||||||
#ifndef _MAX_PATH
|
|
||||||
#define _MAX_PATH 500
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Common data structures
|
// Common data structures
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -22,6 +22,7 @@ Abstract:
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "CommonLib.h"
|
||||||
#include "OsPath.h"
|
#include "OsPath.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -294,7 +295,7 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
FILE *InputFile;
|
FILE *InputFile;
|
||||||
InputFile = fopen (InputFileName, "rb");
|
InputFile = fopen (LongFilePath (InputFileName), "rb");
|
||||||
if (InputFile == NULL) {
|
if (InputFile == NULL) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -25,6 +25,7 @@ Abstract:
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "EfiUtilityMsgs.h"
|
#include "EfiUtilityMsgs.h"
|
||||||
#include "ParseInf.h"
|
#include "ParseInf.h"
|
||||||
|
#include "CommonLib.h"
|
||||||
|
|
||||||
CHAR8 *
|
CHAR8 *
|
||||||
ReadLine (
|
ReadLine (
|
||||||
@ -46,7 +47,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
InputFile Memory file image.
|
InputFile Memory file image.
|
||||||
InputBuffer Buffer to read into, must be _MAX_PATH size.
|
InputBuffer Buffer to read into, must be MaxLength size.
|
||||||
MaxLength The maximum size of the input buffer.
|
MaxLength The maximum size of the input buffer.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -165,7 +166,7 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR8 InputBuffer[_MAX_PATH];
|
CHAR8 InputBuffer[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 *CurrentToken;
|
CHAR8 *CurrentToken;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -188,7 +189,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Read a line
|
// Read a line
|
||||||
//
|
//
|
||||||
ReadLine (InputFile, InputBuffer, _MAX_PATH);
|
ReadLine (InputFile, InputBuffer, MAX_LONG_FILE_PATH);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if the section is found
|
// Check if the section is found
|
||||||
@ -222,7 +223,7 @@ Arguments:
|
|||||||
Section The section to search for, a string within [].
|
Section The section to search for, a string within [].
|
||||||
Token The token to search for, e.g. EFI_PEIM_RECOVERY, followed by an = in the INF file.
|
Token The token to search for, e.g. EFI_PEIM_RECOVERY, followed by an = in the INF file.
|
||||||
Instance The instance of the token to search for. Zero is the first instance.
|
Instance The instance of the token to search for. Zero is the first instance.
|
||||||
Value The string that holds the value following the =. Must be _MAX_PATH in size.
|
Value The string that holds the value following the =. Must be MAX_LONG_FILE_PATH in size.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
@ -234,7 +235,7 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR8 InputBuffer[_MAX_PATH];
|
CHAR8 InputBuffer[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 *CurrentToken;
|
CHAR8 *CurrentToken;
|
||||||
CHAR8 *Delimiter;
|
CHAR8 *Delimiter;
|
||||||
BOOLEAN ParseError;
|
BOOLEAN ParseError;
|
||||||
@ -274,7 +275,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Read a line from the file
|
// Read a line from the file
|
||||||
//
|
//
|
||||||
if (ReadLine (InputFile, InputBuffer, _MAX_PATH) == NULL) {
|
if (ReadLine (InputFile, InputBuffer, MAX_LONG_FILE_PATH) == NULL) {
|
||||||
//
|
//
|
||||||
// Error reading from input file
|
// Error reading from input file
|
||||||
//
|
//
|
||||||
@ -604,7 +605,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
InputFile Stream pointer.
|
InputFile Stream pointer.
|
||||||
InputBuffer Buffer to read into, must be _MAX_PATH size.
|
InputBuffer Buffer to read into, must be MAX_LONG_FILE_PATH size.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
@ -624,7 +625,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Read a line
|
// Read a line
|
||||||
//
|
//
|
||||||
if (fgets (InputBuffer, _MAX_PATH, InputFile) == NULL) {
|
if (fgets (InputBuffer, MAX_LONG_FILE_PATH, InputFile) == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -670,7 +671,7 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR8 InputBuffer[_MAX_PATH];
|
CHAR8 InputBuffer[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 *CurrentToken;
|
CHAR8 *CurrentToken;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -27,10 +27,6 @@ Abstract:
|
|||||||
#include <Common/UefiBaseTypes.h>
|
#include <Common/UefiBaseTypes.h>
|
||||||
#include <MemoryFile.h>
|
#include <MemoryFile.h>
|
||||||
|
|
||||||
#ifndef _MAX_PATH
|
|
||||||
#define _MAX_PATH 500
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -59,7 +55,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
InputFile Memory file image.
|
InputFile Memory file image.
|
||||||
InputBuffer Buffer to read into, must be _MAX_PATH size.
|
InputBuffer Buffer to read into, must be MaxLength size.
|
||||||
MaxLength The maximum size of the input buffer.
|
MaxLength The maximum size of the input buffer.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -115,7 +111,7 @@ Arguments:
|
|||||||
Section The section to search for, a string within [].
|
Section The section to search for, a string within [].
|
||||||
Token The token to search for, e.g. EFI_PEIM_RECOVERY, followed by an = in the INF file.
|
Token The token to search for, e.g. EFI_PEIM_RECOVERY, followed by an = in the INF file.
|
||||||
Instance The instance of the token to search for. Zero is the first instance.
|
Instance The instance of the token to search for. Zero is the first instance.
|
||||||
Value The string that holds the value following the =. Must be _MAX_PATH in size.
|
Value The string that holds the value following the =. Must be MAX_LONG_FILE_PATH in size.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
@ -196,7 +192,7 @@ Routine Description:
|
|||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
InputFile Stream pointer.
|
InputFile Stream pointer.
|
||||||
InputBuffer Buffer to read into, must be _MAX_PATH size.
|
InputBuffer Buffer to read into, must be MAX_LONG_FILE_PATH size.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -24,6 +24,7 @@ Abstract:
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#include "CommonLib.h"
|
||||||
#include "EfiUtilityMsgs.h"
|
#include "EfiUtilityMsgs.h"
|
||||||
#include "SimpleFileParsing.h"
|
#include "SimpleFileParsing.h"
|
||||||
|
|
||||||
@ -650,7 +651,7 @@ Returns:
|
|||||||
// Try to open the file locally, and if that fails try along our include paths.
|
// Try to open the file locally, and if that fails try along our include paths.
|
||||||
//
|
//
|
||||||
strcpy (FoundFileName, SourceFile->FileName);
|
strcpy (FoundFileName, SourceFile->FileName);
|
||||||
if ((SourceFile->Fptr = fopen (FoundFileName, "rb")) == NULL) {
|
if ((SourceFile->Fptr = fopen (LongFilePath (FoundFileName), "rb")) == NULL) {
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -84,7 +84,7 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||||
printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
|
printf ("Copyright (c) 1999-2014 Intel Corporation. All rights reserved.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
@ -270,7 +270,7 @@ Returns:
|
|||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpOut = fopen(OutputFileName, "w+b");
|
fpOut = fopen (LongFilePath (OutputFileName), "w+b");
|
||||||
if (!fpOut) {
|
if (!fpOut) {
|
||||||
Error (NULL, 0, 0001, "Could not open output file", OutputFileName);
|
Error (NULL, 0, 0001, "Could not open output file", OutputFileName);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
@ -294,7 +294,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Copy the content of PeImage file to output file
|
// Copy the content of PeImage file to output file
|
||||||
//
|
//
|
||||||
fpIn = fopen (InputFileNames[i], "rb");
|
fpIn = fopen (LongFilePath (InputFileNames[i]), "rb");
|
||||||
if (!fpIn) {
|
if (!fpIn) {
|
||||||
Error (NULL, 0, 0001, "Could not open input file", InputFileNames[i]);
|
Error (NULL, 0, 0001, "Could not open input file", InputFileNames[i]);
|
||||||
fclose (fpOut);
|
fclose (fpOut);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 1999 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
@ -135,7 +135,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Now open our output file
|
// Now open our output file
|
||||||
//
|
//
|
||||||
if ((FptrOut = fopen (mOptions.OutFileName, "wb")) == NULL) {
|
if ((FptrOut = fopen (LongFilePath (mOptions.OutFileName), "wb")) == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", "Error opening file %s", mOptions.OutFileName);
|
Error (NULL, 0, 0001, "Error opening file", "Error opening file %s", mOptions.OutFileName);
|
||||||
goto BailOut;
|
goto BailOut;
|
||||||
}
|
}
|
||||||
@ -246,7 +246,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Try to open the input file
|
// Try to open the input file
|
||||||
//
|
//
|
||||||
if ((InFptr = fopen (InFile->FileName, "rb")) == NULL) {
|
if ((InFptr = fopen (LongFilePath (InFile->FileName), "rb")) == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InFile->FileName);
|
Error (NULL, 0, 0001, "Error opening file", InFile->FileName);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
@ -460,7 +460,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Try to open the input file
|
// Try to open the input file
|
||||||
//
|
//
|
||||||
if ((InFptr = fopen (InFile->FileName, "rb")) == NULL) {
|
if ((InFptr = fopen (LongFilePath (InFile->FileName), "rb")) == NULL) {
|
||||||
Error (NULL, 0, 0001, "Open file error", "Error opening file: %s", InFile->FileName);
|
Error (NULL, 0, 0001, "Open file error", "Error opening file: %s", InFile->FileName);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
@ -1230,7 +1230,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Copyright declaration
|
// Copyright declaration
|
||||||
//
|
//
|
||||||
fprintf (stdout, "Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.\n\n");
|
fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Details Option
|
// Details Option
|
||||||
@ -1300,7 +1300,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the input file
|
// Open the input file
|
||||||
//
|
//
|
||||||
if ((InFptr = fopen (InFile->FileName, "rb")) == NULL) {
|
if ((InFptr = fopen (LongFilePath (InFile->FileName), "rb")) == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InFile->FileName);
|
Error (NULL, 0, 0001, "Error opening file", InFile->FileName);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -632,7 +632,7 @@ GetPathInfo (
|
|||||||
//
|
//
|
||||||
// If path is file path, check whether file is valid.
|
// If path is file path, check whether file is valid.
|
||||||
//
|
//
|
||||||
f = fopen (PathInfo->Path, "r");
|
f = fopen (LongFilePath (PathInfo->Path), "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
fprintf (stderr, "error E2003: File was not provided!\n");
|
fprintf (stderr, "error E2003: File was not provided!\n");
|
||||||
return ErrorPath;
|
return ErrorPath;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -282,7 +282,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open Input file and read file data.
|
// Open Input file and read file data.
|
||||||
//
|
//
|
||||||
InFile = fopen (InputFileName, "rb");
|
InFile = fopen (LongFilePath (InputFileName), "rb");
|
||||||
if (InFile == NULL) {
|
if (InFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InputFileName);
|
Error (NULL, 0, 0001, "Error opening file", InputFileName);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
@ -305,7 +305,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open output file
|
// Open output file
|
||||||
//
|
//
|
||||||
OutFile = fopen (OutputFileName, "wb");
|
OutFile = fopen (LongFilePath (OutputFileName), "wb");
|
||||||
if (OutFile == NULL) {
|
if (OutFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", OutputFileName);
|
Error (NULL, 0, 0001, "Error opening file", OutputFileName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
|
|
||||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -119,7 +119,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Copyright declaration
|
// Copyright declaration
|
||||||
//
|
//
|
||||||
fprintf (stdout, "Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.\n\n");
|
fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Details Option
|
// Details Option
|
||||||
@ -317,7 +317,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open file and read contents
|
// Open file and read contents
|
||||||
//
|
//
|
||||||
InFile = fopen (InputFileName[Index], "rb");
|
InFile = fopen (LongFilePath (InputFileName[Index]), "rb");
|
||||||
if (InFile == NULL) {
|
if (InFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InputFileName[Index]);
|
Error (NULL, 0, 0001, "Error opening file", InputFileName[Index]);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -97,7 +97,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Copyright declaration
|
// Copyright declaration
|
||||||
//
|
//
|
||||||
fprintf (stdout, "Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.\n\n");
|
fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Details Option
|
// Details Option
|
||||||
@ -603,7 +603,7 @@ Returns:
|
|||||||
if (OutFileName == NULL) {
|
if (OutFileName == NULL) {
|
||||||
FpFile = stdout;
|
FpFile = stdout;
|
||||||
} else {
|
} else {
|
||||||
FpFile = fopen (OutFileName, "w");
|
FpFile = fopen (LongFilePath (OutFileName), "w");
|
||||||
if (FpFile == NULL) {
|
if (FpFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", OutFileName);
|
Error (NULL, 0, 0001, "Error opening file", OutFileName);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
@ -672,7 +672,7 @@ Returns:
|
|||||||
// update boot driver address and runtime driver address in address file
|
// update boot driver address and runtime driver address in address file
|
||||||
//
|
//
|
||||||
if (Status == EFI_SUCCESS && AddrFileName != NULL && mFvBaseAddressNumber > 0) {
|
if (Status == EFI_SUCCESS && AddrFileName != NULL && mFvBaseAddressNumber > 0) {
|
||||||
FpFile = fopen (AddrFileName, "w");
|
FpFile = fopen (LongFilePath (AddrFileName), "w");
|
||||||
if (FpFile == NULL) {
|
if (FpFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", AddrFileName);
|
Error (NULL, 0, 0001, "Error opening file", AddrFileName);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
|
Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -187,7 +187,7 @@ Returns:
|
|||||||
EFI_NOT_FOUND A required string was not found in the INF file.
|
EFI_NOT_FOUND A required string was not found in the INF file.
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR8 Value[_MAX_PATH];
|
CHAR8 Value[MAX_LONG_FILE_PATH];
|
||||||
UINT64 Value64;
|
UINT64 Value64;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN Number;
|
UINTN Number;
|
||||||
@ -730,7 +730,7 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR8 PeMapFileName [_MAX_PATH];
|
CHAR8 PeMapFileName [MAX_LONG_FILE_PATH];
|
||||||
CHAR8 *Cptr, *Cptr2;
|
CHAR8 *Cptr, *Cptr2;
|
||||||
CHAR8 FileGuidName [MAX_LINE_LEN];
|
CHAR8 FileGuidName [MAX_LINE_LEN];
|
||||||
FILE *PeMapFile;
|
FILE *PeMapFile;
|
||||||
@ -866,7 +866,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open PeMapFile
|
// Open PeMapFile
|
||||||
//
|
//
|
||||||
PeMapFile = fopen (PeMapFileName, "r");
|
PeMapFile = fopen (LongFilePath (PeMapFileName), "r");
|
||||||
if (PeMapFile == NULL) {
|
if (PeMapFile == NULL) {
|
||||||
// fprintf (stdout, "can't open %s file to reading\n", PeMapFileName);
|
// fprintf (stdout, "can't open %s file to reading\n", PeMapFileName);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -992,7 +992,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Read the file to add
|
// Read the file to add
|
||||||
//
|
//
|
||||||
NewFile = fopen (FvInfo->FvFiles[Index], "rb");
|
NewFile = fopen (LongFilePath (FvInfo->FvFiles[Index]), "rb");
|
||||||
|
|
||||||
if (NewFile == NULL) {
|
if (NewFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", FvInfo->FvFiles[Index]);
|
Error (NULL, 0, 0001, "Error opening file", FvInfo->FvFiles[Index]);
|
||||||
@ -2077,12 +2077,12 @@ Returns:
|
|||||||
UINT8 *FvImage;
|
UINT8 *FvImage;
|
||||||
UINTN FvImageSize;
|
UINTN FvImageSize;
|
||||||
FILE *FvFile;
|
FILE *FvFile;
|
||||||
CHAR8 FvMapName [_MAX_PATH];
|
CHAR8 FvMapName [MAX_LONG_FILE_PATH];
|
||||||
FILE *FvMapFile;
|
FILE *FvMapFile;
|
||||||
EFI_FIRMWARE_VOLUME_EXT_HEADER *FvExtHeader;
|
EFI_FIRMWARE_VOLUME_EXT_HEADER *FvExtHeader;
|
||||||
FILE *FvExtHeaderFile;
|
FILE *FvExtHeaderFile;
|
||||||
UINTN FileSize;
|
UINTN FileSize;
|
||||||
CHAR8 FvReportName[_MAX_PATH];
|
CHAR8 FvReportName[MAX_LONG_FILE_PATH];
|
||||||
FILE *FvReportFile;
|
FILE *FvReportFile;
|
||||||
|
|
||||||
FvBufferHeader = NULL;
|
FvBufferHeader = NULL;
|
||||||
@ -2152,7 +2152,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the FV Extension Header file
|
// Open the FV Extension Header file
|
||||||
//
|
//
|
||||||
FvExtHeaderFile = fopen (mFvDataInfo.FvExtHeaderFile, "rb");
|
FvExtHeaderFile = fopen (LongFilePath (mFvDataInfo.FvExtHeaderFile), "rb");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the file size
|
// Get the file size
|
||||||
@ -2343,7 +2343,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open FvMap file
|
// Open FvMap file
|
||||||
//
|
//
|
||||||
FvMapFile = fopen (FvMapName, "w");
|
FvMapFile = fopen (LongFilePath (FvMapName), "w");
|
||||||
if (FvMapFile == NULL) {
|
if (FvMapFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", FvMapName);
|
Error (NULL, 0, 0001, "Error opening file", FvMapName);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -2352,7 +2352,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open FvReport file
|
// Open FvReport file
|
||||||
//
|
//
|
||||||
FvReportFile = fopen(FvReportName, "w");
|
FvReportFile = fopen (LongFilePath (FvReportName), "w");
|
||||||
if (FvReportFile == NULL) {
|
if (FvReportFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", FvReportName);
|
Error (NULL, 0, 0001, "Error opening file", FvReportName);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -2484,7 +2484,7 @@ WriteFile:
|
|||||||
//
|
//
|
||||||
// Write fv file
|
// Write fv file
|
||||||
//
|
//
|
||||||
FvFile = fopen (FvFileName, "wb");
|
FvFile = fopen (LongFilePath (FvFileName), "wb");
|
||||||
if (FvFile == NULL) {
|
if (FvFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", FvFileName);
|
Error (NULL, 0, 0001, "Error opening file", FvFileName);
|
||||||
Status = EFI_ABORTED;
|
Status = EFI_ABORTED;
|
||||||
@ -2651,7 +2651,7 @@ Returns:
|
|||||||
// Calculate PI extension header
|
// Calculate PI extension header
|
||||||
//
|
//
|
||||||
if (mFvDataInfo.FvExtHeaderFile[0] != '\0') {
|
if (mFvDataInfo.FvExtHeaderFile[0] != '\0') {
|
||||||
fpin = fopen (mFvDataInfo.FvExtHeaderFile, "rb");
|
fpin = fopen (LongFilePath (mFvDataInfo.FvExtHeaderFile), "rb");
|
||||||
if (fpin == NULL) {
|
if (fpin == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", mFvDataInfo.FvExtHeaderFile);
|
Error (NULL, 0, 0001, "Error opening file", mFvDataInfo.FvExtHeaderFile);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -2678,7 +2678,7 @@ Returns:
|
|||||||
// Open FFS file
|
// Open FFS file
|
||||||
//
|
//
|
||||||
fpin = NULL;
|
fpin = NULL;
|
||||||
fpin = fopen (FvInfoPtr->FvFiles[Index], "rb");
|
fpin = fopen (LongFilePath (FvInfoPtr->FvFiles[Index]), "rb");
|
||||||
if (fpin == NULL) {
|
if (fpin == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", FvInfoPtr->FvFiles[Index]);
|
Error (NULL, 0, 0001, "Error opening file", FvInfoPtr->FvFiles[Index]);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -2915,7 +2915,7 @@ Returns:
|
|||||||
EFI_TE_IMAGE_HEADER *TEImageHeader;
|
EFI_TE_IMAGE_HEADER *TEImageHeader;
|
||||||
UINT8 *MemoryImagePointer;
|
UINT8 *MemoryImagePointer;
|
||||||
EFI_IMAGE_SECTION_HEADER *SectionHeader;
|
EFI_IMAGE_SECTION_HEADER *SectionHeader;
|
||||||
CHAR8 PeFileName [_MAX_PATH];
|
CHAR8 PeFileName [MAX_LONG_FILE_PATH];
|
||||||
CHAR8 *Cptr;
|
CHAR8 *Cptr;
|
||||||
FILE *PeFile;
|
FILE *PeFile;
|
||||||
UINT8 *PeFileBuffer;
|
UINT8 *PeFileBuffer;
|
||||||
@ -3066,7 +3066,7 @@ Returns:
|
|||||||
*(Cptr + 3) = 'i';
|
*(Cptr + 3) = 'i';
|
||||||
*(Cptr + 4) = '\0';
|
*(Cptr + 4) = '\0';
|
||||||
}
|
}
|
||||||
PeFile = fopen (PeFileName, "rb");
|
PeFile = fopen (LongFilePath (PeFileName), "rb");
|
||||||
if (PeFile == NULL) {
|
if (PeFile == NULL) {
|
||||||
Warning (NULL, 0, 0, "Invalid", "The file %s has no .reloc section.", FileName);
|
Warning (NULL, 0, 0, "Invalid", "The file %s has no .reloc section.", FileName);
|
||||||
//Error (NULL, 0, 3000, "Invalid", "The file %s has no .reloc section.", FileName);
|
//Error (NULL, 0, 3000, "Invalid", "The file %s has no .reloc section.", FileName);
|
||||||
@ -3322,7 +3322,7 @@ Returns:
|
|||||||
*(Cptr + 4) = '\0';
|
*(Cptr + 4) = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
PeFile = fopen (PeFileName, "rb");
|
PeFile = fopen (LongFilePath (PeFileName), "rb");
|
||||||
if (PeFile == NULL) {
|
if (PeFile == NULL) {
|
||||||
Warning (NULL, 0, 0, "Invalid", "The file %s has no .reloc section.", FileName);
|
Warning (NULL, 0, 0, "Invalid", "The file %s has no .reloc section.", FileName);
|
||||||
//Error (NULL, 0, 3000, "Invalid", "The file %s has no .reloc section.", FileName);
|
//Error (NULL, 0, 3000, "Invalid", "The file %s has no .reloc section.", FileName);
|
||||||
@ -3567,7 +3567,7 @@ Returns:
|
|||||||
EFI_NOT_FOUND A required string was not found in the INF file.
|
EFI_NOT_FOUND A required string was not found in the INF file.
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR8 Value[_MAX_PATH];
|
CHAR8 Value[MAX_LONG_FILE_PATH];
|
||||||
UINT64 Value64;
|
UINT64 Value64;
|
||||||
UINTN Index, Number;
|
UINTN Index, Number;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -3773,7 +3773,7 @@ Returns:
|
|||||||
FileSize = 0;
|
FileSize = 0;
|
||||||
CapSize = mCapDataInfo.HeaderSize;
|
CapSize = mCapDataInfo.HeaderSize;
|
||||||
while (mCapDataInfo.CapFiles [Index][0] != '\0') {
|
while (mCapDataInfo.CapFiles [Index][0] != '\0') {
|
||||||
fpin = fopen (mCapDataInfo.CapFiles[Index], "rb");
|
fpin = fopen (LongFilePath (mCapDataInfo.CapFiles[Index]), "rb");
|
||||||
if (fpin == NULL) {
|
if (fpin == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", mCapDataInfo.CapFiles[Index]);
|
Error (NULL, 0, 0001, "Error opening file", mCapDataInfo.CapFiles[Index]);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -3811,7 +3811,7 @@ Returns:
|
|||||||
FileSize = 0;
|
FileSize = 0;
|
||||||
CapSize = CapsuleHeader->HeaderSize;
|
CapSize = CapsuleHeader->HeaderSize;
|
||||||
while (mCapDataInfo.CapFiles [Index][0] != '\0') {
|
while (mCapDataInfo.CapFiles [Index][0] != '\0') {
|
||||||
fpin = fopen (mCapDataInfo.CapFiles[Index], "rb");
|
fpin = fopen (LongFilePath (mCapDataInfo.CapFiles[Index]), "rb");
|
||||||
if (fpin == NULL) {
|
if (fpin == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", mCapDataInfo.CapFiles[Index]);
|
Error (NULL, 0, 0001, "Error opening file", mCapDataInfo.CapFiles[Index]);
|
||||||
free (CapBuffer);
|
free (CapBuffer);
|
||||||
@ -3827,7 +3827,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// write capsule data into the output file
|
// write capsule data into the output file
|
||||||
//
|
//
|
||||||
fpout = fopen (CapFileName, "wb");
|
fpout = fopen (LongFilePath (CapFileName), "wb");
|
||||||
if (fpout == NULL) {
|
if (fpout == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", CapFileName);
|
Error (NULL, 0, 0001, "Error opening file", CapFileName);
|
||||||
free (CapBuffer);
|
free (CapBuffer);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -214,7 +214,7 @@ Abstract:
|
|||||||
//
|
//
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
CHAR8 ComponentName[_MAX_PATH];
|
CHAR8 ComponentName[MAX_LONG_FILE_PATH];
|
||||||
} COMPONENT_INFO;
|
} COMPONENT_INFO;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -227,12 +227,12 @@ typedef struct {
|
|||||||
BOOLEAN FvFileSystemGuidSet;
|
BOOLEAN FvFileSystemGuidSet;
|
||||||
EFI_GUID FvNameGuid;
|
EFI_GUID FvNameGuid;
|
||||||
BOOLEAN FvNameGuidSet;
|
BOOLEAN FvNameGuidSet;
|
||||||
CHAR8 FvExtHeaderFile[_MAX_PATH];
|
CHAR8 FvExtHeaderFile[MAX_LONG_FILE_PATH];
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
EFI_FVB_ATTRIBUTES_2 FvAttributes;
|
EFI_FVB_ATTRIBUTES_2 FvAttributes;
|
||||||
CHAR8 FvName[_MAX_PATH];
|
CHAR8 FvName[MAX_LONG_FILE_PATH];
|
||||||
EFI_FV_BLOCK_MAP_ENTRY FvBlocks[MAX_NUMBER_OF_FV_BLOCKS];
|
EFI_FV_BLOCK_MAP_ENTRY FvBlocks[MAX_NUMBER_OF_FV_BLOCKS];
|
||||||
CHAR8 FvFiles[MAX_NUMBER_OF_FILES_IN_FV][_MAX_PATH];
|
CHAR8 FvFiles[MAX_NUMBER_OF_FILES_IN_FV][MAX_LONG_FILE_PATH];
|
||||||
UINT32 SizeofFvFiles[MAX_NUMBER_OF_FILES_IN_FV];
|
UINT32 SizeofFvFiles[MAX_NUMBER_OF_FILES_IN_FV];
|
||||||
BOOLEAN IsPiFvImage;
|
BOOLEAN IsPiFvImage;
|
||||||
INT8 ForceRebase;
|
INT8 ForceRebase;
|
||||||
@ -242,8 +242,8 @@ typedef struct {
|
|||||||
EFI_GUID CapGuid;
|
EFI_GUID CapGuid;
|
||||||
UINT32 HeaderSize;
|
UINT32 HeaderSize;
|
||||||
UINT32 Flags;
|
UINT32 Flags;
|
||||||
CHAR8 CapName[_MAX_PATH];
|
CHAR8 CapName[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 CapFiles[MAX_NUMBER_OF_FILES_IN_CAP][_MAX_PATH];
|
CHAR8 CapFiles[MAX_NUMBER_OF_FILES_IN_CAP][MAX_LONG_FILE_PATH];
|
||||||
} CAP_INFO;
|
} CAP_INFO;
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -66,10 +66,6 @@ Abstract:
|
|||||||
#define DEFAULT_MC_PAD_BYTE_VALUE 0xFF
|
#define DEFAULT_MC_PAD_BYTE_VALUE 0xFF
|
||||||
#define DEFAULT_MC_ALIGNMENT 16
|
#define DEFAULT_MC_ALIGNMENT 16
|
||||||
|
|
||||||
#ifndef _MAX_PATH
|
|
||||||
#define _MAX_PATH 500
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define STATUS_IGNORE 0xA
|
#define STATUS_IGNORE 0xA
|
||||||
//
|
//
|
||||||
// Structure definition for a microcode header
|
// Structure definition for a microcode header
|
||||||
@ -179,7 +175,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Copyright declaration
|
// Copyright declaration
|
||||||
//
|
//
|
||||||
fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
|
fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Details Option
|
// Details Option
|
||||||
@ -1559,7 +1555,7 @@ Returns:
|
|||||||
// Open output file and Write image into the output file.
|
// Open output file and Write image into the output file.
|
||||||
//
|
//
|
||||||
if (OutImageName != NULL) {
|
if (OutImageName != NULL) {
|
||||||
fpOut = fopen (OutImageName, "rb");
|
fpOut = fopen (LongFilePath (OutImageName), "rb");
|
||||||
if (fpOut != NULL) {
|
if (fpOut != NULL) {
|
||||||
//
|
//
|
||||||
// Get Output file time stamp
|
// Get Output file time stamp
|
||||||
@ -1590,7 +1586,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open input file and read file data into file buffer.
|
// Open input file and read file data into file buffer.
|
||||||
//
|
//
|
||||||
fpIn = fopen (mInImageName, "rb");
|
fpIn = fopen (LongFilePath (mInImageName), "rb");
|
||||||
if (fpIn == NULL) {
|
if (fpIn == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
@ -1621,7 +1617,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open output file handle.
|
// Open output file handle.
|
||||||
//
|
//
|
||||||
fpOut = fopen (OutImageName, "wb");
|
fpOut = fopen (LongFilePath (OutImageName), "wb");
|
||||||
if (!fpOut) {
|
if (!fpOut) {
|
||||||
Error (NULL, 0, 0001, "Error opening output file", OutImageName);
|
Error (NULL, 0, 0001, "Error opening output file", OutImageName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
@ -1631,7 +1627,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
HiiPackageListHeader.PackageLength = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
|
HiiPackageListHeader.PackageLength = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
|
||||||
for (Index = 0; Index < InputFileNum; Index ++) {
|
for (Index = 0; Index < InputFileNum; Index ++) {
|
||||||
fpIn = fopen (InputFileName [Index], "rb");
|
fpIn = fopen (LongFilePath (InputFileName [Index]), "rb");
|
||||||
if (fpIn == NULL) {
|
if (fpIn == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
|
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
@ -1677,7 +1673,7 @@ Returns:
|
|||||||
memcpy (HiiPackageListBuffer, &HiiPackageListHeader, sizeof (HiiPackageListHeader));
|
memcpy (HiiPackageListBuffer, &HiiPackageListHeader, sizeof (HiiPackageListHeader));
|
||||||
HiiPackageDataPointer = HiiPackageListBuffer + sizeof (HiiPackageListHeader);
|
HiiPackageDataPointer = HiiPackageListBuffer + sizeof (HiiPackageListHeader);
|
||||||
for (Index = 0; Index < InputFileNum; Index ++) {
|
for (Index = 0; Index < InputFileNum; Index ++) {
|
||||||
fpIn = fopen (InputFileName [Index], "rb");
|
fpIn = fopen (LongFilePath (InputFileName [Index]), "rb");
|
||||||
if (fpIn == NULL) {
|
if (fpIn == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
|
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
|
||||||
free (HiiPackageListBuffer);
|
free (HiiPackageListBuffer);
|
||||||
@ -1757,13 +1753,13 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open output file handle.
|
// Open output file handle.
|
||||||
//
|
//
|
||||||
fpOut = fopen (OutImageName, "wb");
|
fpOut = fopen (LongFilePath (OutImageName), "wb");
|
||||||
if (!fpOut) {
|
if (!fpOut) {
|
||||||
Error (NULL, 0, 0001, "Error opening output file", OutImageName);
|
Error (NULL, 0, 0001, "Error opening output file", OutImageName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
}
|
}
|
||||||
for (Index = 0; Index < InputFileNum; Index ++) {
|
for (Index = 0; Index < InputFileNum; Index ++) {
|
||||||
fpIn = fopen (InputFileName [Index], "rb");
|
fpIn = fopen (LongFilePath (InputFileName [Index]), "rb");
|
||||||
if (!fpIn) {
|
if (!fpIn) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
|
Error (NULL, 0, 0001, "Error opening file", InputFileName [Index]);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
@ -1805,7 +1801,7 @@ Returns:
|
|||||||
// Convert MicroCode.txt file to MicroCode.bin file
|
// Convert MicroCode.txt file to MicroCode.bin file
|
||||||
//
|
//
|
||||||
if (mOutImageType == FW_MCI_IMAGE) {
|
if (mOutImageType == FW_MCI_IMAGE) {
|
||||||
fpIn = fopen (mInImageName, "r");
|
fpIn = fopen (LongFilePath (mInImageName), "r");
|
||||||
if (fpIn == NULL) {
|
if (fpIn == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
@ -1928,14 +1924,14 @@ Returns:
|
|||||||
// Open the output file handle.
|
// Open the output file handle.
|
||||||
//
|
//
|
||||||
if (ReplaceFlag) {
|
if (ReplaceFlag) {
|
||||||
fpInOut = fopen (mInImageName, "wb");
|
fpInOut = fopen (LongFilePath (mInImageName), "wb");
|
||||||
if (fpInOut == NULL) {
|
if (fpInOut == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (OutImageName != NULL) {
|
if (OutImageName != NULL) {
|
||||||
fpOut = fopen (OutImageName, "wb");
|
fpOut = fopen (LongFilePath (OutImageName), "wb");
|
||||||
} else {
|
} else {
|
||||||
fpOut = stdout;
|
fpOut = stdout;
|
||||||
}
|
}
|
||||||
@ -2641,7 +2637,7 @@ WriteFile:
|
|||||||
//
|
//
|
||||||
// Update File when File is changed.
|
// Update File when File is changed.
|
||||||
//
|
//
|
||||||
fpInOut = fopen (mInImageName, "wb");
|
fpInOut = fopen (LongFilePath (mInImageName), "wb");
|
||||||
if (fpInOut == NULL) {
|
if (fpInOut == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
Error (NULL, 0, 0001, "Error opening file", mInImageName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
@ -2654,7 +2650,7 @@ WriteFile:
|
|||||||
//
|
//
|
||||||
// Update File when File is changed or File is old.
|
// Update File when File is changed or File is old.
|
||||||
//
|
//
|
||||||
fpOut = fopen (OutImageName, "wb");
|
fpOut = fopen (LongFilePath (OutImageName), "wb");
|
||||||
if (fpOut == NULL) {
|
if (fpOut == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening output file", OutImageName);
|
Error (NULL, 0, 0001, "Error opening output file", OutImageName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
@ -2696,7 +2692,7 @@ Finish:
|
|||||||
if (OutputFileBuffer == NULL) {
|
if (OutputFileBuffer == NULL) {
|
||||||
remove (OutImageName);
|
remove (OutImageName);
|
||||||
} else {
|
} else {
|
||||||
fpOut = fopen (OutImageName, "wb");
|
fpOut = fopen (LongFilePath (OutImageName), "wb");
|
||||||
fwrite (OutputFileBuffer, 1, OutputFileLength, fpOut);
|
fwrite (OutputFileBuffer, 1, OutputFileLength, fpOut);
|
||||||
fclose (fpOut);
|
fclose (fpOut);
|
||||||
}
|
}
|
||||||
@ -2722,7 +2718,7 @@ Finish:
|
|||||||
if (ReportFileName != NULL) {
|
if (ReportFileName != NULL) {
|
||||||
strcpy (ReportFileName, OutImageName);
|
strcpy (ReportFileName, OutImageName);
|
||||||
strcpy (ReportFileName + (FileLen - 4), ".txt");
|
strcpy (ReportFileName + (FileLen - 4), ".txt");
|
||||||
ReportFile = fopen (ReportFileName, "w+");
|
ReportFile = fopen (LongFilePath (ReportFileName), "w+");
|
||||||
if (ReportFile != NULL) {
|
if (ReportFile != NULL) {
|
||||||
fprintf (ReportFile, "MODULE_SIZE = %u\n", (unsigned) mImageSize);
|
fprintf (ReportFile, "MODULE_SIZE = %u\n", (unsigned) mImageSize);
|
||||||
fprintf (ReportFile, "TIME_STAMP = %u\n", (unsigned) mImageTimeStamp);
|
fprintf (ReportFile, "TIME_STAMP = %u\n", (unsigned) mImageTimeStamp);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -243,13 +243,13 @@ return:
|
|||||||
//
|
//
|
||||||
// Open files
|
// Open files
|
||||||
//
|
//
|
||||||
PageFile = fopen (PageFileName, "w+b");
|
PageFile = fopen (LongFilePath (PageFileName), "w+b");
|
||||||
if (PageFile == NULL) {
|
if (PageFile == NULL) {
|
||||||
Error (NoPageFileName, 0, 0x4002, "Invalid parameter option", "Output File %s open failure", PageFileName);
|
Error (NoPageFileName, 0, 0x4002, "Invalid parameter option", "Output File %s open failure", PageFileName);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
NoPageFile = fopen (NoPageFileName, "r+b");
|
NoPageFile = fopen (LongFilePath (NoPageFileName), "r+b");
|
||||||
if (NoPageFile == NULL) {
|
if (NoPageFile == NULL) {
|
||||||
Error (NoPageFileName, 0, 0x4002, "Invalid parameter option", "Input File %s open failure", NoPageFileName);
|
Error (NoPageFileName, 0, 0x4002, "Invalid parameter option", "Input File %s open failure", NoPageFileName);
|
||||||
fclose (PageFile);
|
fclose (PageFile);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -153,7 +153,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Copyright declaration
|
// Copyright declaration
|
||||||
//
|
//
|
||||||
fprintf (stdout, "Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.\n\n");
|
fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Details Option
|
// Details Option
|
||||||
@ -283,7 +283,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the input file
|
// Open the input file
|
||||||
//
|
//
|
||||||
InFile = fopen (InputFileName[0], "rb");
|
InFile = fopen (LongFilePath (InputFileName[0]), "rb");
|
||||||
if (InFile == NULL) {
|
if (InFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InputFileName[0]);
|
Error (NULL, 0, 0001, "Error opening file", InputFileName[0]);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
@ -473,7 +473,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open file and read contents
|
// Open file and read contents
|
||||||
//
|
//
|
||||||
InFile = fopen (InputFileName[Index], "rb");
|
InFile = fopen (LongFilePath (InputFileName[Index]), "rb");
|
||||||
if (InFile == NULL) {
|
if (InFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", InputFileName[Index]);
|
Error (NULL, 0, 0001, "Error opening file", InputFileName[Index]);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -1553,7 +1553,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Write the output file
|
// Write the output file
|
||||||
//
|
//
|
||||||
OutFile = fopen (OutputFileName, "wb");
|
OutFile = fopen (LongFilePath (OutputFileName), "wb");
|
||||||
if (OutFile == NULL) {
|
if (OutFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file for writing", OutputFileName);
|
Error (NULL, 0, 0001, "Error opening file for writing", OutputFileName);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
|
|
||||||
Copyright (c) 1999 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
@ -1070,7 +1070,7 @@ Returns:
|
|||||||
CHAR8 Buff5[10];
|
CHAR8 Buff5[10];
|
||||||
CHAR8 Token[50];
|
CHAR8 Token[50];
|
||||||
|
|
||||||
Fp = fopen (VtfInfo->CompSymName, "rb");
|
Fp = fopen (LongFilePath (VtfInfo->CompSymName), "rb");
|
||||||
|
|
||||||
if (Fp == NULL) {
|
if (Fp == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", VtfInfo->CompSymName);
|
Error (NULL, 0, 0001, "Error opening file", VtfInfo->CompSymName);
|
||||||
@ -1152,7 +1152,7 @@ Returns:
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fp = fopen (VtfInfo->CompBinName, "rb");
|
Fp = fopen (LongFilePath (VtfInfo->CompBinName), "rb");
|
||||||
|
|
||||||
if (Fp == NULL) {
|
if (Fp == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", VtfInfo->CompBinName);
|
Error (NULL, 0, 0001, "Error opening file", VtfInfo->CompBinName);
|
||||||
@ -1332,7 +1332,7 @@ Returns:
|
|||||||
FILE *Fp;
|
FILE *Fp;
|
||||||
FIT_TABLE *PalFitPtr;
|
FIT_TABLE *PalFitPtr;
|
||||||
|
|
||||||
Fp = fopen (VtfInfo->CompBinName, "rb");
|
Fp = fopen (LongFilePath (VtfInfo->CompBinName), "rb");
|
||||||
|
|
||||||
if (Fp == NULL) {
|
if (Fp == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", VtfInfo->CompBinName);
|
Error (NULL, 0, 0001, "Error opening file", VtfInfo->CompBinName);
|
||||||
@ -1551,7 +1551,7 @@ Returns:
|
|||||||
VtfBuffer = (VOID *) RelativeAddress;
|
VtfBuffer = (VOID *) RelativeAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fp = fopen (FileName, "wb");
|
Fp = fopen (LongFilePath (FileName), "wb");
|
||||||
if (Fp == NULL) {
|
if (Fp == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", FileName);
|
Error (NULL, 0, 0001, "Error opening file", FileName);
|
||||||
return EFI_ABORTED;
|
return EFI_ABORTED;
|
||||||
@ -1763,7 +1763,7 @@ Returns:
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fp = fopen (FileName, "rb");
|
Fp = fopen (LongFilePath (FileName), "rb");
|
||||||
|
|
||||||
if (Fp == NULL) {
|
if (Fp == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", FileName);
|
Error (NULL, 0, 0001, "Error opening file", FileName);
|
||||||
@ -2125,7 +2125,7 @@ Returns:
|
|||||||
}
|
}
|
||||||
*StartAddressPtr = StartAddress;
|
*StartAddressPtr = StartAddress;
|
||||||
|
|
||||||
Fp = fopen (OutFileName1, "rb");
|
Fp = fopen (LongFilePath (OutFileName1), "rb");
|
||||||
|
|
||||||
if (Fp == NULL) {
|
if (Fp == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", OutFileName1);
|
Error (NULL, 0, 0001, "Error opening file", OutFileName1);
|
||||||
@ -2183,12 +2183,12 @@ Returns:
|
|||||||
{
|
{
|
||||||
FILE *SourceFile;
|
FILE *SourceFile;
|
||||||
FILE *DestFile;
|
FILE *DestFile;
|
||||||
CHAR8 Buffer[_MAX_PATH];
|
CHAR8 Buffer[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 Type[_MAX_PATH];
|
CHAR8 Type[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 Address[_MAX_PATH];
|
CHAR8 Address[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 Section[_MAX_PATH];
|
CHAR8 Section[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 Token[_MAX_PATH];
|
CHAR8 Token[MAX_LONG_FILE_PATH];
|
||||||
CHAR8 BaseToken[_MAX_PATH];
|
CHAR8 BaseToken[MAX_LONG_FILE_PATH];
|
||||||
UINT64 TokenAddress;
|
UINT64 TokenAddress;
|
||||||
long StartLocation;
|
long StartLocation;
|
||||||
|
|
||||||
@ -2202,7 +2202,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the source file
|
// Open the source file
|
||||||
//
|
//
|
||||||
SourceFile = fopen (SourceFileName, "r");
|
SourceFile = fopen (LongFilePath (SourceFileName), "r");
|
||||||
if (SourceFile == NULL) {
|
if (SourceFile == NULL) {
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -2221,7 +2221,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the destination file
|
// Open the destination file
|
||||||
//
|
//
|
||||||
DestFile = fopen (DestFileName, "a+");
|
DestFile = fopen (LongFilePath (DestFileName), "a+");
|
||||||
if (DestFile == NULL) {
|
if (DestFile == NULL) {
|
||||||
fclose (SourceFile);
|
fclose (SourceFile);
|
||||||
Error (NULL, 0, 0001, "Error opening file", DestFileName);
|
Error (NULL, 0, 0001, "Error opening file", DestFileName);
|
||||||
@ -2252,7 +2252,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Read the first line
|
// Read the first line
|
||||||
//
|
//
|
||||||
if (fgets (Buffer, _MAX_PATH, SourceFile) == NULL) {
|
if (fgets (Buffer, MAX_LONG_FILE_PATH, SourceFile) == NULL) {
|
||||||
Buffer[0] = 0;
|
Buffer[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2410,7 +2410,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Copyright declaration
|
// Copyright declaration
|
||||||
//
|
//
|
||||||
fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
|
fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");
|
||||||
//
|
//
|
||||||
// Details Option
|
// Details Option
|
||||||
//
|
//
|
||||||
@ -2546,7 +2546,7 @@ Returns:
|
|||||||
// Get the input VTF file name
|
// Get the input VTF file name
|
||||||
//
|
//
|
||||||
VtfFileName = argv[Index+1];
|
VtfFileName = argv[Index+1];
|
||||||
VtfFP = fopen(VtfFileName, "rb");
|
VtfFP = fopen (LongFilePath (VtfFileName), "rb");
|
||||||
if (VtfFP == NULL) {
|
if (VtfFP == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening file", VtfFileName);
|
Error (NULL, 0, 0001, "Error opening file", VtfFileName);
|
||||||
goto ERROR;
|
goto ERROR;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -153,7 +153,7 @@ GetPathInfo (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Try to open the device.
|
// Try to open the device.
|
||||||
f = fopen(PathInfo->Path,"r");
|
f = fopen (LongFilePath (PathInfo->Path),"r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
printf ("error :open device failed!\n");
|
printf ("error :open device failed!\n");
|
||||||
return ErrorPath;
|
return ErrorPath;
|
||||||
@ -167,7 +167,7 @@ GetPathInfo (
|
|||||||
if (PathInfo->Input) {
|
if (PathInfo->Input) {
|
||||||
// If path is file path, check whether file is valid.
|
// If path is file path, check whether file is valid.
|
||||||
printf("Path = %s\n",PathInfo->Path);
|
printf("Path = %s\n",PathInfo->Path);
|
||||||
f = fopen (PathInfo->Path, "r");
|
f = fopen (LongFilePath (PathInfo->Path), "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
fprintf (stderr, "Test error E2003: File was not provided!\n");
|
fprintf (stderr, "Test error E2003: File was not provided!\n");
|
||||||
return ErrorPath;
|
return ErrorPath;
|
||||||
@ -211,7 +211,7 @@ ProcessBsOrMbr (
|
|||||||
FILE *OutputFile;
|
FILE *OutputFile;
|
||||||
|
|
||||||
|
|
||||||
InputFile = fopen(InputInfo->PhysicalPath, "r");
|
InputFile = fopen (LongFilePath (InputInfo->PhysicalPath), "r");
|
||||||
if (InputFile == NULL) {
|
if (InputFile == NULL) {
|
||||||
return ErrorFileReadWrite;
|
return ErrorFileReadWrite;
|
||||||
}
|
}
|
||||||
@ -235,9 +235,9 @@ ProcessBsOrMbr (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Process Floppy Disk
|
//Process Floppy Disk
|
||||||
OutputFile = fopen(OutputInfo->PhysicalPath, "r+");
|
OutputFile = fopen (LongFilePath (OutputInfo->PhysicalPath), "r+");
|
||||||
if (OutputFile == NULL) {
|
if (OutputFile == NULL) {
|
||||||
OutputFile = fopen(OutputInfo->PhysicalPath, "w");
|
OutputFile = fopen (LongFilePath (OutputInfo->PhysicalPath), "w");
|
||||||
if (OutputFile == NULL) {
|
if (OutputFile == NULL) {
|
||||||
return ErrorFileReadWrite;
|
return ErrorFileReadWrite;
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ Version (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
printf ("%s v%d.%d %s-Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
printf ("%s v%d.%d %s-Utility to retrieve and update the boot sector or MBR.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||||
printf ("Copyright (c) 2007-2010 Intel Corporation. All rights reserved.\n");
|
printf ("Copyright (c) 2007-2014 Intel Corporation. All rights reserved.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Split a file into two pieces at the request offset.
|
Split a file into two pieces at the request offset.
|
||||||
|
|
||||||
Copyright (c) 1999 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
@ -58,7 +58,7 @@ Returns:
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
|
||||||
printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");
|
printf ("Copyright (c) 1999-2014 Intel Corporation. All rights reserved.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -348,7 +348,7 @@ Returns:
|
|||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
In = fopen (InputFileName, "rb");
|
In = fopen (LongFilePath (InputFileName), "rb");
|
||||||
if (In == NULL) {
|
if (In == NULL) {
|
||||||
// ("Unable to open file \"%s\"\n", InputFileName);
|
// ("Unable to open file \"%s\"\n", InputFileName);
|
||||||
Error (InputFileName, 0, 1, "File open failure", NULL);
|
Error (InputFileName, 0, 1, "File open failure", NULL);
|
||||||
@ -400,14 +400,14 @@ Returns:
|
|||||||
chdir(CurrentDir);
|
chdir(CurrentDir);
|
||||||
free(CurrentDir);
|
free(CurrentDir);
|
||||||
|
|
||||||
Out1 = fopen (OutFileName1, "wb");
|
Out1 = fopen (LongFilePath (OutFileName1), "wb");
|
||||||
if (Out1 == NULL) {
|
if (Out1 == NULL) {
|
||||||
// ("Unable to open file \"%s\"\n", OutFileName1);
|
// ("Unable to open file \"%s\"\n", OutFileName1);
|
||||||
Error (OutFileName1, 0, 1, "File open failure", NULL);
|
Error (OutFileName1, 0, 1, "File open failure", NULL);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
Out2 = fopen (OutFileName2, "wb");
|
Out2 = fopen (LongFilePath (OutFileName2), "wb");
|
||||||
if (Out2 == NULL) {
|
if (Out2 == NULL) {
|
||||||
// ("Unable to open file \"%s\"\n", OutFileName2);
|
// ("Unable to open file \"%s\"\n", OutFileName2);
|
||||||
Error (OutFileName2, 0, 1, "File open failure", NULL);
|
Error (OutFileName2, 0, 1, "File open failure", NULL);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
VfrCompiler main class and main function.
|
VfrCompiler main class and main function.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -413,7 +413,7 @@ CVfrCompiler::Usage (
|
|||||||
CONST CHAR8 *Help[] = {
|
CONST CHAR8 *Help[] = {
|
||||||
" ",
|
" ",
|
||||||
"VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION,
|
"VfrCompile version " VFR_COMPILER_VERSION __BUILD_VERSION,
|
||||||
"Copyright (c) 2004-2013 Intel Corporation. All rights reserved.",
|
"Copyright (c) 2004-2014 Intel Corporation. All rights reserved.",
|
||||||
" ",
|
" ",
|
||||||
"Usage: VfrCompile [options] VfrFile",
|
"Usage: VfrCompile [options] VfrFile",
|
||||||
" ",
|
" ",
|
||||||
@ -476,7 +476,7 @@ CVfrCompiler::PreProcess (
|
|||||||
goto Out;
|
goto Out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pVfrFile = fopen (mOptions.VfrFileName, "r")) == NULL) {
|
if ((pVfrFile = fopen (LongFilePath (mOptions.VfrFileName), "r")) == NULL) {
|
||||||
DebugError (NULL, 0, 0001, "Error opening the input VFR file", mOptions.VfrFileName);
|
DebugError (NULL, 0, 0001, "Error opening the input VFR file", mOptions.VfrFileName);
|
||||||
goto Fail;
|
goto Fail;
|
||||||
}
|
}
|
||||||
@ -545,7 +545,7 @@ CVfrCompiler::Compile (
|
|||||||
gCVfrErrorHandle.SetInputFile (InFileName);
|
gCVfrErrorHandle.SetInputFile (InFileName);
|
||||||
gCVfrErrorHandle.SetWarningAsError(mOptions.WarningAsError);
|
gCVfrErrorHandle.SetWarningAsError(mOptions.WarningAsError);
|
||||||
|
|
||||||
if ((pInFile = fopen (InFileName, "r")) == NULL) {
|
if ((pInFile = fopen (LongFilePath (InFileName), "r")) == NULL) {
|
||||||
DebugError (NULL, 0, 0001, "Error opening the input file", InFileName);
|
DebugError (NULL, 0, 0001, "Error opening the input file", InFileName);
|
||||||
goto Fail;
|
goto Fail;
|
||||||
}
|
}
|
||||||
@ -699,7 +699,7 @@ CVfrCompiler::GenBinary (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mOptions.CreateIfrPkgFile == TRUE) {
|
if (mOptions.CreateIfrPkgFile == TRUE) {
|
||||||
if ((pFile = fopen (mOptions.PkgOutputFileName, "wb")) == NULL) {
|
if ((pFile = fopen (LongFilePath (mOptions.PkgOutputFileName), "wb")) == NULL) {
|
||||||
DebugError (NULL, 0, 0001, "Error opening file", mOptions.PkgOutputFileName);
|
DebugError (NULL, 0, 0001, "Error opening file", mOptions.PkgOutputFileName);
|
||||||
goto Fail;
|
goto Fail;
|
||||||
}
|
}
|
||||||
@ -742,7 +742,7 @@ CVfrCompiler::GenCFile (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mOptions.CreateIfrPkgFile || mOptions.CompatibleMode) {
|
if (!mOptions.CreateIfrPkgFile || mOptions.CompatibleMode) {
|
||||||
if ((pFile = fopen (mOptions.COutputFileName, "w")) == NULL) {
|
if ((pFile = fopen (LongFilePath (mOptions.COutputFileName), "w")) == NULL) {
|
||||||
DebugError (NULL, 0, 0001, "Error opening output C file", mOptions.COutputFileName);
|
DebugError (NULL, 0, 0001, "Error opening output C file", mOptions.COutputFileName);
|
||||||
goto Fail;
|
goto Fail;
|
||||||
}
|
}
|
||||||
@ -789,12 +789,12 @@ CVfrCompiler::GenRecordListFile (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pInFile = fopen (InFileName, "r")) == NULL) {
|
if ((pInFile = fopen (LongFilePath (InFileName), "r")) == NULL) {
|
||||||
DebugError (NULL, 0, 0001, "Error opening the input VFR preprocessor output file", InFileName);
|
DebugError (NULL, 0, 0001, "Error opening the input VFR preprocessor output file", InFileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pOutFile = fopen (mOptions.RecordListFile, "w")) == NULL) {
|
if ((pOutFile = fopen (LongFilePath (mOptions.RecordListFile), "w")) == NULL) {
|
||||||
DebugError (NULL, 0, 0001, "Error opening the record list file", mOptions.RecordListFile);
|
DebugError (NULL, 0, 0001, "Error opening the record list file", mOptions.RecordListFile);
|
||||||
goto Err1;
|
goto Err1;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Vfr common library functions.
|
Vfr common library functions.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,6 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
|
#include "CommonLib.h"
|
||||||
#include "VfrUtilityLib.h"
|
#include "VfrUtilityLib.h"
|
||||||
#include "VfrFormPkg.h"
|
#include "VfrFormPkg.h"
|
||||||
|
|
||||||
@ -3283,7 +3284,7 @@ CVfrStringDB::GetVarStoreNameFormStringId (
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pInFile = fopen (mStringFileName, "rb")) == NULL) {
|
if ((pInFile = fopen (LongFilePath (mStringFileName), "rb")) == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Open the file containing the FV
|
// Open the file containing the FV
|
||||||
//
|
//
|
||||||
InputFile = fopen (argv[0], "rb");
|
InputFile = fopen (LongFilePath (argv[0]), "rb");
|
||||||
if (InputFile == NULL) {
|
if (InputFile == NULL) {
|
||||||
Error (NULL, 0, 0001, "Error opening the input file", argv[0]);
|
Error (NULL, 0, 0001, "Error opening the input file", argv[0]);
|
||||||
return GetUtilityStatus ();
|
return GetUtilityStatus ();
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
## Import Modules
|
## Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import os.path as path
|
import os.path as path
|
||||||
import copy
|
import copy
|
||||||
@ -26,6 +26,7 @@ from StringIO import StringIO
|
|||||||
from StrGather import *
|
from StrGather import *
|
||||||
from BuildEngine import BuildRule
|
from BuildEngine import BuildRule
|
||||||
|
|
||||||
|
from Common.LongFilePathSupport import CopyLongFilePath
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
from Common.Misc import *
|
from Common.Misc import *
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# The engine for building files
|
# The engine for building files
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,10 +14,11 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import copy
|
import copy
|
||||||
import string
|
import string
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
from Common.GlobalData import *
|
from Common.GlobalData import *
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to generate DEPEX file for module's dependency expression
|
# This file is used to generate DEPEX file for module's dependency expression
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -13,10 +13,10 @@
|
|||||||
## Import Modules
|
## Import Modules
|
||||||
#
|
#
|
||||||
import sys
|
import sys
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from struct import pack
|
from struct import pack
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Create makefile for MS nmake and GNU make
|
# Create makefile for MS nmake and GNU make
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -13,11 +13,12 @@
|
|||||||
|
|
||||||
## Import Modules
|
## Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import sys
|
import sys
|
||||||
import string
|
import string
|
||||||
import re
|
import re
|
||||||
import os.path as path
|
import os.path as path
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from Common.Misc import *
|
from Common.Misc import *
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -20,6 +20,7 @@ from Common.BuildToolError import *
|
|||||||
from UniClassObject import *
|
from UniClassObject import *
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from struct import pack
|
from struct import pack
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
##
|
##
|
||||||
# Static definitions
|
# Static definitions
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,13 +14,13 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os, codecs, re
|
import Common.LongFilePathOs as os, codecs, re
|
||||||
import distutils.util
|
import distutils.util
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from Common.String import GetLineNo
|
from Common.String import GetLineNo
|
||||||
from Common.Misc import PathClass
|
from Common.Misc import PathClass
|
||||||
|
from Common.LongFilePathSupport import LongFilePath
|
||||||
##
|
##
|
||||||
# Static definitions
|
# Static definitions
|
||||||
#
|
#
|
||||||
@ -210,7 +210,7 @@ class UniFileClassObject(object):
|
|||||||
Lang = distutils.util.split_quoted((Line.split(u"//")[0]))
|
Lang = distutils.util.split_quoted((Line.split(u"//")[0]))
|
||||||
if len(Lang) != 3:
|
if len(Lang) != 3:
|
||||||
try:
|
try:
|
||||||
FileIn = codecs.open(File.Path, mode='rb', encoding='utf-16').read()
|
FileIn = codecs.open(LongFilePath(File.Path), mode='rb', encoding='utf-16').read()
|
||||||
except UnicodeError, X:
|
except UnicodeError, X:
|
||||||
EdkLogger.error("build", FILE_READ_FAILURE, "File read failure: %s" % str(X), ExtraData=File);
|
EdkLogger.error("build", FILE_READ_FAILURE, "File read failure: %s" % str(X), ExtraData=File);
|
||||||
except:
|
except:
|
||||||
@ -292,7 +292,7 @@ class UniFileClassObject(object):
|
|||||||
EdkLogger.error("Unicode File Parser", FILE_NOT_FOUND, ExtraData=File.Path)
|
EdkLogger.error("Unicode File Parser", FILE_NOT_FOUND, ExtraData=File.Path)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
FileIn = codecs.open(File.Path, mode='rb', encoding='utf-16').readlines()
|
FileIn = codecs.open(LongFilePath(File.Path), mode='rb', encoding='utf-16').readlines()
|
||||||
except UnicodeError, X:
|
except UnicodeError, X:
|
||||||
EdkLogger.error("build", FILE_READ_FAILURE, "File read failure: %s" % str(X), ExtraData=File.Path);
|
EdkLogger.error("build", FILE_READ_FAILURE, "File read failure: %s" % str(X), ExtraData=File.Path);
|
||||||
except:
|
except:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# file of PCD layout for use during the build when the platform integrator selects to use
|
# file of PCD layout for use during the build when the platform integrator selects to use
|
||||||
# automatic offset calculation.
|
# automatic offset calculation.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -20,7 +20,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import sys
|
import sys
|
||||||
import encodings.ascii
|
import encodings.ascii
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# This file include GenVpd class for fix the Vpd type PCD offset, and PcdEntry for describe
|
# This file include GenVpd class for fix the Vpd type PCD offset, and PcdEntry for describe
|
||||||
# and process each entry of vpd type PCD.
|
# and process each entry of vpd type PCD.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -13,12 +13,12 @@
|
|||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import StringIO
|
import StringIO
|
||||||
import StringTable as st
|
import StringTable as st
|
||||||
import array
|
import array
|
||||||
import re
|
import re
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from struct import *
|
from struct import *
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import Common.BuildToolError as BuildToolError
|
import Common.BuildToolError as BuildToolError
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to create a database used by ECC tool
|
# This file is used to create a database used by ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
import EdkLogger as EdkLogger
|
import EdkLogger as EdkLogger
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define each component of DEC file
|
# This file is used to define each component of DEC file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from String import *
|
from String import *
|
||||||
from DataType import *
|
from DataType import *
|
||||||
from Identification import *
|
from Identification import *
|
||||||
@ -26,6 +26,7 @@ from Table.TableDec import TableDec
|
|||||||
import Database
|
import Database
|
||||||
from Parsing import *
|
from Parsing import *
|
||||||
import GlobalData
|
import GlobalData
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
#
|
#
|
||||||
# Global variable
|
# Global variable
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Define a dictionary structure
|
# Define a dictionary structure
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
import EdkLogger
|
import EdkLogger
|
||||||
from DataType import *
|
from DataType import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Convert a text file to a dictionary
|
## Convert a text file to a dictionary
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define each component of DSC file
|
# This file is used to define each component of DSC file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import EdkLogger as EdkLogger
|
import EdkLogger as EdkLogger
|
||||||
import Database
|
import Database
|
||||||
from String import *
|
from String import *
|
||||||
@ -28,6 +28,7 @@ from BuildToolError import *
|
|||||||
from Misc import sdict
|
from Misc import sdict
|
||||||
import GlobalData
|
import GlobalData
|
||||||
from Table.TableDsc import TableDsc
|
from Table.TableDsc import TableDsc
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
#
|
#
|
||||||
# Global variable
|
# Global variable
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This is the base class for applications that operate on an EDK II Workspace
|
# This is the base class for applications that operate on an EDK II Workspace
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,8 +14,9 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os, sys, time
|
import Common.LongFilePathOs as os, sys, time
|
||||||
from DataType import *
|
from DataType import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## EdkIIWorkspace
|
## EdkIIWorkspace
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define each component of the build database
|
# This file is used to define each component of the build database
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os, string, copy, pdb, copy
|
import Common.LongFilePathOs as os, string, copy, pdb, copy
|
||||||
import EdkLogger
|
import EdkLogger
|
||||||
import DataType
|
import DataType
|
||||||
from InfClassObject import *
|
from InfClassObject import *
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file implements the log mechanism for Python tools.
|
# This file implements the log mechanism for Python tools.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
## Import modules
|
## Import modules
|
||||||
import sys, os, logging
|
import Common.LongFilePathOs as os, sys, logging
|
||||||
import traceback
|
import traceback
|
||||||
from BuildToolError import *
|
from BuildToolError import *
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# parse FDF file
|
# parse FDF file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -16,9 +16,10 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import re
|
import re
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
import CommonDataClass.FdfClass
|
import CommonDataClass.FdfClass
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
##define T_CHAR_SPACE ' '
|
##define T_CHAR_SPACE ' '
|
||||||
##define T_CHAR_NULL '\0'
|
##define T_CHAR_NULL '\0'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define each component of INF file
|
# This file is used to define each component of INF file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import EdkLogger
|
import EdkLogger
|
||||||
from CommonDataClass.CommonClass import LibraryClassClass
|
from CommonDataClass.CommonClass import LibraryClassClass
|
||||||
@ -29,6 +29,7 @@ import GlobalData
|
|||||||
from Table.TableInf import TableInf
|
from Table.TableInf import TableInf
|
||||||
import Database
|
import Database
|
||||||
from Parsing import *
|
from Parsing import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
#
|
#
|
||||||
# Global variable
|
# Global variable
|
||||||
|
73
BaseTools/Source/Python/Common/LongFilePathOs.py
Normal file
73
BaseTools/Source/Python/Common/LongFilePathOs.py
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
## @file
|
||||||
|
# Override built in module os to provide support for long file path
|
||||||
|
#
|
||||||
|
# Copyright (c) 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
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
|
import LongFilePathOsPath
|
||||||
|
from Common.LongFilePathSupport import LongFilePath
|
||||||
|
from Common.LongFilePathSupport import UniToStr
|
||||||
|
|
||||||
|
path = LongFilePathOsPath
|
||||||
|
|
||||||
|
def access(path, mode):
|
||||||
|
return os.access(LongFilePath(path), mode)
|
||||||
|
|
||||||
|
def remove(path):
|
||||||
|
return os.remove(LongFilePath(path))
|
||||||
|
|
||||||
|
def removedirs(name):
|
||||||
|
return os.removedirs(LongFilePath(name))
|
||||||
|
|
||||||
|
def rmdir(path):
|
||||||
|
return os.rmdir(LongFilePath(path))
|
||||||
|
|
||||||
|
def mkdir(path):
|
||||||
|
return os.mkdir(LongFilePath(path))
|
||||||
|
|
||||||
|
def makedirs(name, mode=0777):
|
||||||
|
return os.makedirs(LongFilePath(name), mode)
|
||||||
|
|
||||||
|
def rename(old, new):
|
||||||
|
return os.rename(LongFilePath(old), LongFilePath(new))
|
||||||
|
|
||||||
|
def chdir(path):
|
||||||
|
return os.chdir(LongFilePath(path))
|
||||||
|
|
||||||
|
def chmod(path, mode):
|
||||||
|
return os.chmod(LongFilePath(path), mode)
|
||||||
|
|
||||||
|
def stat(path):
|
||||||
|
return os.stat(LongFilePath(path))
|
||||||
|
|
||||||
|
def utime(path):
|
||||||
|
return os.utime(LongFilePath(path), None)
|
||||||
|
|
||||||
|
def listdir(path):
|
||||||
|
List = []
|
||||||
|
uList = os.listdir(u"%s" % LongFilePath(path))
|
||||||
|
for Item in uList:
|
||||||
|
List.append(UniToStr(Item))
|
||||||
|
return List
|
||||||
|
|
||||||
|
environ = os.environ
|
||||||
|
getcwd = os.getcwd
|
||||||
|
chdir = os.chdir
|
||||||
|
walk = os.walk
|
||||||
|
W_OK = os.W_OK
|
||||||
|
F_OK = os.F_OK
|
||||||
|
sep = os.sep
|
||||||
|
linesep = os.linesep
|
||||||
|
getenv = os.getenv
|
||||||
|
pathsep = os.pathsep
|
||||||
|
name = os.name
|
||||||
|
SEEK_SET = os.SEEK_SET
|
||||||
|
SEEK_END = os.SEEK_END
|
51
BaseTools/Source/Python/Common/LongFilePathOsPath.py
Normal file
51
BaseTools/Source/Python/Common/LongFilePathOsPath.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
## @file
|
||||||
|
# Override built in module os.path to provide support for long file path
|
||||||
|
#
|
||||||
|
# Copyright (c) 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
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
|
from Common.LongFilePathSupport import LongFilePath
|
||||||
|
|
||||||
|
def isfile(path):
|
||||||
|
return os.path.isfile(LongFilePath(path))
|
||||||
|
|
||||||
|
def isdir(path):
|
||||||
|
return os.path.isdir(LongFilePath(path))
|
||||||
|
|
||||||
|
def exists(path):
|
||||||
|
return os.path.exists(LongFilePath(path))
|
||||||
|
|
||||||
|
def getsize(filename):
|
||||||
|
return os.path.getsize(LongFilePath(filename))
|
||||||
|
|
||||||
|
def getmtime(filename):
|
||||||
|
return os.path.getmtime(LongFilePath(filename))
|
||||||
|
|
||||||
|
def getatime(filename):
|
||||||
|
return os.path.getatime(LongFilePath(filename))
|
||||||
|
|
||||||
|
def getctime(filename):
|
||||||
|
return os.path.getctime(LongFilePath(filename))
|
||||||
|
|
||||||
|
join = os.path.join
|
||||||
|
splitext = os.path.splitext
|
||||||
|
splitdrive = os.path.splitdrive
|
||||||
|
split = os.path.split
|
||||||
|
abspath = os.path.abspath
|
||||||
|
basename = os.path.basename
|
||||||
|
commonprefix = os.path.commonprefix
|
||||||
|
sep = os.path.sep
|
||||||
|
normpath = os.path.normpath
|
||||||
|
normcase = os.path.normcase
|
||||||
|
dirname = os.path.dirname
|
||||||
|
islink = os.path.islink
|
||||||
|
isabs = os.path.isabs
|
||||||
|
realpath = os.path.realpath
|
59
BaseTools/Source/Python/Common/LongFilePathSupport.py
Normal file
59
BaseTools/Source/Python/Common/LongFilePathSupport.py
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
## @file
|
||||||
|
# Override built in function file.open to provide support for long file path
|
||||||
|
#
|
||||||
|
# Copyright (c) 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
|
||||||
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
#
|
||||||
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
##
|
||||||
|
# OpenLongPath
|
||||||
|
# Convert a file path to a long file path
|
||||||
|
#
|
||||||
|
def LongFilePath(FileName):
|
||||||
|
FileName = os.path.normpath(FileName)
|
||||||
|
if platform.system() == 'Windows':
|
||||||
|
if FileName.startswith('\\\\?\\'):
|
||||||
|
return FileName
|
||||||
|
if FileName.startswith('\\\\'):
|
||||||
|
return '\\\\?\\UNC\\' + FileName[2:]
|
||||||
|
if os.path.isabs(FileName):
|
||||||
|
return '\\\\?\\' + FileName
|
||||||
|
return FileName
|
||||||
|
|
||||||
|
##
|
||||||
|
# OpenLongFilePath
|
||||||
|
# wrap open to support opening a long file path
|
||||||
|
#
|
||||||
|
def OpenLongFilePath(FileName, Mode='r', Buffer= -1):
|
||||||
|
return open(LongFilePath(FileName), Mode, Buffer)
|
||||||
|
|
||||||
|
##
|
||||||
|
# CopyLongFilePath
|
||||||
|
# wrap copyfile to support copy a long file path
|
||||||
|
#
|
||||||
|
def CopyLongFilePath(src, dst):
|
||||||
|
with open(LongFilePath(src), 'rb') as fsrc:
|
||||||
|
with open(LongFilePath(dst), 'wb') as fdst:
|
||||||
|
shutil.copyfileobj(fsrc, fdst)
|
||||||
|
|
||||||
|
## Convert a python unicode string to a normal string
|
||||||
|
#
|
||||||
|
# Convert a python unicode string to a normal string
|
||||||
|
# UniToStr(u'I am a string') is 'I am a string'
|
||||||
|
#
|
||||||
|
# @param Uni: The python unicode string
|
||||||
|
#
|
||||||
|
# @retval: The formatted normal string
|
||||||
|
#
|
||||||
|
def UniToStr(Uni):
|
||||||
|
return repr(Uni)[2:-1]
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Contains several utilitities shared by migration tools.
|
# Contains several utilitities shared by migration tools.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,13 +14,14 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import EdkLogger
|
import EdkLogger
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from XmlRoutines import *
|
from XmlRoutines import *
|
||||||
from CommonDataClass.CommonClass import *
|
from CommonDataClass.CommonClass import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Set all fields of CommonClass object.
|
## Set all fields of CommonClass object.
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Common routines used by all tools
|
# Common routines used by all tools
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import sys
|
import sys
|
||||||
import string
|
import string
|
||||||
import thread
|
import thread
|
||||||
@ -32,6 +32,7 @@ from DataType import *
|
|||||||
from BuildToolError import *
|
from BuildToolError import *
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
from Parsing import GetSplitValueList
|
from Parsing import GetSplitValueList
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Regular expression used to find out place holders in string template
|
## Regular expression used to find out place holders in string template
|
||||||
gPlaceholderPattern = re.compile("\$\{([^$()\s]+)\}", re.MULTILINE|re.UNICODE)
|
gPlaceholderPattern = re.compile("\$\{([^$()\s]+)\}", re.MULTILINE|re.UNICODE)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define common string related functions used in parsing process
|
# This file is used to define common string related functions used in parsing process
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -16,13 +16,14 @@
|
|||||||
#
|
#
|
||||||
import re
|
import re
|
||||||
import DataType
|
import DataType
|
||||||
import os.path
|
import Common.LongFilePathOs as os
|
||||||
import string
|
import string
|
||||||
import EdkLogger as EdkLogger
|
import EdkLogger as EdkLogger
|
||||||
|
|
||||||
import GlobalData
|
import GlobalData
|
||||||
from BuildToolError import *
|
from BuildToolError import *
|
||||||
from CommonDataClass.Exceptions import *
|
from CommonDataClass.Exceptions import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
gHexVerPatt = re.compile('0x[a-f0-9]{4}[a-f0-9]{4}$', re.IGNORECASE)
|
gHexVerPatt = re.compile('0x[a-f0-9]{4}[a-f0-9]{4}$', re.IGNORECASE)
|
||||||
gHumanReadableVerPatt = re.compile(r'([1-9][0-9]*|0)\.[0-9]{1,2}$')
|
gHumanReadableVerPatt = re.compile(r'([1-9][0-9]*|0)\.[0-9]{1,2}$')
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define each component of Target.txt file
|
# This file is used to define each component of Target.txt file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,11 +14,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import EdkLogger
|
import EdkLogger
|
||||||
import DataType
|
import DataType
|
||||||
from BuildToolError import *
|
from BuildToolError import *
|
||||||
import GlobalData
|
import GlobalData
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
gDefaultTargetTxtFile = "Conf/target.txt"
|
gDefaultTargetTxtFile = "Conf/target.txt"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define each component of tools_def.txt file
|
# This file is used to define each component of tools_def.txt file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,13 +14,14 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import EdkLogger
|
import EdkLogger
|
||||||
|
|
||||||
from Dictionary import *
|
from Dictionary import *
|
||||||
from BuildToolError import *
|
from BuildToolError import *
|
||||||
from TargetTxtClassObject import *
|
from TargetTxtClassObject import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
##
|
##
|
||||||
# Static variables used for pattern
|
# Static variables used for pattern
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt
|
# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,11 +15,12 @@
|
|||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import Common.BuildToolError as BuildToolError
|
import Common.BuildToolError as BuildToolError
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
FILE_COMMENT_TEMPLATE = \
|
FILE_COMMENT_TEMPLATE = \
|
||||||
"""
|
"""
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define checkpoints used by ECC tool
|
# This file is used to define checkpoints used by ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -10,7 +10,7 @@
|
|||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
from Common.DataType import SUP_MODULE_LIST_STRING, TAB_VALUE_SPLIT
|
from Common.DataType import SUP_MODULE_LIST_STRING, TAB_VALUE_SPLIT
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# preprocess source file
|
# preprocess source file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import antlr3
|
import antlr3
|
||||||
|
@ -14,10 +14,11 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
from Common.String import *
|
from Common.String import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to create a database used by ECC tool
|
# This file is used to create a database used by ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import os, time
|
import Common.LongFilePathOs as os, time
|
||||||
|
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import CommonDataClass.DataClass as DataClass
|
import CommonDataClass.DataClass as DataClass
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os, time, glob, sys
|
import Common.LongFilePathOs as os, time, glob, sys
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import Database
|
import Database
|
||||||
import EccGlobalData
|
import EccGlobalData
|
||||||
@ -37,6 +37,7 @@ from MetaFileWorkspace.MetaFileTable import MetaFileStorage
|
|||||||
import c
|
import c
|
||||||
import re, string
|
import re, string
|
||||||
from Exception import *
|
from Exception import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Ecc
|
## Ecc
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to save global datas used by ECC tool
|
# This file is used to save global datas used by ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
gWorkspace = ''
|
gWorkspace = ''
|
||||||
gTarget = ''
|
gTarget = ''
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to parse exception items found by ECC tool
|
# This file is used to parse exception items found by ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from Xml.XmlRoutines import *
|
from Xml.XmlRoutines import *
|
||||||
import os.path
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
# ExceptionXml to parse Exception Node of XML file
|
# ExceptionXml to parse Exception Node of XML file
|
||||||
class ExceptionXml(object):
|
class ExceptionXml(object):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# fragments of source file
|
# fragments of source file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,8 +17,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from ParserWarning import Warning
|
from ParserWarning import Warning
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
CommentList = []
|
CommentList = []
|
||||||
PPDirectiveList = []
|
PPDirectiveList = []
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to define common parser functions for meta-data
|
# This file is used to define common parser functions for meta-data
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -11,7 +11,7 @@
|
|||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
from EccToolError import *
|
from EccToolError import *
|
||||||
import EccGlobalData
|
import EccGlobalData
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to create/update/query/erase table for files
|
# This file is used to create/update/query/erase table for files
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
from CommonDataClass import DataClass
|
from CommonDataClass import DataClass
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import copy
|
import copy
|
||||||
@ -31,7 +31,8 @@ from Common.Expression import *
|
|||||||
from CommonDataClass.Exceptions import *
|
from CommonDataClass.Exceptions import *
|
||||||
|
|
||||||
from MetaFileTable import MetaFileStorage
|
from MetaFileTable import MetaFileStorage
|
||||||
from GenFds.FdfParser import FdfParser
|
from GenFds.FdfParser import FdfParser
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## A decorator used to parse macro definition
|
## A decorator used to parse macro definition
|
||||||
def ParseMacro(Parser):
|
def ParseMacro(Parser):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# This is an XML API that uses a syntax similar to XPath, but it is written in
|
# This is an XML API that uses a syntax similar to XPath, but it is written in
|
||||||
# standard python so that no extra python packages are required to use it.
|
# standard python so that no extra python packages are required to use it.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -16,6 +16,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Create a element of XML
|
## Create a element of XML
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to be the c coding style checking of ECC tool
|
# This file is used to be the c coding style checking of ECC tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
import CodeFragmentCollector
|
import CodeFragmentCollector
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# preprocess source file
|
# preprocess source file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -16,7 +16,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import re
|
import re
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import antlr3
|
import antlr3
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to create a database used by EOT tool
|
# This file is used to create a database used by EOT tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import os, time
|
import Common.LongFilePathOs as os, time
|
||||||
|
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import CommonDataClass.DataClass as DataClass
|
import CommonDataClass.DataClass as DataClass
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to be the main entrance of EOT tool
|
# This file is used to be the main entrance of EOT tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os, time, glob
|
import Common.LongFilePathOs as os, time, glob
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import EotGlobalData
|
import EotGlobalData
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
@ -30,6 +30,7 @@ from Report import Report
|
|||||||
from Common.Misc import ParseConsoleLog
|
from Common.Misc import ParseConsoleLog
|
||||||
from Common.BuildVersion import gBUILD_VERSION
|
from Common.BuildVersion import gBUILD_VERSION
|
||||||
from Parser import ConvertGuid
|
from Parser import ConvertGuid
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Class Eot
|
## Class Eot
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to save global datas
|
# This file is used to save global datas
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -12,6 +12,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from Common.Misc import sdict
|
from Common.Misc import sdict
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
gEFI_SOURCE = ''
|
gEFI_SOURCE = ''
|
||||||
gEDK_SOURCE = ''
|
gEDK_SOURCE = ''
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# fragments of source file
|
# fragments of source file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,8 +17,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from ParserWarning import Warning
|
from ParserWarning import Warning
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
# Profile contents of a file
|
# Profile contents of a file
|
||||||
PPDirectiveList = []
|
PPDirectiveList = []
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Parse FV image
|
# Parse FV image
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
## Import Modules
|
## Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
@ -24,7 +24,7 @@ import copy
|
|||||||
from UserDict import IterableUserDict
|
from UserDict import IterableUserDict
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from array import array
|
from array import array
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from CommonDataClass import *
|
from CommonDataClass import *
|
||||||
from Common.Misc import sdict, GuidStructureStringToGuidString
|
from Common.Misc import sdict, GuidStructureStringToGuidString
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to parse INF file of EDK project
|
# This file is used to parse INF file of EDK project
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# This file is used to define common parsing related functions used in parsing
|
# This file is used to define common parsing related functions used in parsing
|
||||||
# Inf/Dsc/Makefile process
|
# Inf/Dsc/Makefile process
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os, re
|
import Common.LongFilePathOs as os, re
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
@ -23,6 +23,7 @@ from Common.String import CleanString, GetSplitValueList, ReplaceMacro
|
|||||||
import EotGlobalData
|
import EotGlobalData
|
||||||
from Common.Misc import sdict
|
from Common.Misc import sdict
|
||||||
from Common.String import GetSplitList
|
from Common.String import GetSplitList
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## PreProcess() method
|
## PreProcess() method
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to create report for Eot tool
|
# This file is used to create report for Eot tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,8 +14,9 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import EotGlobalData
|
import EotGlobalData
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Report() class
|
## Report() class
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# preprocess source file
|
# preprocess source file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -16,7 +16,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import sys
|
import sys
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import CodeFragmentCollector
|
import CodeFragmentCollector
|
||||||
import FileProfile
|
import FileProfile
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process APRIORI file data and generate PEI/DXE APRIORI file
|
# process APRIORI file data and generate PEI/DXE APRIORI file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -16,7 +16,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from struct import *
|
from struct import *
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import StringIO
|
import StringIO
|
||||||
import FfsFileStatement
|
import FfsFileStatement
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# generate capsule
|
# generate capsule
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import CapsuleClassObject
|
from CommonDataClass.FdfClass import CapsuleClassObject
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import subprocess
|
import subprocess
|
||||||
import StringIO
|
import StringIO
|
||||||
from Common.Misc import SaveFileOnChange
|
from Common.Misc import SaveFileOnChange
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process compress section generation
|
# process compress section generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process data section generation
|
# process data section generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -19,10 +19,10 @@ import Section
|
|||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from Ffs import Ffs
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import DataSectionClassObject
|
from CommonDataClass.FdfClass import DataSectionClassObject
|
||||||
from Common.Misc import PeImageClass
|
from Common.Misc import PeImageClass
|
||||||
import shutil
|
from Common.LongFilePathSupport import CopyLongFilePath
|
||||||
|
|
||||||
## generate data section
|
## generate data section
|
||||||
#
|
#
|
||||||
@ -71,9 +71,8 @@ class DataSection (DataSectionClassObject):
|
|||||||
MapFile = Filename.replace('.efi', '.map')
|
MapFile = Filename.replace('.efi', '.map')
|
||||||
if os.path.exists(MapFile):
|
if os.path.exists(MapFile):
|
||||||
CopyMapFile = os.path.join(OutputPath, ModuleName + '.map')
|
CopyMapFile = os.path.join(OutputPath, ModuleName + '.map')
|
||||||
if not os.path.exists(CopyMapFile) or \
|
if not os.path.exists(CopyMapFile) or (os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)):
|
||||||
(os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)):
|
CopyLongFilePath(MapFile, CopyMapFile)
|
||||||
shutil.copyfile(MapFile, CopyMapFile)
|
|
||||||
|
|
||||||
#Get PE Section alignment when align is set to AUTO
|
#Get PE Section alignment when align is set to AUTO
|
||||||
if self.Alignment == 'Auto' and self.SecType in ('TE', 'PE32'):
|
if self.Alignment == 'Auto' and self.SecType in ('TE', 'PE32'):
|
||||||
@ -92,7 +91,7 @@ class DataSection (DataSectionClassObject):
|
|||||||
FileBeforeStrip = os.path.join(OutputPath, ModuleName + '.efi')
|
FileBeforeStrip = os.path.join(OutputPath, ModuleName + '.efi')
|
||||||
if not os.path.exists(FileBeforeStrip) or \
|
if not os.path.exists(FileBeforeStrip) or \
|
||||||
(os.path.getmtime(self.SectFileName) > os.path.getmtime(FileBeforeStrip)):
|
(os.path.getmtime(self.SectFileName) > os.path.getmtime(FileBeforeStrip)):
|
||||||
shutil.copyfile(self.SectFileName, FileBeforeStrip)
|
CopyLongFilePath(self.SectFileName, FileBeforeStrip)
|
||||||
StrippedFile = os.path.join(OutputPath, ModuleName + '.stripped')
|
StrippedFile = os.path.join(OutputPath, ModuleName + '.stripped')
|
||||||
GenFdsGlobalVariable.GenerateFirmwareImage(
|
GenFdsGlobalVariable.GenerateFirmwareImage(
|
||||||
StrippedFile,
|
StrippedFile,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process depex section generation
|
# process depex section generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -19,10 +19,9 @@ import Section
|
|||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from Ffs import Ffs
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import DepexSectionClassObject
|
from CommonDataClass.FdfClass import DepexSectionClassObject
|
||||||
from AutoGen.GenDepex import DependencyExpression
|
from AutoGen.GenDepex import DependencyExpression
|
||||||
import shutil
|
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
|
||||||
|
@ -20,12 +20,13 @@ import Section
|
|||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from Ffs import Ffs
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import EfiSectionClassObject
|
from CommonDataClass.FdfClass import EfiSectionClassObject
|
||||||
import shutil
|
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from Common.Misc import PeImageClass
|
from Common.Misc import PeImageClass
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
from Common.LongFilePathSupport import CopyLongFilePath
|
||||||
|
|
||||||
## generate rule section
|
## generate rule section
|
||||||
#
|
#
|
||||||
@ -237,14 +238,14 @@ class EfiSection (EfiSectionClassObject):
|
|||||||
if os.path.exists(MapFile):
|
if os.path.exists(MapFile):
|
||||||
CopyMapFile = os.path.join(OutputPath, ModuleName + '.map')
|
CopyMapFile = os.path.join(OutputPath, ModuleName + '.map')
|
||||||
if not os.path.exists(CopyMapFile) or \
|
if not os.path.exists(CopyMapFile) or \
|
||||||
(os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)):
|
(os.path.getmtime(MapFile) > os.path.getmtime(CopyMapFile)):
|
||||||
shutil.copyfile(MapFile, CopyMapFile)
|
CopyLongFilePath(MapFile, CopyMapFile)
|
||||||
|
|
||||||
if not NoStrip:
|
if not NoStrip:
|
||||||
FileBeforeStrip = os.path.join(OutputPath, ModuleName + '.efi')
|
FileBeforeStrip = os.path.join(OutputPath, ModuleName + '.efi')
|
||||||
if not os.path.exists(FileBeforeStrip) or \
|
if not os.path.exists(FileBeforeStrip) or \
|
||||||
(os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):
|
(os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):
|
||||||
shutil.copyfile(File, FileBeforeStrip)
|
CopyLongFilePath(File, FileBeforeStrip)
|
||||||
StrippedFile = os.path.join(OutputPath, ModuleName + '.stripped')
|
StrippedFile = os.path.join(OutputPath, ModuleName + '.stripped')
|
||||||
GenFdsGlobalVariable.GenerateFirmwareImage(
|
GenFdsGlobalVariable.GenerateFirmwareImage(
|
||||||
StrippedFile,
|
StrippedFile,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process FD generation
|
# process FD generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
import Region
|
import Region
|
||||||
import Fv
|
import Fv
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import StringIO
|
import StringIO
|
||||||
import sys
|
import sys
|
||||||
from struct import *
|
from struct import *
|
||||||
|
@ -55,7 +55,8 @@ from Common.String import ReplaceMacro
|
|||||||
from Common.Misc import tdict
|
from Common.Misc import tdict
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
##define T_CHAR_SPACE ' '
|
##define T_CHAR_SPACE ' '
|
||||||
##define T_CHAR_NULL '\0'
|
##define T_CHAR_NULL '\0'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process FFS generation from FILE statement
|
# process FFS generation from FILE statement
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
import Ffs
|
import Ffs
|
||||||
import Rule
|
import Rule
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import StringIO
|
import StringIO
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process FFS generation from INF statement
|
# process FFS generation from INF statement
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -16,8 +16,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Rule
|
import Rule
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import shutil
|
|
||||||
import StringIO
|
import StringIO
|
||||||
from struct import *
|
from struct import *
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
@ -38,6 +37,8 @@ from FvImageSection import FvImageSection
|
|||||||
from Common.Misc import PeImageClass
|
from Common.Misc import PeImageClass
|
||||||
from AutoGen.GenDepex import DependencyExpression
|
from AutoGen.GenDepex import DependencyExpression
|
||||||
from PatchPcdValue.PatchPcdValue import PatchBinaryFile
|
from PatchPcdValue.PatchPcdValue import PatchBinaryFile
|
||||||
|
from Common.LongFilePathSupport import CopyLongFilePath
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## generate FFS from INF
|
## generate FFS from INF
|
||||||
#
|
#
|
||||||
@ -322,7 +323,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
|||||||
return EfiFile
|
return EfiFile
|
||||||
Basename = os.path.basename(EfiFile)
|
Basename = os.path.basename(EfiFile)
|
||||||
Output = os.path.join(self.OutputPath, Basename)
|
Output = os.path.join(self.OutputPath, Basename)
|
||||||
shutil.copy(EfiFile, Output)
|
CopyLongFilePath(EfiFile, Output)
|
||||||
for Pcd in self.PatchPcds:
|
for Pcd in self.PatchPcds:
|
||||||
RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Pcd.DefaultValue, Pcd.MaxDatumSize)
|
RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Pcd.DefaultValue, Pcd.MaxDatumSize)
|
||||||
if RetVal:
|
if RetVal:
|
||||||
@ -648,8 +649,8 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
|||||||
if not NoStrip:
|
if not NoStrip:
|
||||||
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
|
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
|
||||||
if not os.path.exists(FileBeforeStrip) or \
|
if not os.path.exists(FileBeforeStrip) or \
|
||||||
(os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):
|
(os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):
|
||||||
shutil.copyfile(File, FileBeforeStrip)
|
CopyLongFilePath(File, FileBeforeStrip)
|
||||||
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')
|
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')
|
||||||
GenFdsGlobalVariable.GenerateFirmwareImage(
|
GenFdsGlobalVariable.GenerateFirmwareImage(
|
||||||
StrippedFile,
|
StrippedFile,
|
||||||
@ -687,8 +688,9 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
|||||||
if not NoStrip:
|
if not NoStrip:
|
||||||
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
|
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
|
||||||
if not os.path.exists(FileBeforeStrip) or \
|
if not os.path.exists(FileBeforeStrip) or \
|
||||||
(os.path.getmtime(GenSecInputFile) > os.path.getmtime(FileBeforeStrip)):
|
(os.path.getmtime(GenSecInputFile) > os.path.getmtime(FileBeforeStrip)):
|
||||||
shutil.copyfile(GenSecInputFile, FileBeforeStrip)
|
CopyLongFilePath(GenSecInputFile, FileBeforeStrip)
|
||||||
|
|
||||||
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')
|
StrippedFile = os.path.join(self.OutputPath, ModuleName + '.stipped')
|
||||||
GenFdsGlobalVariable.GenerateFirmwareImage(
|
GenFdsGlobalVariable.GenerateFirmwareImage(
|
||||||
StrippedFile,
|
StrippedFile,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process FV generation
|
# process FV generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -15,8 +15,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import shutil
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import StringIO
|
import StringIO
|
||||||
from struct import *
|
from struct import *
|
||||||
@ -27,6 +26,8 @@ from GenFdsGlobalVariable import GenFdsGlobalVariable
|
|||||||
from GenFds import GenFds
|
from GenFds import GenFds
|
||||||
from CommonDataClass.FdfClass import FvClassObject
|
from CommonDataClass.FdfClass import FvClassObject
|
||||||
from Common.Misc import SaveFileOnChange
|
from Common.Misc import SaveFileOnChange
|
||||||
|
from Common.LongFilePathSupport import CopyLongFilePath
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
T_CHAR_LF = '\n'
|
T_CHAR_LF = '\n'
|
||||||
|
|
||||||
@ -128,7 +129,7 @@ class FV (FvClassObject):
|
|||||||
FvOutputFile = self.CreateFileName
|
FvOutputFile = self.CreateFileName
|
||||||
|
|
||||||
FvInfoFileName = os.path.join(GenFdsGlobalVariable.FfsDir, self.UiFvName + '.inf')
|
FvInfoFileName = os.path.join(GenFdsGlobalVariable.FfsDir, self.UiFvName + '.inf')
|
||||||
shutil.copy(GenFdsGlobalVariable.FvAddressFileName, FvInfoFileName)
|
CopyLongFilePath(GenFdsGlobalVariable.FvAddressFileName, FvInfoFileName)
|
||||||
OrigFvInfo = None
|
OrigFvInfo = None
|
||||||
if os.path.exists (FvInfoFileName):
|
if os.path.exists (FvInfoFileName):
|
||||||
OrigFvInfo = open(FvInfoFileName, 'r').read()
|
OrigFvInfo = open(FvInfoFileName, 'r').read()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process FV image section generation
|
# process FV image section generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -20,7 +20,7 @@ import StringIO
|
|||||||
from Ffs import Ffs
|
from Ffs import Ffs
|
||||||
import subprocess
|
import subprocess
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import FvImageSectionClassObject
|
from CommonDataClass.FdfClass import FvImageSectionClassObject
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# generate flash image
|
# generate flash image
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import sys
|
import sys
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import linecache
|
import linecache
|
||||||
import FdfParser
|
import FdfParser
|
||||||
import Common.BuildToolError as BuildToolError
|
import Common.BuildToolError as BuildToolError
|
||||||
@ -42,7 +42,7 @@ from Common.BuildVersion import gBUILD_VERSION
|
|||||||
## Version and Copyright
|
## Version and Copyright
|
||||||
versionNumber = "1.0" + ' ' + gBUILD_VERSION
|
versionNumber = "1.0" + ' ' + gBUILD_VERSION
|
||||||
__version__ = "%prog Version " + versionNumber
|
__version__ = "%prog Version " + versionNumber
|
||||||
__copyright__ = "Copyright (c) 2007 - 2013, Intel Corporation All rights reserved."
|
__copyright__ = "Copyright (c) 2007 - 2014, Intel Corporation All rights reserved."
|
||||||
|
|
||||||
## Tool entrance method
|
## Tool entrance method
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Global variables for GenFds
|
# Global variables for GenFds
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -15,7 +15,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import struct
|
import struct
|
||||||
@ -30,6 +30,7 @@ from Common.ToolDefClassObject import ToolDefClassObject
|
|||||||
from AutoGen.BuildEngine import BuildRule
|
from AutoGen.BuildEngine import BuildRule
|
||||||
import Common.DataType as DataType
|
import Common.DataType as DataType
|
||||||
from Common.Misc import PathClass
|
from Common.Misc import PathClass
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## Global variables
|
## Global variables
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process GUIDed section generation
|
# process GUIDed section generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -18,7 +18,7 @@
|
|||||||
import Section
|
import Section
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from Ffs import Ffs
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import GuidSectionClassObject
|
from CommonDataClass.FdfClass import GuidSectionClassObject
|
||||||
from Common import ToolDefClassObject
|
from Common import ToolDefClassObject
|
||||||
@ -26,6 +26,7 @@ import sys
|
|||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from FvImageSection import FvImageSection
|
from FvImageSection import FvImageSection
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## generate GUIDed section
|
## generate GUIDed section
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process OptionROM generation from FILE statement
|
# process OptionROM generation from FILE statement
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -15,7 +15,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
##
|
##
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process OptionROM generation
|
# process OptionROM generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -15,8 +15,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import shutil
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import StringIO
|
import StringIO
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process FD Region generation
|
# process FD Region generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -19,10 +19,11 @@ from struct import *
|
|||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import StringIO
|
import StringIO
|
||||||
from CommonDataClass.FdfClass import RegionClassObject
|
from CommonDataClass.FdfClass import RegionClassObject
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from stat import *
|
from stat import *
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## generate Region
|
## generate Region
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# section base class
|
# section base class
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007-2011, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007-2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
from CommonDataClass.FdfClass import SectionClassObject
|
from CommonDataClass.FdfClass import SectionClassObject
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import os, glob
|
import Common.LongFilePathOs as os, glob
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process UI section generation
|
# process UI section generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -18,9 +18,10 @@
|
|||||||
import Section
|
import Section
|
||||||
from Ffs import Ffs
|
from Ffs import Ffs
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import UiSectionClassObject
|
from CommonDataClass.FdfClass import UiSectionClassObject
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## generate UI section
|
## generate UI section
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process Version section generation
|
# process Version section generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -17,10 +17,11 @@
|
|||||||
#
|
#
|
||||||
from Ffs import Ffs
|
from Ffs import Ffs
|
||||||
import Section
|
import Section
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import subprocess
|
import subprocess
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import VerSectionClassObject
|
from CommonDataClass.FdfClass import VerSectionClassObject
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
## generate version section
|
## generate version section
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# process VTF generation
|
# process VTF generation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -16,8 +16,9 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import VtfClassObject
|
from CommonDataClass.FdfClass import VtfClassObject
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
T_CHAR_LF = '\n'
|
T_CHAR_LF = '\n'
|
||||||
|
|
||||||
## generate VTF
|
## generate VTF
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# PCD Name Offset in binary
|
# PCD Name Offset in binary
|
||||||
# ======== ================
|
# ======== ================
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2013, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#====================================== External Libraries ========================================
|
#====================================== External Libraries ========================================
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import array
|
import array
|
||||||
|
|
||||||
@ -26,6 +26,7 @@ from Common.BuildToolError import *
|
|||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
from Common.Misc import PeImageClass
|
from Common.Misc import PeImageClass
|
||||||
from Common.BuildVersion import gBUILD_VERSION
|
from Common.BuildVersion import gBUILD_VERSION
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
# Version and Copyright
|
# Version and Copyright
|
||||||
__version_number__ = ("0.10" + " " + gBUILD_VERSION)
|
__version_number__ = ("0.10" + " " + gBUILD_VERSION)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Patch value into the binary file.
|
# Patch value into the binary file.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -14,7 +14,8 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to create/update/query/erase table for ECC reports
|
# This file is used to create/update/query/erase table for ECC reports
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import os, time
|
import Common.LongFilePathOs as os, time
|
||||||
from Table import Table
|
from Table import Table
|
||||||
from Common.String import ConvertToSqlString2
|
from Common.String import ConvertToSqlString2
|
||||||
import Eot.EotToolError as EotToolError
|
import Eot.EotToolError as EotToolError
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# This file is used to create/update/query/erase table for files
|
# This file is used to create/update/query/erase table for files
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -17,7 +17,7 @@
|
|||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
from Table import Table
|
from Table import Table
|
||||||
from Common.String import ConvertToSqlString
|
from Common.String import ConvertToSqlString
|
||||||
import os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.DataClass import FileClass
|
from CommonDataClass.DataClass import FileClass
|
||||||
|
|
||||||
## TableFile
|
## TableFile
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user