[Go] Building xnu for OS X 10.10 Yosemite

Source: Internet
Author: User

Source:http://shantonu.blogspot.jp/2014/10/building-xnu-for-os-x-1010-yosemite.html

The OS X kernel source (XNU) has been released for OS x 10.10 Yosemite:?Here

Building XNU requires Xcode and some additional open-source (but not pre-installed) dependencies. You can build xnu manually by doing:


  1. Install OS X Yosemite and Xcode 6.1 from the Mac App Store, make sure the Xcode license have been agreed-to with "sudo xcod Ebuild-license "
  2. Download the source for the DTrace and availabilityversions projects, which is required dependencies, as well as Xnu Itse Lf
    $ Curl-o http://opensource.apple.com/tarballs/dtrace/dtrace-147.tar.gz$ Curl-o http://opensource.apple.com/ tarballs/availabilityversions/availabilityversions-9.tar.gz$ Curl-o http://opensource.apple.com/tarballs/xnu/ Xnu-2782.1.97.tar.gz
  3. Build and install CTF tools from DTrace
    $ tar zxf dtrace-147.tar.gz$ cd dtrace-147$ mkdir-p obj sym dst$ xcodebuild install-target ctfconvert-target ctfdump-t Arget ctfmerge archs= "x86_64" srcroot= $PWD objroot= $PWD/obj symroot= $PWD/sym dstroot= $PWD/dst...$ sudo ditto $PWD/dst/ usr/local/usr/localpassword:$ CD.
  4. Install availabilityversions
    $ tar zxf availabilityversions-9.tar.gz$ cd availabilityversions-9$ mkdir-p dst$ make install srcroot= $PWD DSTROOT= $PWD/d st$ sudo ditto $PWD/dst/usr/local ' xcrun-sdk macosx-show-sdk-path '/usr/local$ CD.
  5. Build XNU
    $ tar zxf xnu-2782.1.97.tar.gz$ cd xnu-2782.1.97$ make Sdkroot=macosx arch_configs=x86_64 kernel_configs=release

See Xnu's top-level README for additional build variables so can is passed on the command-line, such as build_lto=0? .

Update:if You is attempting to add system calls, your may also need to build Libsyscall.


  1. Download the Libsystem source
    $ Curl-o http://opensource.apple.com/tarballs/Libsystem/Libsystem-1213.tar.gz
  2. Install Libsystem Headers
    $ tar zxf libsystem-1213.tar.gz $ cd libsystem-1213$ xcodebuild installhdrs-sdk macosx archs= ' x86_64 i386 ' SRCROOT= $PWD O bjroot= $PWD/obj symroot= $PWD/sym dstroot= $PWD/dst$ sudo ditto $PWD/dst ' XCRUN-SDK macosx-show-sdk-path ' $ CD.
  3. Install Xnu and Libsyscall headers
    $ cd xnu-2782.1.97$ mkdir-p build.hdrs/obj build.hdrs/sym build.hdrs/dst$ make Installhdrs SDKROOT=macosx ARCH_CONFIGS=X 86_64 srcroot= $PWD objroot= $PWD/build.hdrs/obj symroot= $PWD/build.hdrs/sym dstroot= $PWD/build.hdrs/dst$ 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$ sudo ditto build.hdrs/dst ' xcrun-sdk Macosx-show-sdk-path '
  4. Build Libsyscall
    $ mkdir-p build.libsyscall/obj build.libsyscall/sym build.libsyscall/dst$ xcodebuild install-project libsyscall/ LIBSYSCALL.XCODEPROJ-SDK macosx archs= ' x86_64 i386 ' srcroot= $PWD/libsyscall objroot= $PWD/build.libsyscall/obj symroot= $PWD/build.libsyscall/sym dstroot= $PWD/build.libsyscall/dst

[Go] Building xnu for OS X 10.10 Yosemite

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.