OpCore-Simplify icon indicating copy to clipboard operation
OpCore-Simplify copied to clipboard

Add Linux support

Open cocorico8 opened this issue 1 month ago • 2 comments

added support for linux

cocorico8 avatar Nov 09 '25 17:11 cocorico8

i am not sherlock holmes if i point out that this PR is incomplete and requires further work on the hardware detection stage.

in code i see one important issue: wifi networks are detected through NetworkManager, but it is not always used on linux systems.

dutixlf avatar Nov 09 '25 21:11 dutixlf

Review my code first. https://github.com/lzhoang2801/OpCore-Simplify/commit/92aa40f94ee884d8ebcf7ab2943293a87c88733e#diff-172ab378304cc9396b7728519425abca9bb050a95f9bba6c7b4edea43b3cea99

lzhoang2801 avatar Nov 10 '25 06:11 lzhoang2801

Review my code first. 92aa40f#diff-172ab378304cc9396b7728519425abca9bb050a95f9bba6c7b4edea43b3cea99

image

nmcli is NetworkManager's package

dutixlf avatar Nov 13 '25 17:11 dutixlf

@dutixlf Does it correct? https://wiki.archlinux.org/title/NetworkManager and https://github.com/NetworkManager/NetworkManager (latest commit from yesterday)

lzhoang2801 avatar Nov 13 '25 17:11 lzhoang2801

@dutixlf Does it correct? https://wiki.archlinux.org/title/NetworkManager and https://github.com/NetworkManager/NetworkManager (latest commit from yesterday)

I do not really understand what u mean. We probably just misunderstand each other. I said there's issue because not all linux setups use networkmanager as tool to manage network. I seen people use netctl or something.

dutixlf avatar Nov 13 '25 17:11 dutixlf

@dutixlf Does it correct? https://wiki.archlinux.org/title/NetworkManager and https://github.com/NetworkManager/NetworkManager (latest commit from yesterday)

I do not really understand what u mean. We probably just misunderstand each other. I said there's issue because not all linux setups use networkmanager as tool to manage network. I seen people use netctl or something.

Then, the installation of required packages should be added to the initial setup process. Thank you

lzhoang2801 avatar Nov 13 '25 17:11 lzhoang2801

@dutixlf Does it correct? https://wiki.archlinux.org/title/NetworkManager and https://github.com/NetworkManager/NetworkManager (latest commit from yesterday)

I do not really understand what u mean. We probably just misunderstand each other. I said there's issue because not all linux setups use networkmanager as tool to manage network. I seen people use netctl or something.

Then, the installation of required packages should be added to the initial setup process. Thank you

NetworkManager will conflict with another ones, so that is bad idea. I think i remember better solution. I'll throw it here when i go to my desk

dutixlf avatar Nov 13 '25 17:11 dutixlf

i am not sherlock holmes if i point out that this PR is incomplete and requires further work on the hardware detection stage.

in code i see one important issue: wifi networks are detected through NetworkManager, but it is not always used on linux systems.

sorry I've been busy, I'll try to find another way

cocorico8 avatar Nov 14 '25 09:11 cocorico8

There is a couple things wrong in this build, I am no programmer myself, but I found these bugs through usage with a dash of help from ChatGPT. Before you start attacking me for using AI, please read what I have to say first, because after I did the changes the AI told me to do, it fixed the Traceback problems of the python script.

Before the fix, I was getting:

================================================ Traceback (most recent call last): File "C:\Users\banba\Desktop\OpCore-Simplify-main\OpCore-Simplify.py", line 445, in o.main() ~~~~~~^^ File "C:\Users\banba\Desktop\OpCore-Simplify-main\OpCore-Simplify.py", line 427, in main self.build_opencore_efi(customized_hardware, disabled_devices, smbios_model, macos_version, needs_oclp) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\banba\Desktop\OpCore-Simplify-main\OpCore-Simplify.py", line 240, in build_opencore_efi self.co.genarate(hardware_report, disabled_devices, smbios_model, macos_version, needs_oclp, self.k.kexts, config_data) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\banba\Desktop\OpCore-Simplify-main\Scripts\config_prodigy.py", line 685, in genarate config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] = self.boot_args(hardware_report, macos_version, kexts, config) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\banba\Desktop\OpCore-Simplify-main\Scripts\config_prodigy.py", line 524, in boot_args if any(tuple(map(int, "3840x2160".split("x"))) <= tuple(map(int, monitor_info.get("Resolution").split("x"))) for monitor_name, monitor_info in hardware_report.get("Monitor", {}).items()) and \ ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\banba\Desktop\OpCore-Simplify-main\Scripts\config_prodigy.py", line 524, in if any(tuple(map(int, "3840x2160".split("x"))) <= tuple(map(int, monitor_info.get("Resolution").split("x"))) for monitor_name, monitor_info in hardware_report.get("Monitor", {}).items()) and \ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split' Press Enter to continue...

================================================

Then after I made changes in the config_prodigy.py, changed line 524 from "Resolution").split("x") to "Max Resolution", "0x0"

Guess what, it all works, the script runs fine.

There is another Linux build specific problem though:

During the macOS selection screen, when I type in the number corresponding to Mojave or Catalina (I choose these versions because that is what my laptop can handle), nothing happens, but if I choose a more recent version like Sequoia, it goes through. This problem do not happen on the Windows version of the script, only the Linux build.

I will also attach the fixed config_prodigy.py, please update the repository, every time it does the auto pull from here, it changes my modified config_prodigy back. Also if you don't believe me, test the changes yourself.

config_prodigy.py

masterfu678 avatar Nov 17 '25 11:11 masterfu678

@masterfu678 The issue with your report is that it doesn't comply with the OpCore Simplify format, you are trying to bypass the validation without understanding its purpose. I will soon add a section to verify the input report

lzhoang2801 avatar Nov 17 '25 12:11 lzhoang2801