Open markus-oberhumer opened 1 year ago
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).
Yes, but first step is to actually build that thing.
Actions are up and running: https://github.com/upx/upx-fork-apple-oss-distributions-xnu/actions
@tomnific and all: feedback/patches are highly welcome!
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
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)
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.
Found apple-oss-distributions--libdispatch.git/os/firehose_buffer_private.h
. Will try to copy that file.
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.
Would using https://github.com/blacktop/darwin-xnu-build help?
@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
Created from issue https://github.com/upx/upx/issues/612