Sync EDKII BaseTools to BaseTools project r2093.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11057 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -20,6 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "fat.h"
|
||||
#include "mbr.h"
|
||||
#include "EfiUtilityMsgs.h"
|
||||
#include "ParseInf.h"
|
||||
|
||||
#define DEBUG_WARN 0x1
|
||||
#define DEBUG_ERROR 0x2
|
||||
@@ -845,7 +846,9 @@ main (
|
||||
BOOLEAN ProcessMbr; // -m
|
||||
BOOLEAN DoParse; // -p SrcImage or -g SrcImage DstImage
|
||||
BOOLEAN Verbose; // -v
|
||||
|
||||
UINT64 LogLevel;
|
||||
EFI_STATUS EfiStatus;
|
||||
|
||||
SrcImage = DstImage = NULL;
|
||||
ForcePatch = FALSE;
|
||||
ProcessMbr = FALSE;
|
||||
@@ -886,6 +889,23 @@ main (
|
||||
ProcessMbr = TRUE;
|
||||
} else if (strcmp (*argv, "-v") == 0 || strcmp (*argv, "--verbose") == 0) {
|
||||
Verbose = TRUE;
|
||||
} else if ((stricmp (*argv, "-d") == 0) || (stricmp (*argv, "--debug") == 0)) {
|
||||
argc--; argv++;
|
||||
if (argc < 1) {
|
||||
Usage ();
|
||||
return -1;
|
||||
}
|
||||
EfiStatus = AsciiStringToUint64 (*argv, FALSE, &LogLevel);
|
||||
if (EFI_ERROR (EfiStatus)) {
|
||||
Error (NULL, 0, 1003, "Invalid option value", "%s = %s", "--debug", *argv);
|
||||
return 1;
|
||||
}
|
||||
if (LogLevel > 9) {
|
||||
Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0-9, currnt input level is %d", (int) LogLevel);
|
||||
return 1;
|
||||
}
|
||||
SetPrintLevel (LogLevel);
|
||||
DebugMsg (NULL, 0, 9, "Debug Mode Set", "Debug Output Mode Level %s is set!", *argv);
|
||||
} else {
|
||||
Usage ();
|
||||
return -1;
|
||||
|
@@ -105,23 +105,22 @@ ConvertVersionInfo (
|
||||
/*++
|
||||
Routine Description:
|
||||
|
||||
This function converts GUID string to GUID
|
||||
This function split version to major version and minor version
|
||||
|
||||
Arguments:
|
||||
|
||||
Str - String representing in form XX.XX
|
||||
MajorVer - The major vertion
|
||||
MinorVer - The minor vertion
|
||||
MajorVer - The major version
|
||||
MinorVer - The minor version
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - The fuction completed successfully.
|
||||
EFI_SUCCESS - The function completed successfully.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR8 StrPtr[40];
|
||||
CHAR8 *Token;
|
||||
UINTN Length;
|
||||
unsigned Major;
|
||||
unsigned Minor;
|
||||
|
||||
@@ -135,10 +134,9 @@ Returns:
|
||||
Token = strtok (NULL, ".");
|
||||
}
|
||||
|
||||
Length = strlen (StrPtr);
|
||||
sscanf (
|
||||
StrPtr,
|
||||
"%01x%02x",
|
||||
"%02d%02d",
|
||||
&Major,
|
||||
&Minor
|
||||
);
|
||||
|
@@ -235,10 +235,13 @@ ProcessBsOrMbr (
|
||||
}
|
||||
|
||||
//Process Floppy Disk
|
||||
OutputFile = fopen(OutputInfo->PhysicalPath, "w");
|
||||
OutputFile = fopen(OutputInfo->PhysicalPath, "r+");
|
||||
if (OutputFile == NULL) {
|
||||
return ErrorFileReadWrite;
|
||||
}
|
||||
OutputFile = fopen(OutputInfo->PhysicalPath, "w");
|
||||
if (OutputFile == NULL) {
|
||||
return ErrorFileReadWrite;
|
||||
}
|
||||
}
|
||||
|
||||
if (OutputInfo->Type != PathFile) {
|
||||
if (ProcessMbr) {
|
||||
|
@@ -149,13 +149,13 @@ typedef INT64 INTN;
|
||||
//
|
||||
// Processor specific defines
|
||||
//
|
||||
#define MAX_BIT 0x8000000000000000
|
||||
#define MAX_2_BITS 0xC000000000000000
|
||||
#define MAX_BIT 0x8000000000000000ULL
|
||||
#define MAX_2_BITS 0xC000000000000000ULL
|
||||
|
||||
//
|
||||
// Maximum legal Itanium-based address
|
||||
//
|
||||
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF
|
||||
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
|
||||
|
||||
//
|
||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
|
||||
|
@@ -1,10 +1,10 @@
|
||||
## @file
|
||||
#
|
||||
# The makefile can be invoked with
|
||||
# ARCH = x86_64 or x64 for EM64T build
|
||||
# ARCH = ia32 or IA32 for IA32 build
|
||||
# ARCH = ia64 or IA64 for IA64 build
|
||||
#
|
||||
# The makefile can be invoked with
|
||||
# ARCH = x86_64 or x64 for EM64T build
|
||||
# ARCH = ia32 or IA32 for IA32 build
|
||||
# ARCH = ia64 or IA64 for IA64 build
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, 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
|
||||
@@ -12,52 +12,56 @@
|
||||
# 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.
|
||||
|
||||
ARCH ?= IA32
|
||||
|
||||
CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
|
||||
LINUX:=$(findstring Linux, $(shell uname -s))
|
||||
DARWIN:=$(findstring Darwin, $(shell uname -s))
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = gcc
|
||||
AR = ar
|
||||
LD = ld
|
||||
LINKER ?= $(CC)
|
||||
ifeq ($(ARCH), IA32)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), X64)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/X64/
|
||||
endif
|
||||
|
||||
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
|
||||
CPPFLAGS = $(INCLUDE)
|
||||
CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g
|
||||
LFLAGS =
|
||||
|
||||
#
|
||||
# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns -i386, but gcc defaults
|
||||
# to x86_64. So make sure tools match uname -m
|
||||
#
|
||||
uname_s = $(shell uname -s)
|
||||
ifeq ($(uname_s),Darwin)
|
||||
CFLAGS += -arch i386
|
||||
CPPFLAGS += -arch i386
|
||||
LFLAGS += -arch i386
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
.PHONY: install
|
||||
.PHONY: clean
|
||||
|
||||
all:
|
||||
|
||||
$(MAKEROOT)/libs:
|
||||
mkdir $(MAKEROOT)/libs
|
||||
|
||||
$(MAKEROOT)/bin:
|
||||
mkdir $(MAKEROOT)/bin
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
ARCH ?= IA32
|
||||
|
||||
CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
|
||||
LINUX:=$(findstring Linux, $(shell uname -s))
|
||||
DARWIN:=$(findstring Darwin, $(shell uname -s))
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
AS = gcc
|
||||
AR = ar
|
||||
LD = ld
|
||||
LINKER ?= $(CC)
|
||||
ifeq ($(ARCH), IA32)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), X64)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/X64/
|
||||
endif
|
||||
|
||||
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
|
||||
CPPFLAGS = $(INCLUDE)
|
||||
CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g
|
||||
LFLAGS =
|
||||
|
||||
ifeq ($(ARCH), IA32)
|
||||
#
|
||||
# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
|
||||
# to x86_64. So make sure tools match uname -m. You can manual have a 64-bit kernal on Snow Leopard
|
||||
# so only do this is uname -m returns i386.
|
||||
#
|
||||
uname_s = $(shell uname -s)
|
||||
ifeq ($(uname_s),Darwin)
|
||||
CFLAGS += -arch i386
|
||||
CPPFLAGS += -arch i386
|
||||
LFLAGS += -arch i386
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all
|
||||
.PHONY: install
|
||||
.PHONY: clean
|
||||
|
||||
all:
|
||||
|
||||
$(MAKEROOT)/libs:
|
||||
mkdir $(MAKEROOT)/libs
|
||||
|
||||
$(MAKEROOT)/bin:
|
||||
mkdir $(MAKEROOT)/bin
|
||||
|
@@ -7,12 +7,12 @@
|
||||
# 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.
|
||||
|
||||
include $(MAKEROOT)/Makefiles/header.makefile
|
||||
|
||||
LIBRARY = $(MAKEROOT)/libs/lib$(LIBNAME).a
|
||||
|
||||
all: $(MAKEROOT)/libs $(LIBRARY)
|
||||
|
||||
include $(MAKEROOT)/Makefiles/footer.makefile
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
include $(MAKEROOT)/Makefiles/header.makefile
|
||||
|
||||
LIBRARY = $(MAKEROOT)/libs/lib$(LIBNAME).a
|
||||
|
||||
all: $(MAKEROOT)/libs $(LIBRARY)
|
||||
|
||||
include $(MAKEROOT)/Makefiles/footer.makefile
|
||||
|
Reference in New Issue
Block a user