Jump to content

OpenCore General Discussion


dgsga
8,888 posts in this topic

Recommended Posts

 

 

Hi developers

 

Like @Matgen84 I cannot build latest version, but my problem occurs much earlier....

 

DEFI_TARGET64 ../../OpenCorePkg/User/Library/UserMisc.c -o Darwin_X64_Tool64/UserMisc.o

CommonLib.c:cc -MMD -MT Darwin_X64_Tool32/UserOcDummy.o -MF Darwin_X64_Tool32/UserOcDummy.d -c -fshort-wchar -Wall -Wextra -D EFIUSER -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-strict-aliasing -Wno-address -mmacosx-version-min=10.6 --target=x86_64-apple-darwin -D ENTRY_POINT=main -g -O0 -D EFIUSER_DEBUG -I../../OpenCorePkg/User/Include -I../../OpenCorePkg/Include/Acidanthera -I../../OpenCorePkg/Include/Apple -I../../OpenCorePkg/Include/Apple/X64 -I../../OpenCorePkg/Include/Generic -I../../OpenCorePkg/Include/Intel -I../../OpenCorePkg/Include/Microsoft -I../../OpenCorePkg/Include/Nvidia -D NO_MSABI_VA_FUNCS -D OC_TARGET_DEBUG -I../../MdePkg/Include -I../../MdePkg/Include/Library -I../../MdePkg/Include/X64 -I../../MdePkg/Library/BaseLib -I../../MdeModulePkg/Include -I../../UefiCpuPkg/Include -include ../../OpenCorePkg/User/Include/UserPcd.h -include ../../OpenCorePkg/User/Include/UserGlobalVar.h -Werror -DEFI_TARGET32 ../../OpenCorePkg/User/Library/UserOcDummy.c -o Darwin_X64_Tool32/UserOcDummy.o

568:10: error: implicit declaration of function 'aligned_alloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

  return aligned_alloc (Alignment, Size);

         ^

CommonLib.c:568:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Werror,-Wint-conversion]

  return aligned_alloc (Alignment, Size);

         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2 errors generated.

make[2]: *** [CommonLib.o] Error 1

 

Then it finally stops at.....

 

make[1]: *** [Common] Error 2

make[1]: *** Waiting for unfinished jobs....

cc -mmacosx-version-min=10.6 --target=x86_64-apple-darwin Darwin_X64_Tool64/ImageTool.o Darwin_X64_Tool64/Image.o Darwin_X64_Tool64/PeEmit.o Darwin_X64_Tool64/PeScan.o Darwin_X64_Tool64/ElfScan.o Darwin_X64_Tool64/BinEmit.o Darwin_X64_Tool64/UefiImageExtraActionLib.o Darwin_X64_Tool64/PeCoffInit.o Darwin_X64_Tool64/PeCoffInfo.o Darwin_X64_Tool64/PeCoffLoad.o Darwin_X64_Tool64/PeCoffRelocate.o Darwin_X64_Tool64/PeCoffHii.o Darwin_X64_Tool64/PeCoffDebug.o Darwin_X64_Tool64/UefiLib.o Darwin_X64_Tool64/UefiLibPrint.o Darwin_X64_Tool64/CpuDeadLoop.o Darwin_X64_Tool64/BaseDebugPrintErrorLevelLib.o Darwin_X64_Tool64/DebugLib.o Darwin_X64_Tool64/PrintLib.o Darwin_X64_Tool64/PrintLibInternal.o Darwin_X64_Tool64/String.o Darwin_X64_Tool64/SafeString.o Darwin_X64_Tool64/SwapBytes16.o Darwin_X64_Tool64/SwapBytes32.o Darwin_X64_Tool64/LinkedList.o Darwin_X64_Tool64/HighBitSet32.o Darwin_X64_Tool64/HighBitSet64.o Darwin_X64_Tool64/MtrrLib.o Darwin_X64_Tool64/GetPowerOfTwo32.o Darwin_X64_Tool64/GetPowerOfTwo64.o Darwin_X64_Tool64/Cpu.o Darwin_X64_Tool64/BmpSupportLib.o Darwin_X64_Tool64/SafeIntLib.o Darwin_X64_Tool64/X86GetInterruptState.o Darwin_X64_Tool64/PciLib.o Darwin_X64_Tool64/PciExpressLib.o Darwin_X64_Tool64/DevicePathUtilities.o Darwin_X64_Tool64/UefiDevicePathLib.o Darwin_X64_Tool64/DevicePathToText.o Darwin_X64_Tool64/DevicePathFromText.o Darwin_X64_Tool64/BitField.o Darwin_X64_Tool64/CheckSum.o Darwin_X64_Tool64/UefiSortLib.o Darwin_X64_Tool64/QuickSort.o Darwin_X64_Tool64/UserFile.o Darwin_X64_Tool64/CommonMemoryAllocationLib.o Darwin_X64_Tool64/CommonMemoryAllocationLibEx.o Darwin_X64_Tool64/BaseMemoryProfileLibNull.o Darwin_X64_Tool64/UserBaseMemoryLib.o Darwin_X64_Tool64/UserBootServices.o Darwin_X64_Tool64/UserGlobalVar.o Darwin_X64_Tool64/UserMath.o Darwin_X64_Tool64/UserMisc.o Darwin_X64_Tool64/UserPcd.o Darwin_X64_Tool64/UserUnicodeCollation.o Darwin_X64_Tool64/UserOcDummy.o Darwin_X64_Tool64/BaseMath.o Darwin_X64_Tool64/BaseBitOverflow.o Darwin_X64_Tool64/BaseNativeOverflow.o Darwin_X64_Tool64/BaseTripleOverflow.o Darwin_X64_Tool64/BaseAlignment.o Darwin_X64_Tool64/OcSerializeLib.o Darwin_X64_Tool64/OcTemplateLib.o Darwin_X64_Tool64/OcXmlLib.o Darwin_X64_Tool64/OcAsciiLib.o Darwin_X64_Tool64/OcUnicodeLib.o Darwin_X64_Tool64/RsaDigitalSign.o Darwin_X64_Tool64/BigNumMontgomery.o Darwin_X64_Tool64/BigNumPrimitives.o Darwin_X64_Tool64/BigNumWordMul64.o Darwin_X64_Tool64/Sha2.o Darwin_X64_Tool64/SecureMem.o Darwin_X64_Tool64/Sha512AccelDummy.o Darwin_X64_Tool64/CxxSymbols.o Darwin_X64_Tool64/MachoFat.o Darwin_X64_Tool64/Header.o Darwin_X64_Tool64/Macho32.o Darwin_X64_Tool64/Macho64.o Darwin_X64_Tool64/Relocations.o Darwin_X64_Tool64/Symbols.o Darwin_X64_Tool64/OcAppleKeysLib.o Darwin_X64_Tool64/FrequencyDetect.o Darwin_X64_Tool64/AppleCpuSupport.o Darwin_X64_Tool64/OcCpuLib.o Darwin_X64_Tool64/MeasureTicks.o Darwin_X64_Tool64/ProtocolSupport.o Darwin_X64_Tool64/DataPatcher.o Darwin_X64_Tool64/PlatformInfo.o Darwin_X64_Tool64/KernelVersion.o Darwin_X64_Tool64/OcUnicodeCollationEngCommon.o Darwin_X64_Tool64/OcVariableLib.o Darwin_X64_Tool64/UserPseudoRandom.o  -o ImageTool64

No strip in DEBUG mode ImageTool32

No strip in DEBUG mode ImageTool64

gcc -O -I. -I../support/set -I../h -DUSER_ZZSYN  -DZZLEXBUFSIZE=65536 -o ./antlr antlr.o scan.o err.o bits.o build.o fset2.o fset.o gen.o globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o fcache.o

Pccts/antlr/antlr -CC -e3 -ck 3 -k 2 -fl VfrParser.dlg -ft VfrTokens.h -o . VfrSyntax.g

Antlr parser generator   Version 1.33MR33   1989-2001

VfrSyntax.g, line 3529: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf Default GrayOutIf )

VfrSyntax.g, line 3538: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf Default GrayOutIf )

VfrSyntax.g, line 3547: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf Default GrayOutIf )

VfrSyntax.g, line 3557: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf Default GrayOutIf )

VfrSyntax.g, line 3587: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf Default GrayOutIf )

VfrSyntax.g, line 3596: warning: alts 1 and 2 of {..} ambiguous upon ( ";" RefreshGuid GuidOp Locked Image EndIf InconsistentIf DisableIf SuppressIf Default GrayOutIf )

Pccts/dlg/dlg -C2 -i -CC -cl VfrLexer -o . VfrParser.dlg

dlg  Version 1.33MR33   1989-2001

 

make: *** [Source/C] Error 2

  • Sad 1
Link to comment
Share on other sites

30 minutes ago, polkaholga said:

 

 

Hi developers

 

Like @Matgen84 I cannot build latest version, but my problem occurs much earlier....

 

DEFI_TARGET64 ../../OpenCorePkg/User/Library/UserMisc.c -o Darwin_X64_Tool64/UserMisc.o

CommonLib.c:cc -MMD -MT Darwin_X64_Tool32/UserOcDummy.o -MF Darwin_X64_Tool32/UserOcDummy.d -c -fshort-wchar -Wall -Wextra -D EFIUSER -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-strict-aliasing -Wno-address -mmacosx-version-min=10.6 --target=x86_64-apple-darwin -D ENTRY_POINT=main -g -O0 -D EFIUSER_DEBUG -I../../OpenCorePkg/User/Include -I../../OpenCorePkg/Include/Acidanthera -I../../OpenCorePkg/Include/Apple -I../../OpenCorePkg/Include/Apple/X64 -I../../OpenCorePkg/Include/Generic -I../../OpenCorePkg/Include/Intel -I../../OpenCorePkg/Include/Microsoft -I../../OpenCorePkg/Include/Nvidia -D NO_MSABI_VA_FUNCS -D OC_TARGET_DEBUG -I../../MdePkg/Include -I../../MdePkg/Include/Library -I../../MdePkg/Include/X64 -I../../MdePkg/Library/BaseLib -I../../MdeModulePkg/Include -I../../UefiCpuPkg/Include -include ../../OpenCorePkg/User/Include/UserPcd.h -include ../../OpenCorePkg/User/Include/UserGlobalVar.h -Werror -DEFI_TARGET32 ../../OpenCorePkg/User/Library/UserOcDummy.c -o Darwin_X64_Tool32/UserOcDummy.o

568:10: error: implicit declaration of function 'aligned_alloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

  return aligned_alloc (Alignment, Size);

         ^

CommonLib.c:568:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Werror,-Wint-conversion]

  return aligned_alloc (Alignment, Size);

         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2 errors generated.

make[2]: *** [CommonLib.o] Error 1

 

Then it finally stops at.....

 

 

@polkaholgawrite the sequence of commands that you run when compiling OpenCore . What version OS and XCODE? I have no problem compiling from last OC-master on three different systems.

OpenCore.png.39fa18ee6132610917e40fca3efc52ff.png

  • Like 2
Link to comment
Share on other sites

@droples

 

I'm on 11.7.5 (20G1225) & use Xcode 10.3 (10G8)

Download of the latest repo with Github Desktop and then I just run build_oc.tool

 

Edit 1:

Tried with downloading source code, build process got aborted because of too many errors 😞

Tried every older version till 0.8.5 , same story.... abortion of build process because of too many errors

 

I just deleted my Xcode ver. and install the latest compatible  ( to my OS ), then I'll check again

Edited by polkaholga
Link to comment
Share on other sites

5 minutes ago, polkaholga said:

@droples

 

I'm on 11.7.5 (20G1225) & use Xcode 10.3 (10G8)

Download of the latest repo with Github Desktop and then I just run build_oc.tool

On 11.7.7 I use Xcode 12.4 and everything compiles successfully. There are problems on XCODE << 12.0

  • Like 1
Link to comment
Share on other sites

1 hour ago, droples said:

@polkaholgawrite the sequence of commands that you run when compiling OpenCore . What version OS and XCODE? I have no problem compiling from last OC-master on three different systems.

OpenCore.png.39fa18ee6132610917e40fca3efc52ff.png

 

Hi @droples Like @polkaholga I can't build using build_oc.tool ( Xcode 12.4 on Catalina) after updating local repo. To solve this problem, I git clone a new directory

Edited by Matgen84
Link to comment
Share on other sites

@droples, @miliuco

 

Installed Xcode 13.2.1 and now it's without errors again.

 

Checking schema mUefiOutputSchema

Checking schema mUefiReservedMemoryEntrySchema

Checking schema mUefiReservedMemorySchema

Checking schema mUefiConfigurationSchema

Checking schema mRootConfigurationNodes

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.

 

Anyway I find this weird because I built all OC versions  ( as far as I remember 0.0.4 was my first one ) til 0.9.0 with 10.3 and did have only once a small issues not too long ago.

 

  • Like 2
Link to comment
Share on other sites

question: if I set ScanPolicy 2687747 in the log I have OCB: Invalid file system policy (0/290303) for 319A7518
instead if I set ScanPolicy 0 I don't have that error, if it is an error

 

Spoiler

27:501 00:092 OCPI: Partition table not supported
27:584 00:082 OCPI: Failed to retrieve disk info
27:666 00:081 OCB: Missing partition info for 319A7518
27:696 00:030 OCB: Invalid file system policy (0/290303) for 319A7518
27:777 00:081 OCB: Adding fs 319A7518 (E:1|L:1|P:Security Violation)

advice

Edited by Alpha22
Link to comment
Share on other sites

35 minutes ago, Alpha22 said:

question: if I set ScanPolicy 2687747 in the log I have OCB: Invalid file system policy (0/290303) for 319A7518
instead if I set ScanPolicy 0 I don't have that error, if it is an error

You cannot just use that value on it's own as you've found out with the error.

That value is used in conjunction with Misc/Entries in the config.plist when dual booting with i.e Windows but you need to find the correct path of the windows disk on your machine like my example. If the correct path is not correct, you will still get the error with that value. If you're not dual booting, then the '0' value is fine.

@miliuco - Has a great tutorial/walk through on 'How  to Custom Entry in Opencore to boot Windows'  to find the path of the disk and what you need to do.

 

PS Don't use the example in the Sample Config.plist as it is Generic and only there as an illustration or guide, you need to find your own on your machine.

Spoiler

707831160_Screenshot2023-04-17at10_45_56.thumb.png.62676d288dbd0458e91fb58c8ef787fc.png

 

Edited by eSaF
  • Like 3
Link to comment
Share on other sites

@Alpha22

I'm afraid that there is an issue with this volume (partition table error, maybe fixable by First aid in Disk Utility or equivalent in the filesystem of the volume). Is it NTFS?

Maybe setting it to 0 (will allow all sources present to be bootable) doesn't check the volumes (all are accepted as bootable without further ado) while any other numeric value checks the volumes included in ScanPolicy and hence the error. But I'm not sure about this.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

11 minutes ago, Alpha22 said:

from the guide given by eSaF the map> map_table.txt command is wrong

From memory (then again could be early signs of dementia that comes with old age) this is what worked for me............. map > map-table-windows.text.

Apart from @miliuco Guide, there is another one and this is where Google temporarily becomes your best friend.

What I posted was copied from part of a tutorial although I can remember which one..............Dementia (inserted here about).

Edited by eSaF
  • Like 4
Link to comment
Share on other sites

54 minutes ago, eSaF said:

From memory (then again could be early signs of dementia that comes with old age) this is what worked for me............. map > map-table-windows.text.

Apart from @miliuco Guide, there is another one and this is where Google temporarily becomes your best friend.

What I posted was copied from part of a tutorial although I can remember which one..............Dementia (inserted here about).

map > map-table-windows.text is right

 

executed by guide, Misc/Entries in config.plist but still same problem

Quote

17:908 00:022 OCPI: Partition table not supported
17:977 00:069 OCPI: Failed to retrieve disk info
17:997 00:020 OCB: Missing partition info for 319A7518
18:070 00:072 OCB: Invalid file system policy (0/290303) for 319A7518

 

  • Thanks 1
  • Sad 1
Link to comment
Share on other sites

20 minutes ago, Alpha22 said:

executed by guide, Misc/Entries in config.plist but still same problem

I don't know man I followed @miliuco Guide and mine is correct.

I will post a couple of pics to show how it is on my rig.

 

PS - This is how mine looks after finding the path of Windows volume and entry made in Misc/Entries.

The path has to be exactly as printed out by Shell.

Spoiler

17125541.thumb.png.e630e708981a716f714696f8ed1b93c6.png17125551.thumb.png.54684fda392abadd60dd30b1599a51d7.png

 

Edited by eSaF
Link to comment
Share on other sites

Just now, Alpha22 said:

followed this guide:

Ok did you find and verified the EFI Partition of the volume you want to make the entry?

Like I said, it must be copied exactly as it appears and entered into the config.plist.

 

I have to go out so I will be away from my p/c for approx: an hour or so, maybe @miliuco can chip in with some input if he's available.

  • Like 1
Link to comment
Share on other sites

42 minutes ago, Alpha22 said:

Re-checked everything, but still the same problem

When you checked in Shell did you find the EFI Partition of Windows and did you make a note of it so that you can select the right one that was recorded in text form on the EFI Partition of your boot volume?

It is a tedious operation but you have to get it absolutely right because it won't work otherwise. I have tried to depict what the format is in the attached Pic as best as I can remember.

I am sure the Guide provided by @miliuco and the other one is still very much relevant to get the desired result.

Screenshot 2023-04-17 at 19.26.40.png

Edited by eSaF
  • Like 3
Link to comment
Share on other sites

Came to Israel, my old hardware build and I installed macOS 12.6.5 (21G531). Installed in this way: Using OpenCore Legacy Patcher v.0.6.4 - download the OS and create an installation flash drive, then follow the instructions

edit Sample.plis, rename it to Config.plist, downloaded the necessary drivers and the latest kexts for my hardware. I put it all of them on EFI partition to the suitable in OC folders on the flash drive.

Everything was successfully installed (including after installation patches) and loaded into the desktop, but here's the oddity: It loads - not every time. That is, if you turn on the power button and do not press anything else, then the boot is usually normal, but if you select another partition (I have two different macOS on various volumes), then a black screen appears for a few seconds and then appears again the OS selection menu and so on in a circle. I don’t know where to dig, since logs are not created in this case. If you use the built-in Picker instead of OpenCanopy, then everything is OK. Can you see where I messed up? I am new to OpenCore. Iron earned everything except sleep.

501928_Snimok_ehkrana_2023-04-18_v_11.11.48.png

opencore-2023-04-17-223314.txt EFI.zip

Link to comment
Share on other sites

1 hour ago, MakAsus said:

Came to Israel, my old hardware build and I installed macOS 12.6.5 (21G531). Installed in this way: Using OpenCore Legacy Patcher v.0.6.4 - download the OS and create an installation flash drive, then follow the instructions

edit Sample.plis, rename it to Config.plist, downloaded the necessary drivers and the latest kexts for my hardware. I put it all of them on EFI partition to the suitable in OC folders on the flash drive.

Everything was successfully installed (including after installation patches) and loaded into the desktop, but here's the oddity: It loads - not every time. That is, if you turn on the power button and do not press anything else, then the boot is usually normal, but if you select another partition (I have two different macOS on various volumes), then a black screen appears for a few seconds and then appears again the OS selection menu and so on in a circle. I don’t know where to dig, since logs are not created in this case. If you use the built-in Picker instead of OpenCanopy, then everything is OK. Can you see where I messed up? I am new to OpenCore. Iron earned everything except sleep.

501928_Snimok_ehkrana_2023-04-18_v_11.11.48.png

opencore-2023-04-17-223314.txt 256 kB · 3 downloads EFI.zip 9.19 MB · 6 downloads

OCLP it is JUST for real MAC's. For sure we can use it to see the patches and adapt them to our needs and hardware, but not to use the EFI generated by OCLP. The only thing that can be done directly in non Macintosh machine by OCLP is post install root patch (thanks to OCLP devs), to fix graphics an occasionally other things (USB1,1).

To build an opencore EFI for hackintosh use this:

https://dortania.github.io/OpenCore-Install-Guide/

After, if you want Monterey or Ventura and the processor is unsupported, OCLP become source of inspiration.

Edited by Stefanalmare
  • Like 5
Link to comment
Share on other sites

7 hours ago, Stefanalmare said:

OCLP it is JUST for real MAC's. For sure we can use it to see the patches and adapt them to our needs and hardware, but not to use the EFI generated by OCLP. The only thing that can be done directly in non Macintosh machine by OCLP is post install root patch (thanks to OCLP devs), to fix graphics an occasionally other things (USB1,1).

To build an opencore EFI for hackintosh use this:

https://dortania.github.io/OpenCore-Install-Guide/

After, if you want Monterey or Ventura and the processor is unsupported, OCLP become source of inspiration.

I did everything just like that, only with the help of OCLP I made a USB flash drive, because it turned out to be convenient for them to download and prepare a usb media. And I set up OpenCore with my hands according to the manual. The question is: Why does everything load normally with the built-in picker, but not every time with OpenCanopy? There is no critical errors in the logs. 🤔

Link to comment
Share on other sites

@MakAsus

Not sure why you don't get the graphical picker, related items are ok in your EFI.

But this EFI is made by OCLP, as you say, and maybe it has some kind of incompatibility. I think (as @Stefanalmare) that you must build your EFI from OpenCore (not OCLP) following Dortania guide, adding to config.plist all the required patches copied from OCLP config.plist, and doing root patch from OCLP app if necessary. It's not recommended to create the EFI with OCLP in a hackintosh.

  • Like 2
Link to comment
Share on other sites

56 minutes ago, MakAsus said:

I did everything just like that, only with the help of OCLP I made a USB flash drive, because it turned out to be convenient for them to download and prepare a usb media. And I set up OpenCore with my hands according to the manual. The question is: Why does everything load normally with the built-in picker, but not every time with OpenCanopy? There is no critical errors in the logs. 🤔
This is failed boot.

And this Successible boot. 

 

Link to comment
Share on other sites

×
×
  • Create New...