diff --git a/BaseTools/ImageTool/ImageTool.c b/BaseTools/ImageTool/ImageTool.c index 5d93b009bd..90ee6b8eff 100644 --- a/BaseTools/ImageTool/ImageTool.c +++ b/BaseTools/ImageTool/ImageTool.c @@ -355,7 +355,6 @@ GenExecutable ( IN const char *InputFileName, IN const char *FormatName, IN const char *TypeName, - IN const char *HiiFileName, IN const char *BaseAddress, IN bool Strip, IN bool FixedAddress @@ -365,8 +364,6 @@ GenExecutable ( VOID *InputFile; int8_t Format; int32_t Type; - UINT32 HiiFileSize; - VOID *HiiFile; RETURN_STATUS Status; UINT64 NewBaseAddress; void *OutputFile; @@ -405,24 +402,12 @@ GenExecutable ( return RETURN_ABORTED; } - HiiFile = NULL; - HiiFileSize = 0; - if (HiiFileName != NULL) { - HiiFile = UserReadFile (HiiFileName, &HiiFileSize); - if (HiiFile == NULL) { - fprintf (stderr, "ImageTool: Could not open %s: %s\n", HiiFileName, strerror (errno)); - return RETURN_ABORTED; - } - } - OutputFile = ToolImageEmit ( &OutputFileSize, InputFile, InputFileSize, Format, Type, - HiiFile, - HiiFileSize, BaseAddress != NULL, NewBaseAddress, InputFileName, @@ -431,7 +416,6 @@ GenExecutable ( ); if (OutputFile == NULL) { - free (HiiFile); return RETURN_ABORTED; } @@ -450,7 +434,6 @@ int main (int argc, const char *argv[]) const char *InputName; const char *FormatName; const char *TypeName; - const char *HiiFileName; const char *BaseAddress; bool Strip; bool FixedAddress; @@ -469,7 +452,7 @@ int main (int argc, const char *argv[]) if (strcmp (argv[1], "GenImage") == 0) { if (argc < 5) { fprintf (stderr, "ImageTool: Command arguments are missing\n"); - fprintf (stderr, " Usage: ImageTool GenImage [-c Format] [-t ModuleType] [-h HiiRc] [-b BaseAddress] [-s] [-f] -o OutputFile InputFile\n"); + fprintf (stderr, " Usage: ImageTool GenImage [-c Format] [-t ModuleType] [-b BaseAddress] [-s] [-f] -o OutputFile InputFile\n"); raise (); return -1; } @@ -478,7 +461,6 @@ int main (int argc, const char *argv[]) InputName = NULL; FormatName = NULL; TypeName = NULL; - HiiFileName = NULL; BaseAddress = NULL; Strip = false; FixedAddress = false; @@ -507,14 +489,6 @@ int main (int argc, const char *argv[]) } TypeName = argv[ArgIndex]; - } else if (strcmp (argv[ArgIndex], "-h") == 0) { - ++ArgIndex; - if (ArgIndex == argc) { - fprintf (stderr, "Must specify an argument to -h\n"); - return -1; - } - - HiiFileName = argv[ArgIndex]; } else if (strcmp (argv[ArgIndex], "-b") == 0) { ++ArgIndex; if (ArgIndex == argc) { @@ -552,7 +526,6 @@ int main (int argc, const char *argv[]) InputName, FormatName, TypeName, - HiiFileName, BaseAddress, Strip, FixedAddress diff --git a/BaseTools/ImageTool/ImageToolEmit.c b/BaseTools/ImageTool/ImageToolEmit.c index f1ae55b507..90d153235e 100644 --- a/BaseTools/ImageTool/ImageToolEmit.c +++ b/BaseTools/ImageTool/ImageToolEmit.c @@ -91,8 +91,6 @@ ToolImageEmit ( IN uint32_t BufferSize, IN int8_t Format, IN int32_t Type, - IN void *HiiFile, - IN uint32_t HiiFileSize, IN bool Relocate, IN uint64_t BaseAddress, IN const char *SymbolsPath OPTIONAL, @@ -136,13 +134,6 @@ ToolImageEmit ( ImageInfo.HeaderInfo.Subsystem = (uint16_t)Type; } - if (HiiFile != NULL) { - free (ImageInfo.HiiInfo.Data); - - ImageInfo.HiiInfo.Data = HiiFile; - ImageInfo.HiiInfo.DataSize = HiiFileSize; - } - ToolImageSortRelocs (&ImageInfo); Success = CheckToolImage (&ImageInfo); diff --git a/BaseTools/ImageTool/ImageToolEmit.h b/BaseTools/ImageTool/ImageToolEmit.h index 32828feaa7..868e627c2a 100644 --- a/BaseTools/ImageTool/ImageToolEmit.h +++ b/BaseTools/ImageTool/ImageToolEmit.h @@ -17,8 +17,6 @@ ToolImageEmit ( IN uint32_t BufferSize, IN int8_t Format, IN int32_t Type, - IN void *HiiFile, - IN uint32_t HiiFileSize, IN bool Relocate, IN uint64_t BaseAddress, IN const char *SymbolsPath OPTIONAL, diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c index 7115b6145e..d0de35e9ed 100644 --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c @@ -3851,8 +3851,6 @@ Returns: UefiImageFileSize, ImageFormat, -1, - NULL, - 0, true, NewBaseAddress, NULL, diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c index c16d07ca11..d36b1c83e9 100644 --- a/BaseTools/Source/C/VolInfo/VolInfo.c +++ b/BaseTools/Source/C/VolInfo/VolInfo.c @@ -1453,8 +1453,6 @@ Returns: FileBufferSize, -1, -1, - NULL, - 0, true, NewBaseAddress, NULL,