Skip to content

Commit

Permalink
Better name for Preboot.
Browse files Browse the repository at this point in the history
Ordering of Preboot Main Recovery
  • Loading branch information
jief666 committed Oct 22, 2020
1 parent bef59cc commit 6a96d48
Show file tree
Hide file tree
Showing 18 changed files with 402 additions and 185 deletions.
8 changes: 6 additions & 2 deletions Include/Guid/AppleApfsInfo.h
Expand Up @@ -39,8 +39,12 @@ extern EFI_GUID gAppleApfsContainerInfoGuid;
{ 0xB4, 0x4E, 0x97, 0x45, 0x15, 0xD2, 0x7C, 0x78 } }


#define APPLE_APFS_VOLUME_ROLE_RECOVERY BIT2
#define APPLE_APFS_VOLUME_ROLE_PREBOOT BIT4
#define APPLE_APFS_VOLUME_ROLE_RECOVERY BIT2 // 0x04
#define APPLE_APFS_VOLUME_ROLE_PREBOOT BIT4 // 0x10
#define APPLE_APFS_VOLUME_ROLE_DATA BIT6 // 0x40
#define APPLE_APFS_VOLUME_ROLE_VM BIT3 // 0x08
#define APPLE_APFS_VOLUME_ROLE_SYSTEM BIT0 // 0x01 Main partition. Joint with DATA.
//#define APPLE_APFS_VOLUME_ROLE_UPDATE 0xC0 // I got 0xC0, maybe the meaning is DATA + UPDATE ?

typedef UINT32 APPLE_APFS_VOLUME_ROLE;

Expand Down
2 changes: 1 addition & 1 deletion OpenCorePkg
4 changes: 4 additions & 0 deletions Xcode/CloverX64/CloverX64.xcodeproj/project.pbxproj
Expand Up @@ -187,6 +187,7 @@
9A670D2224E53FD500B5D780 /* XBuffer_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A670D2024E53FD400B5D780 /* XBuffer_tests.cpp */; };
9A670D2324E53FD500B5D780 /* XBuffer_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A670D2124E53FD500B5D780 /* XBuffer_tests.h */; };
9A7AEDE7245963BF003AAD04 /* XToolsCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A7AEDE6245963BF003AAD04 /* XToolsCommon.h */; };
9A80B49F2540175E00E56B08 /* OC.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A80B49E2540175D00E56B08 /* OC.h */; };
9A9AEB94243F7B5600FBD7D8 /* unicode_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9AEB90243F7B5600FBD7D8 /* unicode_conversions.cpp */; };
9A9AEB97243F7B5600FBD7D8 /* unicode_conversions.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9AEB93243F7B5600FBD7D8 /* unicode_conversions.h */; };
9A9AEB99243F7B7A00FBD7D8 /* printf_lite-test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9AEB98243F7B7900FBD7D8 /* printf_lite-test.h */; };
Expand Down Expand Up @@ -787,6 +788,7 @@
9A670D2024E53FD400B5D780 /* XBuffer_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBuffer_tests.cpp; sourceTree = "<group>"; };
9A670D2124E53FD500B5D780 /* XBuffer_tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBuffer_tests.h; sourceTree = "<group>"; };
9A7AEDE6245963BF003AAD04 /* XToolsCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XToolsCommon.h; sourceTree = "<group>"; };
9A80B49E2540175D00E56B08 /* OC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OC.h; sourceTree = "<group>"; };
9A9AEB90243F7B5600FBD7D8 /* unicode_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unicode_conversions.cpp; sourceTree = "<group>"; };
9A9AEB93243F7B5600FBD7D8 /* unicode_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unicode_conversions.h; sourceTree = "<group>"; };
9A9AEB98243F7B7900FBD7D8 /* printf_lite-test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printf_lite-test.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1135,6 +1137,7 @@
9AC77F1324176C04005CDD5C /* include */ = {
isa = PBXGroup;
children = (
9A80B49E2540175D00E56B08 /* OC.h */,
9AD469542452B63300D6D0DB /* XToolsConf.h */,
9AD4694D2452B5A600D6D0DB /* Devices.h */,
9AD4694C2452B5A600D6D0DB /* Efi.h */,
Expand Down Expand Up @@ -1529,6 +1532,7 @@
9AD469552452B63300D6D0DB /* XToolsConf.h in Headers */,
9AD469512452B5A600D6D0DB /* Devices.h in Headers */,
9A28CC98241AB34800F3D247 /* XString_test.h in Headers */,
9A80B49F2540175E00E56B08 /* OC.h in Headers */,
9A61B3012522165100AEE0FA /* Self.h in Headers */,
9AC7807424176C04005CDD5C /* REFIT_MENU_SCREEN.h in Headers */,
9A105B7C24483AE40006DE06 /* StartupSound.h in Headers */,
Expand Down
2 changes: 1 addition & 1 deletion rEFIt_UEFI/Platform/BootLog.cpp
Expand Up @@ -81,7 +81,7 @@ static EFI_FILE_PROTOCOL* gLogFile = NULL;
// Just instanciante this, the destructor will restore the callback.
class SuspendMemLogCallback
{
MEM_LOG_CALLBACK memlogCallBack_saved;
MEM_LOG_CALLBACK memlogCallBack_saved = NULL;
public:
SuspendMemLogCallback() {
memlogCallBack_saved = GetMemLogCallback();
Expand Down
2 changes: 0 additions & 2 deletions rEFIt_UEFI/Platform/Hibernate.cpp
Expand Up @@ -29,8 +29,6 @@

#define CREATE_NEW_BOOT_IMAGE 1

extern XObjArray<REFIT_VOLUME> Volumes;

#pragma pack(push, 1)

//
Expand Down
2 changes: 0 additions & 2 deletions rEFIt_UEFI/Platform/LegacyBoot.cpp
Expand Up @@ -29,8 +29,6 @@ Copyright (c) 2006 JLA
#define DBG(...) DebugLog(0, __VA_ARGS__) // until a better solution is found, force DebugLog(0, ...) to prevent saving to DebugLog, which may cause legacy boot to fail
#endif

extern XObjArray<REFIT_VOLUME> Volumes;

#pragma pack(push)
#pragma pack(1)

Expand Down
2 changes: 0 additions & 2 deletions rEFIt_UEFI/Platform/Nvram.cpp
Expand Up @@ -23,8 +23,6 @@
#define DBG(...) DebugLog (DEBUG_SET, __VA_ARGS__)
#endif

extern XObjArray<REFIT_VOLUME> Volumes;

// for saving nvram.plist and it's data
TagDict* gNvramDict;

Expand Down
2 changes: 2 additions & 0 deletions rEFIt_UEFI/Platform/Posix/abort.cpp
Expand Up @@ -27,6 +27,7 @@ static void panic_(const char* format, VA_LIST va)

#ifdef CLOVER_BUILD
extern void egSetGraphicsModeEnabled(BOOLEAN);
extern const LString8 gBuildId;
#endif

#define FATAL_ERROR_MSG "\nA fatal error happened. System halted.\n"
Expand All @@ -35,6 +36,7 @@ static void panic_(const char* format, VA_LIST va)
#ifdef CLOVER_BUILD
egSetGraphicsModeEnabled(false);
#endif
printf("Clover build id: %s\n", gBuildId.c_str());
if ( format ) {
vprintf(format, va);
#ifdef DEBUG_ON_SERIAL_PORT
Expand Down
4 changes: 3 additions & 1 deletion rEFIt_UEFI/Platform/SelfOem.cpp
Expand Up @@ -135,7 +135,7 @@ EFI_STATUS SelfOem::_initialize()



if ( m_KextsDir != NULL ) panic("%s : m_KextsDir != NULL", __FUNCTION__);
if ( m_KextsDir != NULL ) panic("%s : Kexts dir != NULL.", __FUNCTION__);
if ( oemDirExists() ) {
Status = m_OemDir->Open(m_OemDir, &m_KextsDir, KEXTS_DIRNAME.wc_str(), EFI_FILE_MODE_READ, 0);
if ( !EFI_ERROR(Status) ) {
Expand Down Expand Up @@ -192,6 +192,8 @@ EFI_STATUS SelfOem::initialize(const XString8& confName, bool isFirmwareClover,

EFI_STATUS SelfOem::reInitialize()
{
if ( m_ConfName.isEmpty() ) panic("%s : initialize() must called once first", __FUNCTION__);

closeHandle();

// No need to call _setOemPathRelToSelfDir again, but need to open m_OemDir, if it exists
Expand Down
1 change: 0 additions & 1 deletion rEFIt_UEFI/entry_scan/entry_scan.h
Expand Up @@ -45,7 +45,6 @@ extern REFIT_MENU_ITEM_SHUTDOWN MenuEntryShutdown;
//extern REFIT_MENU_ENTRY MenuEntryExit;
extern REFIT_MENU_SCREEN MainMenu;

extern XObjArray<REFIT_VOLUME> Volumes;
// common
const XIcon& ScanVolumeDefaultIcon(REFIT_VOLUME *Volume, IN UINT8 OSType, const EFI_DEVICE_PATH_PROTOCOL *DevicePath);

Expand Down

0 comments on commit 6a96d48

Please sign in to comment.