mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-21 23:48:22 +08:00
Remove UEFIDump
This commit is contained in:
parent
f666fe63db
commit
6982aace9b
1
.gitignore
vendored
1
.gitignore
vendored
@ -244,5 +244,4 @@ cmake_install.cmake
|
||||
DerivedData
|
||||
*.xcodeproj
|
||||
compile_commands.json
|
||||
CMakeLists.txt
|
||||
CMakeScripts
|
||||
|
@ -1,61 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
PROJECT(UEFIDump)
|
||||
|
||||
SET(PROJECT_SOURCES
|
||||
uefidump_main.cpp
|
||||
uefidump.cpp
|
||||
../common/guiddatabase.cpp
|
||||
../common/types.cpp
|
||||
../common/descriptor.cpp
|
||||
../common/ffs.cpp
|
||||
../common/nvram.cpp
|
||||
../common/nvramparser.cpp
|
||||
../common/ffsparser.cpp
|
||||
../common/ffsreport.cpp
|
||||
../common/peimage.cpp
|
||||
../common/treeitem.cpp
|
||||
../common/treemodel.cpp
|
||||
../common/utility.cpp
|
||||
../common/LZMA/LzmaDecompress.c
|
||||
../common/LZMA/SDK/C/LzmaDec.c
|
||||
../common/Tiano/EfiTianoDecompress.c
|
||||
../common/ustring.cpp
|
||||
../common/sha256.c
|
||||
../common/bstrlib/bstrlib.c
|
||||
../common/bstrlib/bstrwrap.cpp
|
||||
)
|
||||
|
||||
SET(PROJECT_HEADERS
|
||||
uefidump.h
|
||||
../common/guiddatabase.h
|
||||
../common/basetypes.h
|
||||
../common/descriptor.h
|
||||
../common/gbe.h
|
||||
../common/me.h
|
||||
../common/ffs.h
|
||||
../common/fit.h
|
||||
../common/nvram.h
|
||||
../common/nvramparser.h
|
||||
../common/ffsparser.h
|
||||
../common/ffsreport.h
|
||||
../common/peimage.h
|
||||
../common/types.h
|
||||
../common/treeitem.h
|
||||
../common/treemodel.h
|
||||
../common/utility.h
|
||||
../common/LZMA/LzmaDecompress.h
|
||||
../common/Tiano/EfiTianoDecompress.h
|
||||
../common/ubytearray.h
|
||||
../common/ustring.h
|
||||
../common/bootguard.h
|
||||
../common/sha256.h
|
||||
../common/bstrlib/bstrlib.h
|
||||
../common/bstrlib/bstrwrap.h
|
||||
../common/filesystem.h
|
||||
../version.h
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(-DU_ENABLE_NVRAM_PARSING_SUPPORT)
|
||||
|
||||
ADD_EXECUTABLE(UEFIDump ${PROJECT_SOURCES} ${PROJECT_HEADERS})
|
@ -1,37 +0,0 @@
|
||||
/* uefidump_main.cpp
|
||||
|
||||
Copyright (c) 2018, LongSoft. All rights reserved.
|
||||
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.
|
||||
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "../version.h"
|
||||
#include "uefidump.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
if (argc > 1) {
|
||||
std::ifstream inputFile(argv[1], std::ios::in | std::ios::binary);
|
||||
if (!inputFile)
|
||||
return U_FILE_OPEN;
|
||||
std::vector<char> buffer(std::istreambuf_iterator<char>(inputFile),
|
||||
(std::istreambuf_iterator<char>()));
|
||||
inputFile.close();
|
||||
|
||||
UEFIDumper uefidumper;
|
||||
return (uefidumper.dump(buffer, UString(argv[1])) != U_SUCCESS);
|
||||
}
|
||||
|
||||
std::cout << "UEFIDump " PROGRAM_VERSION << std::endl << std::endl
|
||||
<< "Usage: UEFIDump imagefile" << std::endl;
|
||||
return 0;
|
||||
}
|
@ -5,6 +5,7 @@ PROJECT(UEFIExtract)
|
||||
SET(PROJECT_SOURCES
|
||||
uefiextract_main.cpp
|
||||
ffsdumper.cpp
|
||||
uefidump.cpp
|
||||
../common/guiddatabase.cpp
|
||||
../common/types.cpp
|
||||
../common/descriptor.cpp
|
||||
@ -28,6 +29,7 @@ SET(PROJECT_SOURCES
|
||||
|
||||
SET(PROJECT_HEADERS
|
||||
ffsdumper.h
|
||||
uefidump.h
|
||||
../common/guiddatabase.h
|
||||
../common/basetypes.h
|
||||
../common/descriptor.h
|
||||
|
@ -20,6 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "../common/ffsparser.h"
|
||||
#include "../common/ffsreport.h"
|
||||
#include "ffsdumper.h"
|
||||
#include "uefidump.h"
|
||||
|
||||
enum ReadType {
|
||||
READ_INPUT,
|
||||
@ -44,6 +45,12 @@ int main(int argc, char *argv[])
|
||||
(std::istreambuf_iterator<char>()));
|
||||
inputFile.close();
|
||||
|
||||
// Hack to support legacy UEFIDump mode.
|
||||
if (argc == 3 && !std::strcmp(argv[2], "unpack")) {
|
||||
UEFIDumper uefidumper;
|
||||
return (uefidumper.dump(buffer, UString(argv[1])) != U_SUCCESS);
|
||||
}
|
||||
|
||||
// Create model and ffsParser
|
||||
TreeModel model;
|
||||
FfsParser ffsParser(&model);
|
||||
@ -174,6 +181,7 @@ int main(int argc, char *argv[])
|
||||
std::cout << "UEFIExtract " PROGRAM_VERSION << std::endl << std::endl
|
||||
<< "Usage: UEFIExtract imagefile - generate report and dump only leaf tree items into .dump folder." << std::endl
|
||||
<< " UEFIExtract imagefile all - generate report and dump all tree items." << std::endl
|
||||
<< " UEFIExtract imagefile unpack - generate report and dump all tree items in one dir." << std::endl
|
||||
<< " UEFIExtract imagefile dump - only generate dump, no report needed." << std::endl
|
||||
<< " UEFIExtract imagefile report - only generate report, no dump needed." << std::endl
|
||||
<< " UEFIExtract imagefile GUID_1 ... [ -o FILE_1 ... ] [ -m MODE_1 ... ] [ -t TYPE_1 ... ] -" << std::endl
|
||||
|
60
UEFIFind/CMakeLists.txt
Normal file
60
UEFIFind/CMakeLists.txt
Normal file
@ -0,0 +1,60 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
PROJECT(UEFIFind)
|
||||
|
||||
SET(PROJECT_SOURCES
|
||||
uefifind_main.cpp
|
||||
uefifind.cpp
|
||||
../common/guiddatabase.cpp
|
||||
../common/types.cpp
|
||||
../common/descriptor.cpp
|
||||
../common/ffs.cpp
|
||||
../common/nvram.cpp
|
||||
../common/nvramparser.cpp
|
||||
../common/ffsparser.cpp
|
||||
../common/ffsreport.cpp
|
||||
../common/peimage.cpp
|
||||
../common/treeitem.cpp
|
||||
../common/treemodel.cpp
|
||||
../common/utility.cpp
|
||||
../common/LZMA/LzmaDecompress.c
|
||||
../common/LZMA/SDK/C/LzmaDec.c
|
||||
../common/Tiano/EfiTianoDecompress.c
|
||||
../common/ustring.cpp
|
||||
../common/sha256.c
|
||||
../common/bstrlib/bstrlib.c
|
||||
../common/bstrlib/bstrwrap.cpp
|
||||
)
|
||||
|
||||
SET(PROJECT_HEADERS
|
||||
uefifind.h
|
||||
../common/guiddatabase.h
|
||||
../common/basetypes.h
|
||||
../common/descriptor.h
|
||||
../common/gbe.h
|
||||
../common/me.h
|
||||
../common/ffs.h
|
||||
../common/nvram.h
|
||||
../common/nvramparser.h
|
||||
../common/ffsparser.h
|
||||
../common/ffsreport.h
|
||||
../common/peimage.h
|
||||
../common/types.h
|
||||
../common/treeitem.h
|
||||
../common/treemodel.h
|
||||
../common/utility.h
|
||||
../common/LZMA/LzmaDecompress.h
|
||||
../common/Tiano/EfiTianoDecompress.h
|
||||
../common/ubytearray.h
|
||||
../common/ustring.h
|
||||
../common/bootguard.h
|
||||
../common/sha256.h
|
||||
../common/filesystem.h
|
||||
../common/bstrlib/bstrlib.h
|
||||
../common/bstrlib/bstrwrap.h
|
||||
../version.h
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(-DU_ENABLE_NVRAM_PARSING_SUPPORT)
|
||||
|
||||
ADD_EXECUTABLE(UEFIFind ${PROJECT_SOURCES} ${PROJECT_HEADERS})
|
@ -113,7 +113,6 @@ rm -rf dist
|
||||
mkdir -p dist || exit 1
|
||||
|
||||
build_tool UEFITool "$UEFITOOL_VER" uefitool.pro
|
||||
build_tool UEFIDump "$UEFITOOL_VER" ""
|
||||
build_tool UEFIExtract "$UEFITOOL_VER" ""
|
||||
build_tool UEFIFind "$UEFITOOL_VER" ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user