The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/README

Version: -  FREEBSD  -  FREEBSD11  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 How to build XNU:
    2 
    3 1) Type: "make"
    4 
    5   This builds all the components for all architectures defined in 
    6   ARCH_CONFIGS and for all kernel configurations defined in KERNEL_CONFIGS.
    7   By default, ARCH_CONFIGS contains one architecture, the build machine 
    8   architecture, and KERNEL_CONFIGS is set to build for RELEASE.
    9   This will also create a bootable image, mach_kernel,  and a kernel binary 
   10   with symbols, mach_kernel.sys.
   11 
   12   Example:
   13     $(OBJROOT)/RELEASE_PPC/osfmk/RELEASE/osfmk.o: pre-linked object for osfmk component
   14     $(OBJROOT)/RELEASE_PPC/mach_kernel: bootable image
   15 
   16 2) Building a Component
   17 
   18   Go to the top directory in your XNU project.
   19 
   20   If you are using a sh-style shell, run the following command:
   21      $ . SETUP/setup.sh
   22 
   23   If you are using a csh-style shell, run the following command:
   24      % source SETUP/setup.csh
   25 
   26   This will define the following environmental variables:
   27     SRCROOT, OBJROOT, DSTROOT, SYMROOT
   28 
   29   From a component top directory:
   30 
   31     $ make all
   32 
   33   This builds a component for all architectures defined in ARCH_CONFIGS 
   34   and for all kernel configurations defined in KERNEL_CONFIGS. 
   35   By default, ARCH_CONFIGS contains one architecture, the build machine 
   36   architecture, and KERNEL_CONFIGS is set to build for RELEASE .
   37 
   38   Example:
   39     $(OBJROOT)/RELEASE_PPC/osfmk/RELEASE/osfmk.o: pre-linked object for osfmk component
   40 
   41   From the component top directory:
   42 
   43     $ make mach_kernel
   44 
   45   This includes your component in the bootable image, mach_kernel,  and 
   46   in the kernel binary with symbols, mach_kernel.sys.
   47 
   48   WARNING: If a component header file has been modified, you will have to do 
   49            the above procedure 1.
   50 
   51 3) Building DEBUG
   52 
   53   Define KERNEL_CONFIGS to DEBUG in your environment or when running a 
   54   make command.  Then, apply procedures 4, 5
   55 
   56   $ make KERNEL_CONFIGS=DEBUG all
   57 
   58   or
   59 
   60   $ export KERNEL_CONFIGS=DEBUG
   61   $ make all
   62 
   63   Example:
   64     $(OBJROOT)/DEBUG_PPC/osfmk/DEBUG/osfmk.o: pre-linked object for osfmk component
   65     $(OBJROOT)/DEBUG_PPC/mach_kernel: bootable image
   66 
   67 4) Building fat
   68 
   69   Define ARCH_CONFIGS in your environment or when running a make command.
   70   Apply procedures 3, 4, 5
   71 
   72   $ make ARCH_CONFIGS="PPC I386" exporthdrs all
   73 
   74   or
   75 
   76   $ export ARCH_CONFIGS="PPC I386"
   77   $ make exporthdrs all
   78 
   79 5) Build check before integration
   80 
   81   From the top directory, run:
   82 
   83     $ ~rc/bin/buildit . -arch ppc -arch i386 -noinstallsrc -nosum
   84 
   85 6) Creating tags and cscope
   86 
   87   Set up your build environment as per instructions in 2a
   88 
   89   From the top directory, run:
   90 
   91     $ make tags         # this will build ctags and etags
   92 
   93     $ make cscope       # this will build cscope database
   94 

Cache object: 7325e5cd2b912c86b4ba05139dca39a9


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.