{"id":25557903,"url":"https://github.com/puredarwin/building-xnu-16.7-kernel-guide","last_synced_at":"2025-07-24T06:03:54.740Z","repository":{"id":75748755,"uuid":"102686149","full_name":"PureDarwin/Building-XNU-16.7-Kernel-Guide","owner":"PureDarwin","description":"xnu-3789.70.16","archived":false,"fork":false,"pushed_at":"2017-09-07T03:22:16.000Z","size":2,"stargazers_count":40,"open_issues_count":0,"forks_count":10,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-06-17T21:45:12.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PureDarwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-07T03:19:33.000Z","updated_at":"2024-09-30T09:55:18.000Z","dependencies_parsed_at":"2023-06-07T13:45:09.763Z","dependency_job_id":null,"html_url":"https://github.com/PureDarwin/Building-XNU-16.7-Kernel-Guide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PureDarwin/Building-XNU-16.7-Kernel-Guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureDarwin%2FBuilding-XNU-16.7-Kernel-Guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureDarwin%2FBuilding-XNU-16.7-Kernel-Guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureDarwin%2FBuilding-XNU-16.7-Kernel-Guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureDarwin%2FBuilding-XNU-16.7-Kernel-Guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PureDarwin","download_url":"https://codeload.github.com/PureDarwin/Building-XNU-16.7-Kernel-Guide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureDarwin%2FBuilding-XNU-16.7-Kernel-Guide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266801351,"owners_count":23986371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-20T15:19:57.020Z","updated_at":"2025-07-24T06:03:54.728Z","avatar_url":"https://github.com/PureDarwin.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Guide Building XNU 16.7 (xnu-3789.70.16)**\nFor Building XNU 16.7 from start to finish\nRequirements macOS 10.12.6 and Xcode 8.3.3\n\n**These must be done in order or it will not build**\n\nOpen terminal.app // copy each command in as you go.   \n\nCreating workspace\n*************************************\n\u003e \n```\nmkdir -p ~/Desktop/xnu_build\n```\n************************************\n\u003e\n```\ncd ~/Desktop/xnu_build\n```\n\n#### Curling needed Sources\n************************************\n\u003e\n```\ncurl -O https://opensource.apple.com/tarballs/dtrace/dtrace-209.50.12.tar.gz \u0026\u0026 \ncurl -O https://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-26.50.4.tar.gz \u0026\u0026 \ncurl -O https://opensource.apple.com/tarballs/xnu/xnu-3789.70.16.tar.gz \u0026\u0026 \ncurl -O https://opensource.apple.com/tarballs/libdispatch/libdispatch-703.50.37.tar.gz \u0026\u0026 \ncurl -O https://opensource.apple.com/tarballs/libplatform/libplatform-126.50.8.tar.gz\n```\n\n#### Extracting and Removing Tar.gz files\n************************************\n\u003e\n```\nfor file in *.tar.gz; do tar -zxf $file; done \u0026\u0026 rm -f *.tar.gz\n```\n\n#### Building Dtrace's CTF\"s Bianries\n************************************\n\u003e\n```\ncd dtrace-209.50.12\n```\n\n************************************\n\u003e\n```\nmkdir -p obj sym dst\n```\n\n************************************\n\u003e\n```\nxcodebuild install -target ctfconvert -target ctfdump -target ctfmerge ARCHS=\"x86_64\" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst\n```\n\n************************************\n\u003e\n```\nsudo ditto $PWD/dst/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain   \n```\n\n#### Installing Availability\n************************************\n\u003e\n```\ncd ../AvailabilityVersions-26.50.4/ \n```\n\n\u003e\n```\nmkdir -p dst   \n```\n\u003e\n```\nmake install SRCROOT=$PWD DSTROOT=$PWD/dst\n```\n\n************************************\n\u003e\n```\nsudo ditto $PWD/dst/usr/local `xcrun -sdk macosx -show-sdk-path`/usr/local\n```\n#### Installing Headers to build libfirehose_kernel.a for XNU\n************************************\n\u003e\n```\ncd ../xnu-3789.70.16/\n```\n\n\u003e\n```\nmkdir -p BUILD.hdrs/obj BUILD.hdrs/sym BUILD.hdrs/dst\n```\n\n\u003e\n```\nmake installhdrs SDKROOT=macosx ARCH_CONFIGS=X86_64 SRCROOT=$PWD OBJROOT=$PWD/BUILD.hdrs/obj SYMROOT=$PWD/BUILD.hdrs/sym DSTROOT=$PWD/BUILD.hdrs/dst\n```\n\n\u003e\n```\nsudo xcodebuild installhdrs -project libsyscall/Libsyscall.xcodeproj -sdk macosx ARCHS='x86_64 i386' SRCROOT=$PWD/libsyscall OBJROOT=$PWD/BUILD.hdrs/obj SYMROOT=$PWD/BUILD.hdrs/sym DSTROOT=$PWD/BUILD.hdrs/dst   \n```\n\u003e\n```\nsudo ditto BUILD.hdrs/dst `xcrun -sdk macosx -show-sdk-path`  \n```\n\n### Copying libplatform source needed for libfirehose_kernel.a\n************************************\n\u003e \n```\ncd ../libplatform-126.50.8\n```\n************************************\n\u003e \n```\nsudo ditto $PWD/include `xcrun -sdk macosx -show-sdk-path`/usr/local/include   \n```\n\n#### Building libfirehose_kernel.a\n************************************\n\u003e \n```\ncd ../libdispatch-703.50.37\n```\n\n\u003e \n```\nmkdir -p BUILD.hdrs/obj BUILD.hdrs/sym BUILD.hdrs/dst\n```\n\u003e \n```\nsudo xcodebuild install -project libdispatch.xcodeproj -target libfirehose_kernel -sdk macosx ARCHS='x86_64 i386' SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst\n```\n\u003e\n```\nsudo ditto $PWD/dst/usr/local `xcrun -sdk macosx -show-sdk-path`/usr/local\n```\n#### Building XNU\n************************************\n\u003e \n```\ncd ../xnu-3789.70.16/\n```\n************************************\n\u003e \n```\nmake SDKROOT=macosx ARCH_CONFIGS=X86_64 KERNEL_CONFIGS=RELEASE\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuredarwin%2Fbuilding-xnu-16.7-kernel-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuredarwin%2Fbuilding-xnu-16.7-kernel-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuredarwin%2Fbuilding-xnu-16.7-kernel-guide/lists"}