Jump to content

can we get back the apple logo on boot?


JahStories
 Share

769 posts in this topic

Recommended Posts

i think, that implementing a "logo injector" its not a solution to get a vanilla animated boot without screen switching on and off between the 2 boot phases and the weird size of the animation...

 

but it's always a nice thing :D

Link to comment
Share on other sites

@PJALM

Give him a chance, you could implement it in clover and let us know if it worked.

I just asked because he said it was Duet not Clover he used. I was about to try his code but don't want to waste my time if it won't work is all.

 

i think, that implementing a "logo injector" its not a solution to get a vanilla animated boot without screen switching on and off between the 2 boot phases and the weird size of the animation...

 

but it's always a nice thing :D

Not sure what you mean. I don't have my screen switching on/off or weird sized loading bars. I have full native screen res at Clover and boot.

Link to comment
Share on other sites

post-221766-0-78634400-1404391351.jpg


 


its the third time that i post this :D


 


i've full resolution on clover, now on dp3 the animation is always working even without verbose and the gray square thing you see there is now black, but between the two boot phases, after the first half of bar progress my screen go black for a second and then i see the black square (and part of the login window) with the last part of bar progress and then the animation.


 


obviously without any logo.


Link to comment
Share on other sites

no problem:

 

....
  if ((OSVersion != NULL) && (AsciiStrnCmp (OSVersion, "10.10", 5) == 0)) {
    if (gSettings.YoBlack) {
      ClearScreen (0x030000, PcdGetPtr (PcdAppleWhiteLogoFile));
    } else {
      ClearScreen (0xBFBFBF, PcdGetPtr (PcdAppleGrayLogoFile));
    }
  }
 
....
 
VOID
ClearScreen (
  UINT32 HexColor,
  EFI_GUID *NameGuid
)
{
  EFI_STATUS Status;
  EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput;
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Pixel;
  EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt;
  UINT8                         *ImageData;
  UINTN                         ImageSize;
  UINTN                         BltSize;
  UINTN                         Height;
  UINTN                         Width;
  INTN                          DestX;
  INTN                          DestY;
  
 
  Status = EFI_SUCCESS;
  GraphicsOutput = NULL;
  Pixel = NULL;
  Blt = NULL;
  ImageData = NULL;
  ImageSize = 0;
 
  Status =
    gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid,
                         (VOID **) &GraphicsOutput);
  if (EFI_ERROR (Status)) {
    return;
  }
 
  CopyMem ((UINT8 *) Pixel, (UINT8 *) &HexColor,
           sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
 
  GraphicsOutput->Blt (GraphicsOutput, Pixel, EfiBltVideoFill, 0, 0, 0, 0,
                       GraphicsOutput->Mode->Info->HorizontalResolution,
                       GraphicsOutput->Mode->Info->VerticalResolution, 0);
 
  if (NameGuid != NULL) {
    Status = GetSectionFromAnyFv (
               NameGuid,
               EFI_SECTION_RAW,
               0,
               (VOID **) &ImageData,
               &ImageSize
               );
    
    if (EFI_ERROR (Status)) {
      DBG ("%a: GetSectionFromAnyFv  fail with status: %r", __FUNCTION__, Status);
      goto Down;
    }
    
    Status =
    ConvertPngToGopBlt (ImageData, ImageSize, (VOID **) &Blt, &BltSize, &Height,
                        &Width);
    
    if (EFI_ERROR (Status)) {
      DBG ("%a: ConvertPngToGopBlt  fail with status: %r", __FUNCTION__, Status);
      goto Down;
    }
 
    DestX = (GraphicsOutput->Mode->Info->HorizontalResolution - Width) / 2;
    DestY = (GraphicsOutput->Mode->Info->VerticalResolution - Height) / 2;
 
    if ((DestX >= 0) && (DestY >= 0)) {
      Status =
      BltWithAlpha (GraphicsOutput, Blt, EfiBltBufferToVideo, 0, 0,
                    (UINTN) DestX, (UINTN) DestY, Width, Height,
                    Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), TRUE);
      if (EFI_ERROR (Status)) {
        DBG ("%a: BltWithAlpha  fail with status: %r", __FUNCTION__, Status);
      }
    }
 
  Down:
    if (Pixel != NULL) {
      FreePool (Pixel);
    }
    if (ImageData != NULL) {
      FreePool (ImageData);
    }
    if (Blt != NULL) {
      FreePool (Blt);
    }
  }
}
 
 

 

any chance you may know what files in clover to insert this too? i looked at the source of your bootloader but it uses files clover does not have.

Link to comment
Share on other sites

in dp2 i get black screen and loading bar in dp3 i get black screen all the way to desktop and loading bar and at log off i get a black screen and a messed up spinning wheel 

Link to comment
Share on other sites

any chance you may know what files in clover to insert this too? i looked at the source of your bootloader but it uses files clover does not have.

i will do it for Clover. but not today. today is my birthday :) and probably not tomorrow.

  • Like 3
Link to comment
Share on other sites

OK, it seems booting in verbose solve all the problem for my HD4000. It means proper white background color and apple logo because of MBA5,2 smbios.

 

So any1 knows why verbose mode can make such difference??

Maybe this is a stupid question but isn't the verbose mode (debug mode) disabling the graphical interface in order to give you information on what's actually loading in background? If so, then how can you say that it's loading the boot logo and proper background when the UI is not even loaded? Are you talking about the second part of the booting process? The one that's loaded after all the drivers are loaded? Cause that would be interesting.
Link to comment
Share on other sites

if i enable onboard gpu i've got a smooth boot process without the apple logo, but fully working without shutting down the screen between the phases. :)

when i reenable discrete graphics it get back to the usual wrong size animation.

Link to comment
Share on other sites

Maybe this is a stupid question but isn't the verbose mode (debug mode) disabling the graphical interface in order to give you information on what's actually loading in background? If so, then how can you say that it's loading the boot logo and proper background when the UI is not even loaded? Are you talking about the second part of the booting process? The one that's loaded after all the drivers are loaded? Cause that would be interesting.

My apology for confusing information. Yes, I mean the second part of booting process. But I have to boot in verbose mode to see the proper second part. If not in verbose mode, I only see black screen with white progress bar, no apple logo.

Link to comment
Share on other sites

I really appreciate it. Thanks in advance.

in Clover/rEFIt_UEFI/refit/main.c:

//  DBG("StartEFILoadedImage\n");
  
  if ((OSTYPE_IS_OSX(Entry->LoaderType) ||
       OSTYPE_IS_OSX_RECOVERY(Entry->LoaderType) ||
       OSTYPE_IS_OSX_INSTALLER(Entry->LoaderType)) &&
       (AsciiStrnCmp(Entry->OSVersion, "10.10", 5) == 0) &&
       BlockConOut) {
    EG_PIXEL BackgroundPixel  = { 0xBF, 0xBF, 0xBF, 0xFF };
    EG_IMAGE *Logo = egLoadImage(ThemeDir, L"appleLogo_apple_gray.png", TRUE);
    INTN ScreenWidth, ScreenHeight;
    
    if (Logo != NULL) {
      egGetScreenSize (&ScreenWidth, &ScreenHeight);
      egClearScreen (&BackgroundPixel);
      BltImageAlpha (Logo,
                     (ScreenWidth - Logo->Width) / 2,
                     (ScreenHeight - Logo->Height) / 2,
                     &BackgroundPixel,
                     16);
    }
  }
  
  StartEFILoadedImage(ImageHandle, Entry->LoadOptions, 
                Basename(Entry->LoaderPath), Basename(Entry->LoaderPath), NULL);
  

don't forget to place logo in ThemeDir, like this:

scr.png

 

here everything you might need:

https://dl.dropboxusercontent.com/u/25668169/clover_applelogo.zip

  • Like 3
Link to comment
Share on other sites

 Share

×
×
  • Create New...