oceanix icon indicating copy to clipboard operation
oceanix copied to clipboard

Compiling ACPI patches

Open JJTech0130 opened this issue 1 year ago • 6 comments

I think it would be a cool feature if it could compile ACPI patches during build, just to reduce the amount of opaque, non-human-readable files in the git repo.

JJTech0130 avatar Oct 28 '22 20:10 JJTech0130

Yes, that’s definitely within the scope of the project. However, I currently don’t have any customized ACPI code to compile. So I might not be able to test if it trielt works as intended. But I will try my best.

Feel free to ask questions on anything about the project as it is pretty much undocumented.

LEXUGE avatar Oct 28 '22 20:10 LEXUGE

However, I currently don’t have any customized ACPI code to compile.

Well, I was thinking that all the ACPI patches would be compiled at build time, even off-the-shelf ones. So you could just decompile on of them to test it. I also think their sources are around somewhere?

JJTech0130 avatar Oct 28 '22 22:10 JJTech0130

Even with the right process, decompiling and recompiling the patch may not give equivalent results. I will try work them out though

(I am usually super busy so don’t put high expectations on me, but I will get it done when time comes)

LEXUGE avatar Oct 28 '22 22:10 LEXUGE

decompiling and recompiling the patch may not give equivalent results

Well, here are the original sources. Hopefully, compiling the same source file should produce an identical output. I seem to remember that some metadata about what compiled it might have been embedded? That might affect things.

You'll also probably have to nixify the iasl tool: would be good to not depend on a random blogger for the Linux build 🤣 Here's the monorepo, and the downloads page

JJTech0130 avatar Oct 28 '22 22:10 JJTech0130

Thanks. And thankfully it’s already packaged as part of the nixpkgs

LEXUGE avatar Oct 28 '22 22:10 LEXUGE

Didn't see that, was searching for iasl 🤦‍♂️ I didn't figure out that the unstable build had macOS support for a bit. Turns out you have to use it like this to get the unstable build:

nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable && nix-channel --update
# For some reason ~ does not work here?
nix-shell -I nixpkgs=$HOME/.nix-defexpr/channels/unstable/ -p acpica-tools

(as you can probably tell, I'm new to Nix)

JJTech0130 avatar Oct 28 '22 23:10 JJTech0130