zoukankan      html  css  js  c++  java
  • [转] Building xnu for OS X 10.10 Yosemite

    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 has been agreed-to with "sudo xcodebuild -license"
    2. Download the source for the dtrace and AvailabilityVersions projects, which are required dependencies, as well as xnu itself
      $ 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 -target ctfmerge ARCHS="x86_64" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst
      ...
      $ sudo ditto $PWD/dst/usr/local /usr/local
      Password:
      $ cd ..
      
    4. Install AvailabilityVersions
      $ tar zxf AvailabilityVersions-9.tar.gz
      $ cd AvailabilityVersions-9
      $ mkdir -p dst
      $ make install SRCROOT=$PWD DSTROOT=$PWD/dst
      $ 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 that can be passed on the command-line, such as BUILD_LTO=0 .

    Update: If you are attempting to add system calls, you 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 OBJROOT=$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=X86_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
  • 相关阅读:
    create-react-app
    简单的PHP的任务队列
    Yii框架中使用PHPExcel导出Excel文件
    Android 使用全局变量的问题
    Android 退出整个应用程序
    new DialogInterface.OnClickListener()报错的解决办法
    Yii 日期时间过滤列 filter
    Yii 时间戳格式化显示的问题
    PullToRefreshListView 应用讲解
    Android:Layout_weight的深刻理解
  • 原文地址:https://www.cnblogs.com/Proteas/p/4334489.html
Copyright © 2011-2022 走看看