Jump to content

Clover General discussion


ErmaC
30,134 posts in this topic

Recommended Posts

36 minutes ago, Jief_Machak said:

Yes. The others are in my Xcode unit tests projects and are not used for Clover EFI.

 

Modify Bootlog.cpp, rebuild... Test on Z390 from USB

 

XCODE8 Build:

When I use Bootloader Chooser selected from F12: 'press any key to continue' message after select efi file
When I use normal USB selected from F12: instant return to BIOS boot chooser

GCC53 Build:

When I use Bootloader Chooser selected from F12: I can boot BS

When I use normal USB selected from F12: I can boot BS

Edited by Matgen84
Link to comment
Share on other sites

in rEFIt_UEFI/refit/main.cpp, remove line 2570 "#define DEBUG_ERALY_CRASH" and 2 line lower "#endif"

Then, if you don't have message "Start" at the beginning, the crash is not in Clover, which seems impossible.

Let's assume you'll have it.

Then, move these down :

  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start");
  PauseForKey(L"1) press any key\n");

line 2599.

If now you can't see it : move up.

If you still see the message : move down

 

No need to go past line 2627, because it's MsgLog, which should have printed something on the console. So the crash is before.

 

Link to comment
Share on other sites

I realize there is a new thing on line 2612 "DataHubInstall (ImageHandle, SystemTable);"

Maybe it's in there.

 

Also, to go quicker. Instead of moving the 2 lines, just duplicate 

SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start");

and change the message.

Like


#ifdef DEBUG_ERALY_CRASH
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start");
  PauseForKey(L"1) press any key\n");
#endif

#ifdef DEBUG_ON_SERIAL_PORT
  SerialPortInitialize();
#endif
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start1");

  {
    EFI_LOADED_IMAGE* LoadedImage;
    Status = gBS->HandleProtocol(gImageHandle, &gEfiLoadedImageProtocolGuid, (void **) &LoadedImage);

//    if ( !EFI_ERROR(Status) ) {
//      XString8 msg = S8Printf("Clover : Image base = 0x%llX\n", (uintptr_t)LoadedImage->ImageBase); // do not change, it's used by grep to feed the debugger
//      SerialPortWrite((UINT8*)msg.c_str(), msg.length());
//    }
    if ( !EFI_ERROR(Status) ) DBG("CloverX64 : Image base = 0x%llX\n", (uintptr_t)LoadedImage->ImageBase); // do not change, it's used by grep to feed the debugger

#ifdef JIEF_DEBUG
    gBS->Stall(1500000); // to give time to gdb to connect
//  gBS->Stall(0500000); // to give time to gdb to connect
//  PauseForKey(L"press\n");
#endif
  }
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start2");

#ifdef CLOVER_BUILD
  construct_globals_objects(gImageHandle); // do this after self.getSelfLoadedImage() is initialized
#endif
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start3");

#ifdef JIEF_DEBUG
//  all_tests();
//  PauseForKey(L"press\n");
#endif

  gRT->GetTime(&Now, NULL);
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start4");

  // firmware detection
  gFirmwareClover = StrCmp(gST->FirmwareVendor, L"CLOVER") == 0;
  if (!gFirmwareRevision) {
//    gFirmwareRevision = P__oolPrint(L"%d", gST->FirmwareRevision);
  }
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start5");
  DataHubInstall (ImageHandle, SystemTable);
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start6");
  InitializeConsoleSim();
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start7");
  InitBooterLog();
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start8");
  ZeroMem((void*)&gGraphics[0], sizeof(GFX_PROPERTIES) * 4);
  ZeroMem((void*)&gAudios[0], sizeof(HDA_PROPERTIES) * 4);

  DBG("\n");
  if (Now.TimeZone < -1440 || Now.TimeZone > 1440) {
    MsgLog("Now is %02d.%02d.%d,  %02d:%02d:%02d (GMT)\n",
           Now.Day, Now.Month, Now.Year, Now.Hour, Now.Minute, Now.Second);
  } else {
    MsgLog("Now is %02d.%02d.%d,  %02d:%02d:%02d (GMT+%d)\n",
      Now.Day, Now.Month, Now.Year, Now.Hour, Now.Minute, Now.Second, gSettings.GUI.Timezone);
  }
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start10");
  //MsgLog("Starting Clover rev %ls on %ls EFI\n", gFirmwareRevision, gST->FirmwareVendor);
  MsgLog("Starting %s on %ls EFI\n", gRevisionStr, gST->FirmwareVendor);
  MsgLog("Build id: %s\n", gBuildId.c_str());
  if ( gBuildInfo ) DBG("Build with: [%s]\n", gBuildInfo);

You can copy and paste this in main.cpp.

 

Link to comment
Share on other sites

3 hours ago, Matgen84 said:

Hi @Slice @Jief_Machak 

 

I have annoying issue with r5129 commit d66a14ae3 (IvyBridge config - Mojave): at start, black screen instead of Clover GUI :cry: I don't understand why. Don't try on Z390 and Big Sur 11.3 Beta

Any one have this problem or just me.

no problem detected in starting Z68, Z97, Z370, X570

try the clover i compiled

 

CLOVERX64-5129-d66a14ae3.efi.zip

Link to comment
Share on other sites

21 minutes ago, Jief_Machak said:

I realize there is a new thing on line 2612 "DataHubInstall (ImageHandle, SystemTable);"

Maybe it's in there.

 

Also, to go quicker. Instead of moving the 2 lines, just duplicate 


SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start");

and change the message.

Like



#ifdef DEBUG_ERALY_CRASH
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start");
  PauseForKey(L"1) press any key\n");
#endif

#ifdef DEBUG_ON_SERIAL_PORT
  SerialPortInitialize();
#endif
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start1");

  {
    EFI_LOADED_IMAGE* LoadedImage;
    Status = gBS->HandleProtocol(gImageHandle, &gEfiLoadedImageProtocolGuid, (void **) &LoadedImage);

//    if ( !EFI_ERROR(Status) ) {
//      XString8 msg = S8Printf("Clover : Image base = 0x%llX\n", (uintptr_t)LoadedImage->ImageBase); // do not change, it's used by grep to feed the debugger
//      SerialPortWrite((UINT8*)msg.c_str(), msg.length());
//    }
    if ( !EFI_ERROR(Status) ) DBG("CloverX64 : Image base = 0x%llX\n", (uintptr_t)LoadedImage->ImageBase); // do not change, it's used by grep to feed the debugger

#ifdef JIEF_DEBUG
    gBS->Stall(1500000); // to give time to gdb to connect
//  gBS->Stall(0500000); // to give time to gdb to connect
//  PauseForKey(L"press\n");
#endif
  }
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start2");

#ifdef CLOVER_BUILD
  construct_globals_objects(gImageHandle); // do this after self.getSelfLoadedImage() is initialized
#endif
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start3");

#ifdef JIEF_DEBUG
//  all_tests();
//  PauseForKey(L"press\n");
#endif

  gRT->GetTime(&Now, NULL);
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start4");

  // firmware detection
  gFirmwareClover = StrCmp(gST->FirmwareVendor, L"CLOVER") == 0;
  if (!gFirmwareRevision) {
//    gFirmwareRevision = P__oolPrint(L"%d", gST->FirmwareRevision);
  }
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start5");
  DataHubInstall (ImageHandle, SystemTable);
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start6");
  InitializeConsoleSim();
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start7");
  InitBooterLog();
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start8");
  ZeroMem((void*)&gGraphics[0], sizeof(GFX_PROPERTIES) * 4);
  ZeroMem((void*)&gAudios[0], sizeof(HDA_PROPERTIES) * 4);

  DBG("\n");
  if (Now.TimeZone < -1440 || Now.TimeZone > 1440) {
    MsgLog("Now is %02d.%02d.%d,  %02d:%02d:%02d (GMT)\n",
           Now.Day, Now.Month, Now.Year, Now.Hour, Now.Minute, Now.Second);
  } else {
    MsgLog("Now is %02d.%02d.%d,  %02d:%02d:%02d (GMT+%d)\n",
      Now.Day, Now.Month, Now.Year, Now.Hour, Now.Minute, Now.Second, gSettings.GUI.Timezone);
  }
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Start10");
  //MsgLog("Starting Clover rev %ls on %ls EFI\n", gFirmwareRevision, gST->FirmwareVendor);
  MsgLog("Starting %s on %ls EFI\n", gRevisionStr, gST->FirmwareVendor);
  MsgLog("Build id: %s\n", gBuildId.c_str());
  if ( gBuildInfo ) DBG("Build with: [%s]\n", gBuildInfo);

You can copy and paste this in main.cpp.

 

 

 

Same issue with Bootloader Chooser and USB normal :cry:

Link to comment
Share on other sites

4 minutes ago, Matgen84 said:

 

Thanks. :) Do use XCODE or GCC to build ? I've only problem with XCODE.

XCODE usage
I normally click build, 
menu 10 then menu 7

Z370 --> Catalina --> XCODE 12.4

  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, iCanaro said:

XCODE usage
I normally click build, 
menu 10 then menu 7

Z370 --> Catalina --> XCODE 12.4

 

I use XCODE 11.3.1 (Mojave 10.14.6) IvyBridge - Z77 to build Clover. Don't use my Z390 for building Clover 

Link to comment
Share on other sites

12 minutes ago, Matgen84 said:

 

I use XCODE 11.3.1 (Mojave 10.14.6) IvyBridge - Z77 to build Clover. Don't use my Z390 for building Clover 

I can only report you some experience, for example on the AMD X570 I can almost never compile, always some mistake whatever it does; with mojave and the same XCODE release that you use, compilation always happens successfully, but often it happened that the Clover produced then did not work.
From me compiling on the Z370 is much more reliable.

25 minutes ago, Jief_Machak said:

Interesting, you are "InsanelyMacaholic", I am "teh 1337n3ss!" !

you've been mis-compiling status today on insanely mac :hysterical:

  • Like 1
Link to comment
Share on other sites

36 minutes ago, Jief_Machak said:

You should see : 

 

 

Screenshot 2021-02-08 at 14.08.15.png

If you see that and you press a key and you see Clover, it may be an Xcode bug ???

Did you try iCanaro efi too ?

 

What you describe is exactly what's happen: text message (BootLoader Chooser), after hit a key, the Clover GUI appears few seconds later. Why there is a XCODE bug ???
Remember I use XCODE 11.3.1 (Mojave, Ivybridge Asus z77)

Link to comment
Share on other sites

20 minutes ago, Jief_Machak said:

Sorry, but I'm lost. You said that your xcode compilation doesn't work. iCanaro xcode compiled efi and mine works. Looks like an xcode bug, isn't it ?

So now, replace main.cpp by this one main.cpp, compile with xcode and try. What's on the screen ?

 

 

On screen: Press any text * Hit any key to continue * :cry:
 

@iCanaro use XCODE 12.4 (Catalina). I use XCODE 11.3.1 (Mojave). I don't know if there is a bug depending on the version.

Link to comment
Share on other sites

2 minutes ago, Matgen84 said:

To solve my problem, what do you think if I reinstall XCODE 11.3.1

I would definitely try
xcode removal, macOS restart, and xcode reinstall and start them to end installation

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...