Jump to content
30960 posts in this topic

Recommended Posts

You don't need to check AutoGenerated.c. The key feature is bit 35 in (Extended)FirmwareFeatures and in the mask. Thanks to vit9696 for the discovery.
I should note that old FirmwareFeatures is 32bit only. We have to set the bit in the ExtendedFirmwareFeatures.
Now Clover has the default values for some models. Other users may set it in config.plist.

Which models are they?
Will all these new changes be included in the next clover release? Any changes to config.plist? Will there be documentation?


Sent from my iPhone using Tapatalk
  • Like 1
10 hours ago, Jief_Machak said:

Yeah, I never understood why you don't use the CloverX64 project I made. So much quicker. Compiled the whole Clover (I mean Clover itself, the rEFIt_UEFI folder) and 10 seconds.

?

Can I help in any way ?

You can help me if tell an textEditor which can search a keyword through all files in chosen files set.

For example I want to find all occurrence of  word "FirmwareFeatures". Xcode can, but it weights 31Gb.

I didn't use the project CloverX64 because it doesn't contain all interesting sources. And compilation only DEBUG-XCODE8? I want RELEASE_GCC53. If I change one file then the compilation by hebuild.sh is 10 seconds.

2 hours ago, Slice said:

hebuild.sh is 10 seconds

If you modify only one file, xcode compilation is half a second. It's a big time saver after having written a big piece of code, to catch all syntax errors. Just saying...

 

2 hours ago, Slice said:

CloverX64 because it doesn't contain all interesting sources

Source reference can be added, no problem.

 

2 hours ago, Slice said:

I want RELEASE_GCC53

Yes, it's not meant to replace build scripts. Once it compiles, I switch to GCC, with ebuild.sh, as it works better in gdb.

 

Also :

I can see that hebuild.sh and ebuild.sh are almost the same. One difference, for example, is that they don't use the same mtoc binary. Shouldn't we update and keep only one ? Redundancy is always dangerous...

 

 

2 hours ago, Slice said:

I want to find all occurrence of  word "FirmwareFeatures"

grep ?

Annoying because it's command line, but easy to use.

I think Visual Studio Code do it too.

2 minutes ago, 5T33Z0 said:

@yapan4 So 0x3E7 is the new CsrActiveConfig for Big Sur/Monterey?

 

For beeing a "new" sample, I think it has an awful lot of obsolete options, patches, features and quirks for old OSes and CPUs enabled…

It's not final version, for comparison and test only!

Your  Sample Config.plist  
https://github.com/CloverHackyColor/CloverBootloader/commit/f0a20247e9edc34f9eb55a3d9e14bbda858734f5
is not good for CloverConfigValidator
227986425_ScreenShot2021-09-26at8_06_13PM.png.f1a2ccfdff694fe9cff8d63dec495f55.png
 

Has the CCPV been updated with new changes?


Sent from my iPhone using Tapatalk
6 hours ago, Jief_Machak said:

If you modify only one file, xcode compilation is half a second. It's a big time saver after having written a big piece of code, to catch all syntax errors. Just saying...

 

Source reference can be added, no problem.

 

Yes, it's not meant to replace build scripts. Once it compiles, I switch to GCC, with ebuild.sh, as it works better in gdb.

 

Also :

I can see that hebuild.sh and ebuild.sh are almost the same. One difference, for example, is that they don't use the same mtoc binary. Shouldn't we update and keep only one ? Redundancy is always dangerous...

 

 

grep ?

Annoying because it's command line, but easy to use.

I think Visual Studio Code do it too.

I use BBEdit.app. It can do regular expression searches. It has worksheets so you could also use grep while inside BBEdit.app. I use the worksheets for git and building as well. It's like Terminal.app but you can select commands and press enter to execute them and edit the output. Worksheets are an idea from the MPW days. MPW was cool because you could execute scripts to modify all the menus and add menu commands. It had commands to manipulate text windows, the current selection, etc. For example, MPW didn't have text block selection capabilities but you could make scripts/menu commands to add that functionality.

 

For EFI projects, I like using -save-temps in the compiler commands. Then I can search the .i files to find the include file where a struct or function is defined. They can be used to find compile problems (it shows what the preprocessor produces). It's one way to find the include file for an EFI protocol for example.

 

5 hours ago, chris1111 said:

Your  Sample Config.plist  

https://github.com/CloverHackyColor/CloverBootloader/commit/f0a20247e9edc34f9eb55a3d9e14bbda858734f5

is not good for CloverConfigValidator

227986425_ScreenShot2021-09-26at8_06_13PM.png.f1a2ccfdff694fe9cff8d63dec495f55.png

 

 

The first Warning can be ignored because the SMBIOS section is empty

The 2nd one is a kernel quirk which exists since OC 062.

Edited by 5T33Z0
4 hours ago, joevt said:

I use BBEdit.app. It can do regular expression searches. It has worksheets so you could also use grep while inside BBEdit.app. I use the worksheets for git and building as well. It's like Terminal.app but you can select commands and press enter to execute them and edit the output. Worksheets are an idea from the MPW days. MPW was cool because you could execute scripts to modify all the menus and add menu commands. It had commands to manipulate text windows, the current selection, etc. For example, MPW didn't have text block selection capabilities but you could make scripts/menu commands to add that functionality.

 

For EFI projects, I like using -save-temps in the compiler commands. Then I can search the .i files to find the include file where a struct or function is defined. They can be used to find compile problems (it shows what the preprocessor produces). It's one way to find the include file for an EFI protocol for example.

 

BBEdit is not free. I'll be happy with some open-source solution.

Thanks for your suggestion about  -save-temps.

 

11 hours ago, 5T33Z0 said:

@yapan4 So 0x3E7 is the new CsrActiveConfig for Big Sur/Monterey?

 

For beeing a "new" sample, I think it has an awful lot of obsolete options, patches, features and quirks for old OSes and CPUs enabled…

Nothing new. The system can work with a value == 0. It is your choice to cancel some limitations, for example if you use unsigned kexts or unapproved kext. 

You may set 0xFFF to cancel all limitations but sure about bit 0x10 which prevents SystemUpdate. So the working mask can be 0xFEF.

See explanations what each bit means and for a what. For example DTRACE. Are you really going to use it?

  • Like 2
On 9/25/2021 at 2:34 PM, Jief_Machak said:

@Slice Thing to have a look in CommonPatches.c, importing KernelCPUIDPatch() if needed (maybe there is a kernel cpuid patch mechanism we can use instead ?).

 

We can retranslate our settings for FakeCPUID to OC corresponding patch. May be it will be enough.

10 minutes ago, Slice said:

We can retranslate our settings for FakeCPUID to OC corresponding patch. May be it will be enough.

It's definitely not my area of expertise, but if you tell me what to do, I can help.

 

It's always best to avoid modifying OC to ease upgrade of OpenCorePkg. Although in that case, a whole new function is easy to import and won't generate conflict. Except maybe the line where that new function is called, but that's one line.

  • Like 2
12 hours ago, Jief_Machak said:

 

I can see that hebuild.sh and ebuild.sh are almost the same. One difference, for example, is that they don't use the same mtoc binary. Shouldn't we update and keep only one ? Redundancy is always dangerous...

 

mtoc difference should be excluded.

But the main difference that hebuild doesn't recompile all sources. It is needed for me to recompile a few changed files.

1 minute ago, Jief_Machak said:

It's definitely not my area of expertise, but if you tell me what to do, I can help.

 

It's always best to avoid modifying OC to ease upgrade of OpenCorePkg. Although in that case, a whole new function is easy to import and won't generate conflict. Except maybe the line where that new function is called, but that's one line.

Make it #if CLOVER_BUILD

I don't remember OC syntax so I may propose CPUIDpatch should be same as Clover's FakeCPUID, and mask should be 0xffffff

  • Like 1
4 hours ago, 5T33Z0 said:

 

The first Warning can be ignored because the SMBIOS section is empty

The 2nd one is a kernel quirk which exists since OC 062.

😀

If this is how it works exemple from my config.plist

13487941_ScreenShot2021-09-27at5_26_25AM.png.76caa4a81491e1864ef0a4725939e171.png
so this one  it's not good

227986425_ScreenShot2021-09-26at8_06_13PM.png.f1a2ccfdff694fe9cff8d63dec495f55.png.494278d41303e65dad92c1b3eb4cc0e6.png

And the secound one its the Sample Config.plist from source using by the Package Clover

I am just report a bug 

Edited by chris1111
  • Sad 1
48 minutes ago, chris1111 said:

😀

If this is how it works exemple from my config.plist

13487941_ScreenShot2021-09-27at5_26_25AM.png.76caa4a81491e1864ef0a4725939e171.png
so this one  it's not good

227986425_ScreenShot2021-09-26at8_06_13PM.png.f1a2ccfdff694fe9cff8d63dec495f55.png.494278d41303e65dad92c1b3eb4cc0e6.png

And the secound one its the Sample Config.plist from source using by the Package Clover

 

 

I don't have the same warnings with config-sample.plist using CCPV r5139 4be6350

 

Warning: FixHeaders exists in ACPI and ACPI/DSDT/Fixes. Delete FixHeaders from ACPI/DSDT/Fixes.

 

  • Haha 1
6 minutes ago, Matgen84 said:

 

I don't have the same warnings with config-sample.plist using CCPV r5139 4be6350

 

Warning: FixHeaders exists in ACPI and ACPI/DSDT/Fixes. Delete FixHeaders from ACPI/DSDT/Fixes.

 

Here Latest commit  (6a6c66a4a)

with latest CCPV 

 

Warning: ProductName is not defined, the whole SMBIOS dict is ignored at line 953.
Warning: FixHeaders exists in ACPI and ACPI/DSDT/Fixes. Delete FixHeaders from ACPI/DSDT/Fixes.

 

 

6 minutes ago, chris1111 said:

Here Latest commit  (6a6c66a4a)

with latest CCPV 

 

Warning: ProductName is not defined, the whole SMBIOS dict is ignored at line 953.
Warning: FixHeaders exists in ACPI and ACPI/DSDT/Fixes. Delete FixHeaders from ACPI/DSDT/Fixes.

 

 

 

I have the two lines. If I uncommented ProductName, warning for ProductName disappears. Right, for CCPV, there is a duplicate key for fix headers in config-sample.plist.

Edited by Matgen84
  • Like 1
5 hours ago, Slice said:

But the main difference that hebuild doesn't recompile all sources

Try ebuild.sh, it doesn't recompile all either. The cmd generated for compiling at hebuild.sh:567 is the same as ebuild.sh:579.

Use a filediff and you'll see that the only difference is -DLESS_DEBUG

 

It looks like hebuild.sh is outdate and does nothing more. Check with a file diff software.

 

 

5 hours ago, Slice said:
5 hours ago, Jief_Machak said:

It's definitely not my area of expertise, but if you tell me what to do, I can help.

 

It's always best to avoid modifying OC to ease upgrade of OpenCorePkg. Although in that case, a whole new function is easy to import and won't generate conflict. Except maybe the line where that new function is called, but that's one line.

Make it #if CLOVER_BUILD

I need everything enclosed with #if CLOVER_BUILD, so I can still compile a standalone OC from OpenCorePkg. But it's not what I meant.

 

I meant : every OC line changed maybe a conflict when upgrading OpenCorePkg. Conflict happens when we change a line inside a function. Not so much when adding a function.

So using OC mechanism is always a bit better if possible.

  • Like 1
1 hour ago, Jief_Machak said:

Try ebuild.sh, it doesn't recompile all either. The cmd generated for compiling at hebuild.sh:567 is the same as ebuild.sh:579.

Use a filediff and you'll see that the only difference is -DLESS_DEBUG

 

It looks like hebuild.sh is outdate and does nothing more. Check with a file diff software.

 

No, there are differences.

Screenshot 2021-09-27 at 19.28.08.png

I created hebuild.sh only for me because it is comfortable for me.

1 minute ago, Slice said:

No, there are differences.

Screenshot 2021-09-27 at 19.28.08.png

I created hebuild.sh only for me because it is comfortable for me.

I just said there isn't any difference in the build command line.

I'm pretty sure we can find a way to merge both in a way that it will still do what you want...

In the meantime, hebuild.sh has a problem with mtoc binary name (line 215)

There is interesting TextEditor 😉 instead of Xcode

 

Screenshot 2021-09-27 at 20.03.37.png

30 minutes ago, Jief_Machak said:

I just said there isn't any difference in the build command line.

I'm pretty sure we can find a way to merge both in a way that it will still do what you want...

In the meantime, hebuild.sh has a problem with mtoc binary name (line 215)

Yes mtoc can be corrected. I use gcc53.

Can the ebuild.sh script  be converted into makefile? To type make all...

×
×
  • Create New...