X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/bd504ef0e0b883cdd7917b73b3574eb9ce669905..39236c6e673c41db228275375ab7fdb0f837b292:/README diff --git a/README b/README index b71d70f72..0ac97d202 100644 --- a/README +++ b/README @@ -27,41 +27,7 @@ A. How to build XNU: make ARCH_CONFIGS=X86_64 -2) Building a Component - - Go to the top directory in your XNU project. - - If you are using a sh-style shell, run the following command: - $ . SETUP/setup.sh - - If you are using a csh-style shell, run the following command: - % source SETUP/setup.csh - - This will define the following environmental variables: - SRCROOT, OBJROOT, DSTROOT, SYMROOT - - From a component top directory: - - $ make all - - This builds a component for all architectures, kernel configurations, and - machine configurations defined in TARGET_CONFIGS (or alternately ARCH_CONFIGS - and KERNEL_CONFIGS). - - Example: - $(OBJROOT)/RELEASE_X86_64/osfmk/RELEASE/osfmk.filelist: list of objects in osfmk component - - From the component top directory: - - $ make mach_kernel - - This includes your component in the bootable image, mach_kernel, and - in the kernel binary with symbols, mach_kernel.sys. - - WARNING: If a component header file has been modified, you will have to do - the above procedure 1. - -3) Building DEBUG +2) Building DEBUG Define kernel configuration to DEBUG in your environment or when running a make command. Then, apply procedures 4, 5 @@ -82,7 +48,7 @@ A. How to build XNU: $(OBJROOT)/DEBUG_X86_64/osfmk/DEBUG/osfmk.filelist: list of objects in osfmk component $(OBJROOT)/DEBUG_X86_64/mach_kernel: bootable image -4) Building fat +3) Building fat Define architectures in your environment or when running a make command. Apply procedures 3, 4, 5 @@ -98,17 +64,17 @@ A. How to build XNU: $ export ARCH_CONFIGS="I386 X86_64" $ make exporthdrs all -5) Verbose make +4) Verbose make To display complete tool invocations rather than an abbreviated version, $ make VERBOSE=YES -6) Debug information formats +5) Debug information formats By default, a DWARF debug information repository is created during the install phase; this is a "bundle" named mach_kernel.dSYM To select the older STABS debug information format (where debug information is embedded in the mach_kernel.sys image), set the BUILD_STABS environment variable. $ export BUILD_STABS=1 $ make -7) Build check before integration +6) Build check before integration From the top directory, run: @@ -135,9 +101,11 @@ A. How to build XNU: -project Libsyscall # automatically generate BSD syscall stubs + -project xnu_quick_test # install xnu unit tests + -8) Creating tags and cscope +7) Creating tags and cscope Set up your build environment as per instructions in 2a @@ -150,15 +118,16 @@ A. How to build XNU: $ make cscope # this will build cscope database -9) Other makefile options +8) Other makefile options - $ make MAKEJOBS=-j8 # this will use 8 processes during the build. The default is 2x the number of active cores + $ make MAKEJOBS=-j8 # this will use 8 processes during the build. The default is 2x the number of active CPUS. + $ make -j8 # the standard command-line option is also accepted $ make -w # trace recursive make invocations. Useful in combination with VERBOSE=YES $ make BUILD_LTO=1 # build with LLVM Link Time Optimization (experimental) - $ make BUILD_INTEGRATED_ASSEMBLER=1 # build with LLVM integrated assembler (experimental) + $ make REMOTEBUILD=user@remotehost # perform build on remote host ============================================= B. How to install a new header file from XNU