Jump to content
InsanelyMac Forum


  • Content count

  • Joined

  • Last visited

  • Days Won


Zenith432 last won the day on November 18 2017

Zenith432 had the most liked content!

1 Follower

About Zenith432

  • Rank
    InsanelyMac Legend

Contact Methods

  • Website URL

Profile Information

  • Gender

Recent Profile Visitors

19,695 profile views
  1. It's reversion and reapplication of patches. As I wrote in Clover Change Explanations for r4496, 4 patches were removed. Whenever patches are removed, it is necessary to manually revert the applicable files in edk2 tree. If a patch is added or changed, then merely copying the patches over edk2 tree is enough - but removing a patch it's not enough, because non-copying a non-existing file over an existing file, does not cause it to revert to its repository copy. Also, the log by Cyberdevs shows edk2 rev 27213 being used while Clover 4496 and above requires either edk2 27233 and above or UDK2018 instead. @Awesome Donkey: This kind of out of range by nasm is caused by old version of nasm not being able to successfully optimize the assembly after many passes to get the jump in range. This source file boot1x.s assembles successfully with nasm 2.13.03 and its repository copy. So check your setup.
  2. Zenith432

    Clover General discussion

    I don't know what "src folder" is. Your log says EDK2 rev 27213. For Clover 4498 you should use at least 27233 of EDK2. In EDK2 tree, MdePkg/Include/Base.h should be reverted to original. Then Clover/Patches_for_EDK2 recopied over EDK2.
  3. Zenith432

    Clover General discussion

    @SavageAUS: Your patches are misapplied. You need to revert patches to EDK2, update to latest from SVN and then reapply the patches.
  4. Zenith432

    Clover General discussion

    @Mork vom Ork, @Matgen84: There was problem in clover-genconfig build settings after reversion of MdePkg/Include/Base.h that was causing its build to fail. Try r4498. Should be ok now. PS: The problem was that it was building combined 32/64-bit binary, and the 32-bit build, for some reason defines MDE_CPU_X64. I didn't bother to figure out why it's defining this symbol, but now it's only building the 64-bit build - which should be ok, since 64-bit user mode is supported since OS X Leopard.
  5. Zenith432

    Clover Change Explanations

    REV 4496 Synchronized Patches_for_EDK2 with r27233 - which resolves the problems with GetBestLanguage()/VariableGetBestLanguage() Removed patches: MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c MdePkg/Include/Library/UefiLib.h MdePkg/Library/UefiLib/UefiLib.c and reverted MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c to its previous form that doesn't include this fix. Patches_for_UDK2018 stays the same on this issue as fix was not back-ported. Removed the patch to MdePkg/Include/Base.h The only build that needs the "no MS va funcs" is clang with -target x86_64-pc-win32-macho. So I added '-DNO_MSABI_VA_FUNCS' for the relevant toolchains in tools_def.txt (XCLANG and XCODE5). Note that this change is only guaranteed to work with recent versions of both GCC and clang. Some really old versions (GCC < 4.8 and clang around the time of SnowLeopard) may not work correctly. If anyone still wants to build Clover with a really old compiler, it is their responsibility to set the correct value by either adding or removing -DNO_MSABI_VA_FUNCS as appropriate. This change was back-ported to UDK2018 and is committed to Patches_for_UDK2018 as well as Patches_for_EDK2. Also some more minor changes Update svn:ignore and .gitignore for present-day build products. Change a couple of makefiles in CloverEFI/BootSectors to account for previous removal of svn:executable on files in CloverEFI/BootSectors/bin (these files are committed build products of these makefiles.) Typos in ebuild.sh.
  6. Zenith432

    Clover Bug/Issue Report and Patch

    I see lgao4 just fixed it... And you also patched something in 1d4f84. EDK2 fixed it by changing the BOOLEAN to UINTN. Anyhow, EDK2 doesn't need the changes I made to MdePkg/Include/Base.h. They have a macro NO_MSABI_VA_FUNCS to disable the __builtin_ms_va_* variants. It is used for XCOODE5 in tools_def.template. In GCC, __builtin_ms_va_* always work the same (as Microsoft) whether you use mixed ABI or not. In clang, with x86_64-windows-macho, they can't be used except on some specific older versions identified in Clover mod to Base.h. The implementation of __builtin_va_* works (= is STDC compliant), but is incompatible with Microsoft. In Clover, we have XCODE5 which uses x86_64-windows-macho, and XCODE8 which uses x86_64-apple-darwin, and also some of the macOS support apps shipped with Clover end up including Base.h even though they're not EDK2 EFI binaries. They also use x86_64-apple-darwin. So Clover Base.h needs to handle cases that EDK2 doesn't.
  7. Zenith432

    Clover Bug/Issue Report and Patch

    That was a long time ago - there was a bug of iterating a VA_LIST twice without intervening VA_END+reVA_START, plus other (less-lethal) cases of not using VA_END properly. The more recent submits were fixes to problems in BaseTools. The problem with GetBestLanguage/VariableGetBestLanguage are fixed in EDK2 by using -Wno-varargs globally with clang. This isn't such a good idea, because it silences all clang -Wvarargs which may detect potential bugs. However, the package maintainer seems content with it - and fixing all cases in EDK2 of disallowed type of 2nd argument to VA_START requires a change in the official PEI documentation. I'm also unsure that the solution in Clover of naming the first variadic parameter works in all cases in EDK2, because the first variadic parameter may also have a type which is not a result of default arument promotion (this by itself is also UB ). I don't have patience to sort it all out. Anyways, I recently changed the implementation in Clover of GetBestLanguage so adding the redundant "" is not needed. The named (formerly first variadic) parameter is processed along all the variadic.
  8. Zenith432

    Clover Bug/Issue Report and Patch

    includepath for a module is taken from .dec file specified in .inf file for module. It is why PeCoffLib.h ended up being patched in edk2 tree, remember? So headers cannot be moved under Clover unless all modules that use them also get moved and their .inf file modified.
  9. Zenith432

    Clover Bug/Issue Report and Patch

    It is done r4486. from Patches_for_EDK2 - Patches based on EDK2 from Patches_for_UDK2018 - Patches based on UDK2018
  10. According to @slice... at least it's what I think was intended.
  11. No. Just once. There is a code change between UDK2018 and EDK2 in Variable.c which is in RuntimeDxe only used with legacy Clover. So at least with CloverGUI everything should work. I haven't tested CloverEFI to see if this code change makes any difference.
  12. You'll need to be more specific.... r4472 adapted the patches to UDK2018 and broke compiling with EDK2 because of MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c. In r4477, I removed (as obsolete) the patch to MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c so ebuild.sh should work again with EDK2. There is still a difference in a 2nd file MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c between the EDK2 and UDK2018, but the one which is currently checked in (r4481) and is adapted to UDK2018 - seems to work with EDK2 as well. If you want a version adapted to EDK2 (r4481), it is found in attachement in my post. So for now (r4481), the patches seem to work simultaneously with both UDK2018 and EDK2, with no guarantee they won't diverge in the future. You need to start from clean folder of EDK2 or UDK2018 and reapply patches, because some were removed.
  13. I suggested solution to this, but got no response.
  14. @SavageAUS, @Matget84: The error is because you're building with EDK2, not UDK2018 update to r4479 revert MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c in edk2 tree to original from svn (or git). revert the 5 other files listed here. Replace Patches_for_EDK2/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c with file attached to this post. Apply this patch to MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c under edk2 tree. Now build should work ok. Variable.c.gz
  15. Zenith432

    Clover Change Explanations

    REV 4476 - 4478 Added ebuild.sh option '-D NO_CLOVER_SHELL' to disable building of Clover-modified shell. Vanilla shell lib is built for bdmesg.efi, and vanilla shell binary can be taken from edk2/ShellBinPkg (see --edk2shell option for ebuild.sh). Reengineered the patch to GetBestLanguage() function found in MdePkg/Library/UefiLib so that 6 other patched sources can be eliminated. The eliminated patched files are Patches_for_EDK2/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c Patches_for_EDK2/MdeModulePkg/Library/UefiHiiLib/HiiString.c Patches_for_EDK2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c Patches_for_EDK2/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c Patches_for_EDK2/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c Patches_for_EDK2/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c Make sure to revert the removed patches in EDK2 tree to their original form.