Jump to content
Andy Vandijck

Updated EFI filesystem drivers (efifs ported to EDK2)

30 posts in this topic

Recommended Posts

Advertisement

dear Andy,

I have a stupid question .... how do I add the files in clover?

Please create a short description for stupid user

 

Thanks in advance verbeug.gif

 

spakk

Share this post


Link to post
Share on other sites

dear Andy,

I have a stupid question .... how do I add the files in clover?

Please create a short description for stupid user

 

Thanks in advance verbeug.gif

 

spakk

Put them either under /EFI/CLOVER/drivers64 in case of legacy boot or /EFI/CLOVER/drivers64UEFI in case of UEFI boot.

You can also do them both ;)

Same goes for the 32 bit drivers, drivers32 and drivers32UEFI...

Share this post


Link to post
Share on other sites

Hi AnV,

 

I was unable to compile the drivers in 32bit and you came up with the solution!
 
No matter what I tried, I could not generate the config.h for IA32...
 
Thank you!

Share this post


Link to post
Share on other sites

Very cool... nice work.

 

I swapped HFSPLUS-64.efi for the Apple extract HFSPlus.efi in latest build of Clover.

 

It worked, but is noticeably slower than the Apple code. My boot (Clover->OS X login) goes from 6.7 seconds to 9.1.

 

Compiled with optimizer on?

Share this post


Link to post
Share on other sites

Andy, awesome, are these HFS+ drivers read and write? Because if so what license are these sources under? I would definitely want to put an open source hfs+ read/write driver into clover sources.....

Unfortunately no.

These are not read+write.

They are licensed under the GPL as they use the filesystems that are part of GRUB.

Plenty of other filesystem though (including exfat, ntfs, ...)

Share this post


Link to post
Share on other sites

Put them either under /EFI/CLOVER/drivers64 in case of legacy boot or /EFI/CLOVER/drivers64UEFI in case of UEFI boot.

You can also do them both ;)

Same goes for the 32 bit drivers, drivers32 and drivers32UEFI...

 

Hey Andy

 

but only add to the existing folders? or you have to remove the drivers that are already there? ie they can be together?

Share this post


Link to post
Share on other sites

Thank you Andy Vandijck...great effort!... :) 

 

One question for you. 

 

In my "drivers64UEFI" folder i have these files:

 

4gOWho.png

 

​But in your archive there are so many .efi files. 

 

Then, my question is:

 

which of your files have to put in my folder? 

 

Regards.

Share this post


Link to post
Share on other sites

The only driver that can be replaced at your folder for his correspondent (if you want to try it) is HFSPlus-64.efi...

 

This collection provided by AnV are only FileSystem drivers that (also) can be used with Clover...

 

They wasn't built specifically for Clover...

Share this post


Link to post
Share on other sites

Andy,

Thanks for your great work! I send it to revision 2819 but

your diff file in a nightmare so I can't check if I apply it correctly.

I corrected some places to do the project compilable and now I want to hear if some more corrections needed.

 

2all. Test, please!

Share this post


Link to post
Share on other sites

I've decided to port the efifs drivers to EDK2 fully (instead of good old GNU EFI) because I wanted a lot more filesystems supported under UEFI.

I've now ported them all (all drivers from GRUB).

Great work Andy!

Share this post


Link to post
Share on other sites

I know that there would be improvements with these drivers? I can only change hfsplus, I do not see other drivers that use usually in folder 64 (UEFI)

 

 

@ pene , how are you ?

Share this post


Link to post
Share on other sites

Andy,

Thanks for your great work! I send it to revision 2819 but

your diff file in a nightmare so I can't check if I apply it correctly.

I corrected some places to do the project compilable and now I want to hear if some more corrections needed.

 

2all. Test, please!

Please attached here 2819 ..i want to try

ok Sergey work perfect

 

 

0:100  0:000  Starting Clover rev 2819 on American Megatrends EFI

 

Only curiosity what is this ?

 

 

0:120  0:000  Kernel and Kext Patches:
0:120  0:000      Allowed: y
0:120  0:000      Debug: n
0:120  0:000      KernelCpu: n
0:120  0:000      Lapic: n
0:120  0:000      AICPUPM: n
0:120  0:000      AppleRTC: n
0:120  0:000      KernelPm: n
0:120  0:000      FakeCPUID: 0x0
0:120  0:000      ATIController: <null string>
0:120  0:000      ATIDataLength: 0
0:120  0:000      0 Kexts to load
0:120  0:000      0 Kexts to patch

Share this post


Link to post
Share on other sites

Andy,

Thanks for your great work! I send it to revision 2819 but

your diff file in a nightmare so I can't check if I apply it correctly.

I corrected some places to do the project compilable and now I want to hear if some more corrections needed.

 

2all. Test, please!

Slice, note that with r2819 you changed in fdf to VBoxHfs (instead of HFSPlus that was used previously).

This will break in CloverEFI the possibility to boot installers created by 'createinstallmedia' (no links support in VBoxHfs).

 

Also, just wondering, which diff file are you referring to? I did not see any diff file... :)

Share this post


Link to post
Share on other sites

Please attached here 2819 ..i want to try

ok Sergey work perfect

0:100  0:000  Starting Clover rev 2819 on American Megatrends EFI

Only curiosity what is this ?

0:120  0:000  Kernel and Kext Patches:
0:120  0:000      Allowed: y
0:120  0:000      Debug: n
0:120  0:000      KernelCpu: n
0:120  0:000      Lapic: n
0:120  0:000      AICPUPM: n
0:120  0:000      AppleRTC: n
0:120  0:000      KernelPm: n
0:120  0:000      FakeCPUID: 0x0
0:120  0:000      ATIController: <null string>
0:120  0:000      ATIDataLength: 0
0:120  0:000      0 Kexts to load
0:120  0:000      0 Kexts to patch

Apianti did it when he was fixing kexttopatch frorm 2797 to 2806. He left expanded log for kext patching in case of troubles.

Share this post


Link to post
Share on other sites

Slice, note that with r2819 you changed in fdf to VBoxHfs (instead of HFSPlus that was used previously).

This will break in CloverEFI the possibility to boot installers created by 'createinstallmedia' (no links support in VBoxHfs).

 

Also, just wondering, which diff file are you referring to? I did not see any diff file... :)

O-oh! Sorry for the fdf.  In this long series I didn't see this.

The diff file Andy gave me in PM.

Share this post


Link to post
Share on other sites

Speaking of the HFS driver, did anyone test if this grub HFS driver properly supports links (aka can boot media created by 'createinstallmedia')? I'm away from home for a while, so I can't really test things.

 

If it properly reads 'createinstallmedia' disk, I think it might be a good idea to switch the driver used in Clover to this one instead of VBoxHfs (if it is OK with Andy, of course).

Share this post


Link to post
Share on other sites

Speaking of the HFS driver, did anyone test if this grub HFS driver properly supports links (aka can boot media created by 'createinstallmedia')? I'm away from home for a while, so I can't really test things.

 

If it properly reads 'createinstallmedia' disk, I think it might be a good idea to switch the driver used in Clover to this one instead of VBoxHfs (if it is OK with Andy, of course).

Sure, no problem, I made these public for everyone.

Use it as you see fit ;)

Share this post


Link to post
Share on other sites

Hi Andy,

Thanks.

I tried to test this HfsPlus driver, under Qemu with OvmfClover firmware compiled with DEBUG mode ( ./ebuild.sh -D CSM_ENABLE -b DEBUG).
This allows me to see debugging information printed by edk2 code.

Edk2 Asserts when Grub HfsPlus loads with:

InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7F170A40
Loading driver at 0x0007EC17000 EntryPoint=0x0007EC172AF HFSPLUS.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F174218
ASSERT /Users/pene/Desktop/CloverGrowerPro/edk2/MdeModulePkg/Core/Dxe/Mem/Pool.c(425): CR has Bad Signature

This happens both if I use the binary you uploaded, and also if I compile it myself.
Not sure what's wrong yet, but something is.
If I had tried without DEBUG, it may have passed this point (with RELEASE asserts are disabled), but this issue needs to be ironed out.

The assertion is at CoreFreePoolI (), so this is most probably a memory management issue.
I didn't really try to look into it deeply yet to figure out why, but if you have any ideas, they are welcome :)

Share this post


Link to post
Share on other sites

Assert can happen in FreePool if you pass it something that is not allocated with AllocatePool. For example: possible issue in grub_driver.c, GetFSGuid(): FreePool(FsName).

Share this post


Link to post
Share on other sites

Assert can happen in FreePool if you pass it something that is not allocated with AllocatePool. For example: possible issue in grub_driver.c, GetFSGuid(): FreePool(FsName).

Thanks dmazar.

 

Indeed that is one issue.

Another issue is in driver.c, FreeFsInstance(): FreePool(Instance->RootFile). That one assets also for FreePool on EFI_INVALID_PARAMETER.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By ErmaC
      Slice is glad to present a new EFI bootloader.

      CLOVER
      Now version 2 rEFIt based.


      It is open source based on different projects: Chameleon, rEFIt, XNU, VirtualBox. The main is EDK2 latest revision.
      I also want to thank all who help Slice with the development. Credits and copyrights remain in the sources.
      https://sourceforge.net/projects/cloverefiboot/?source=directory
      There is a WIKI 
      http://clover-wiki.zetam.org/
      Main features:


      If you have a question please provide outputs from DarwinDumper (formed from Trauma tool). Thanks Trauma!
      Continued by blackosx and STLVNUB.
      Post#2 CloverGrower - create Clover by yourself Post#3 Downloads Post#4 Installation of the bootloader Post#5 How to do UEFI boot Post#6 How to use - common words Post#7 Calculator for Automatic DSDT fix Post#8 Instructions for GraphicsInjector Post#9 ATIConnector patching Post#10 Any kexts patching with some Samples Post#11 CustomEDID Post#12 Hiding unnecessary menu entries Post#13 Instruction for DSDT corrections to do DeviceInjection works Post#14 Development Post#15 Themes Post#16 About kexts injection Post#17 Instructions for P- and C-states generator Post#18 Patching DSDT to get Sleep working Post#19 CPU settings and geekbench Post#20 ACPI tables loading Post#21 DSDTmini Post#22 Custom SMBios Post#23 F.A.Q. Post#24 iCloudFix Post#25 Using mouse. Post#26 How to make orange icons to be metallic Post#27 How to make software RAID (by Magnifico) Post#28 How to modify InstallESD.dmg (by shiecldk) Post#29 Config.plist settings Post#30 Using extra kexts and skipping kernelcache Post#31 Choosing EFI drivers Post#32 Configuration files Post#33 Automatic config.plist creating Post#34 Custom DSDT patches Post#35 How to do sleep/wake working with UEFI BOOT Post#36 DeviceID substitution (FakeID) Post#37 Using Custom OS Icons Post#38 Hibernation Post#39 Floating regions Post#41 Property List Editor Post#42 Blocking Bad Kext Post#43 AAPL,slot-name Post#44 FakeCPUID for unsupported CPU Post#45 Multiple Boot Options - to write into UEFI BIOS boot menu Post#46 How to install Windows UEFI Post#47 How to speedup Clover boot Post#48 Info.plist patching Post#49 Arbitrary device injection Post#50 Non-Standard Legacy Boot Files Post#51 Reboot to Windows UEFI from Mac OSX Post#52 Deprecated Features Post#53 Using UDK2018 Post#54 Device Properties Post#55 Scalable themes Post#56 How to search Clover mistakes (bisection) -----------------
       
      Slice:
      I edited all posts in the thread to correspond to actual Clover revision.
      Please install Clover at least 2652 and use new instructions.
    • By metaphysician
      hi folks! i'm just checking for opinions here on a Clover based install of High Sierra. currently i can't boot directly from the internal drive on my hackbook, an ASUS ROG GL502-VS laptop (with the replaced WiFi card), though i can boot from the USB bootloader/installer

      i installed 10.13.6 fine using a prepared vanilla installer on HFS+ (not APFS), but my configuration is somewhat unusual. i have two drives. the first SSD has the Windows system, the second has two partitions with the 2nd partition holding the macOS system. when i ran Clover installer i could not use the UEFI option to copy to the EFI partition because it couldn't find one on that drive. so it installed the EFI folder on the root of the macOS partition instead.
       
      however, after a bit of tinkering around, i found out that there is an existing EFI partition on the primary drive called SYSTEM. it has a EFI folder and underneath that is a Windows folder, a Boot folder, and one called APPLE. i can mount this partition with Clover Configurator and copy files to it, but i don't know if this is a good or risky solution. i was thinking i would manually copy the CLOVER folder and the uefi64.boot file to this partition , making sure not to overwrite anything existing. using the UEFI setup, i can create a boot path from the SYSTEM partition to the Clover boot file, but i'm just curious if this is a useful solution or not, and i don't want to ruin the existing Windows 10 installation for sure. any advice appreciated!
    • By ErmaC
      Slice is glad to present a new EFI bootloader.
      CLOVER
      Now version 2 rEFIt based.


      It is open source based on different projects: Chameleon, rEFIt, XNU, VirtualBox. The main is EDK2 latest revision.
      I also want to thank all who help Slice with the development. Credits and copyrights remain in the sources.
      http://cloverefiboot.sourceforge.net/

      Main features:


      If you have a question please provide outputs from DarwinDumper (formed from Trauma tool). Thanks Trauma!
      Continued by blackosx and STLVNUB.
      CloverGrower Downloads Installation How to do UEFI boot How to use - common words Calculator for Automatic DSDT fix Instructions for GraphicsInjector ATIConnector patching Any kexts patching with some Samples CustomEDID Hiding unnecessary menu entries Instruction for DSDT corrections to do DeviceInjection works Development Themes About kexts injection Instructions for P- and C-states generator Patching DSDT to get Sleep working CPU settings and geekbench ACPI tables loading DSDTmini Custom SMBios F.A.Q. iCloudFix Using mouse. How to make orange icons to be metallic How to make software RAID (by Magnifico) How to modify InstallESD.dmg (by shiecldk) Config.plist settings Using extra kexts and skipping kernelcache Choosing EFI drivers Configuration files Automatic config.plist creating Custom DSDT patches How to do sleep/wake working with UEFI BOOT DeviceID substitution (FakeID) Using Custom OS Icons Hibernation Floating regions Error allocating pages while starting OS -----------------
    • By AppleBytes
      OK, I've searching for days trying to gather up the tools to make my current install work correctly. I'm well on my way. But all the links to the things I currently must have were apparently nuked "during a forum upgrade". :(
      As far as EFI Studio goes; I can find many links to it. But for Insanelymac, they're broken (due to the upgrade), or for the Netkas site, they're links to either Rapidshare, or Mediafire that also no linger exist. I see many users here indicating that they used it to tweak their DSDT. But the web (google/duckduckgo), Instanelymac, and Netkas seem to have no idea where it's gone.
      Could some kind soul please share a copy, or a link? I'm a loooong time hacker, and would love to bring it back to life. In fact, I'd love to improve it -- or at least bring it up to current times. If only I knew where it was.
      Thank you for all your time, and consideration.
       
      --Chris
       
    • By SoThOr
      This was spurred on from a discussion in the Clover General thread. Where there was a debate on bcdedit being able create/read/edit (U)EFI Boot entries. I didn't think it appropriate to post all this information there and somebody may want to make use of this and its likely to get lost in that massive thread.
       
      Out of curiosity I decided to see if I could create an EFI entry using bcdedit. What can I say I like a challenge.  Whilst is not a documented method by Microsoft, as it turns out in a round about way it IS possible to create an EFI entry using bcdedit and these are the steps I went through to add UEFI Shell located on a USB stick to the EFI entries. 
       
      Third party software is available that can create and edit UEFI entries from Windows with better support and more features. I'm just making this information available in case those options are unavailable. 
       
      DISCLAIMER - This is not a supported method. Use at your own risk. I recommend backing up your BCD/Firmware variables/settings beforehand.
       
      1) Copy {bootmgr} entry.
      C:\Windows\System32>bcdedit /copy {bootmgr} /d "UEFI Shell" The entry was successfully copied to {34e8383c-73a7-11e9-9cb0-94de8078a7b5}. 2) Edit the new entry using the new GUID bcdedit generated in the copy step.
        a) Set the device and path for UEFI shell on my USB stick.
      bcdedit /set {34e8383d-73a7-11e9-9cb0-94de8078a7b5} device partition=G: bcdedit /set {34e8383d-73a7-11e9-9cb0-94de8078a7b5} path \EFI\SHELL\SHELLX64.efi   b) Clean up some of the stuff that was copied from {bootmgr} (optional as far as I can tell, just makes things tidier in bcdedit)
      3) Put the new EFI entry first in boot order. (optional)
       
      After completing the steps above, here is what "bcdedit /enum firmware" shows:
       
      I shutdown my computer and when I turned my computer back on it booted up into UEFI Shell. After exiting the shell my PC went on to boot Windows.
      Here is the resulting dump using "bcfg boot dump -v" from that shell:
       
      You may notice that the shell shows as "Windows Boot Manager" in the bcdedit output. This I believe is because of the "WINDOWS" at the beginning of the option data that bcdedit added to the EFI Boot entry. I also believe this why bcdedit shows my Windows 8 installation as "Firmware Application" because it has no option data. I don't know how to remove this data using bcdedit nor do I know how the option data, that bcdedit adds, will affect other EFI applications.

      There might be a way to create the EFI entry without copying the Windows entry but if there is I'm unable to find any documentation on how one would do so. If you use the create command then it just puts it in the BCD and I'm unaware of a way to tell it to create it in EFI instead, other than by doing the above.
×