Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the XNU kernel with GitHub Actions #1

Open
markus-oberhumer opened this issue Nov 28, 2023 · 10 comments
Open

Building the XNU kernel with GitHub Actions #1

markus-oberhumer opened this issue Nov 28, 2023 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@markus-oberhumer
Copy link

Created from issue upx/upx#612

@markus-oberhumer markus-oberhumer added enhancement New feature or request help wanted Extra attention is needed labels Nov 28, 2023
@jreiser
Copy link

jreiser commented Nov 28, 2023

Successfully building an xnu kernel will be a good beginning... but one important goal is to build a user-mode app that can be debugged in order to trace the execution of do_execve(), in order to discover the actual requirements for successful execution of a upx-compressed executable. So save the pieces (the *.o and *.a) and the sequence of commands (what make invokes).

@markus-oberhumer
Copy link
Author

Yes, but first step is to actually build that thing.

@markus-oberhumer
Copy link
Author

Actions are up and running: https://github.com/upx/upx-fork-apple-oss-distributions-xnu/actions

@tomnific and all: feedback/patches are highly welcome!

@markus-oberhumer
Copy link
Author

Two hours later: https://github.com/upx/upx-fork-apple-oss-distributions-xnu/actions/runs/7014467795

Currently stuck at fatal error: 'TrustCache/API.h' file not found

@markus-oberhumer
Copy link
Author

And another missing file: fatal error: 'os/firehose_buffer_private.h' file not found

https://github.com/upx/upx-fork-apple-oss-distributions-xnu/actions/runs/7015323992

(Build log artifact is now available)

@jreiser
Copy link

jreiser commented Nov 28, 2023

A couple months ago I also saw firehose_buffer_private.h missing. An internet search provided links to 3 candidates from previous Apple open-source releases. I picked one, and continued, hacking onward.

@markus-oberhumer
Copy link
Author

markus-oberhumer commented Nov 28, 2023

Found apple-oss-distributions--libdispatch.git/os/firehose_buffer_private.h. Will try to copy that file.

@markus-oberhumer
Copy link
Author

markus-oberhumer commented Nov 28, 2023

Current status on master branch: https://github.com/upx/upx-fork-apple-oss-distributions-xnu/actions/runs/7021092042

  • cannot find #include <TrustCache/API.h>; a Google search for TrustCacheQueryToken_t found nothing, so this is probably not public; how to disable this?

  • clang: error: unknown argument: "-mach_msg2"; no idea what this means, but I didn't look too closely

I'm done with this for now; build infrastructure and log file upload is in place, so hopefully somebody else will be able to improve things.

@osalbahr
Copy link

Would using https://github.com/blacktop/darwin-xnu-build help?

@markus-oberhumer
Copy link
Author

@osalbahr Thanks for that link, looks like they try to solve the same problem.

@jreiser Maybe you want to have a look at https://github.com/blacktop/darwin-xnu-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants