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/contrib/openzfs/copy-builtin

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/sh
    2 
    3 set -ef
    4 
    5 usage()
    6 {
    7         echo "usage: $0 <kernel source tree>" >&2
    8         exit 1
    9 }
   10 
   11 [ "$#" -eq 1 ] || usage
   12 KERNEL_DIR="$1"
   13 
   14 if ! [ -e 'zfs_config.h' ]
   15 then
   16         echo "$0: you did not run configure, or you're not in the ZFS source directory."
   17         echo "$0: run configure with --with-linux=$KERNEL_DIR and --enable-linux-builtin."
   18 
   19         exit 1
   20 fi >&2
   21 
   22 make clean ||:
   23 make gitrev
   24 
   25 rm -rf "$KERNEL_DIR/include/zfs" "$KERNEL_DIR/fs/zfs"
   26 cp -R include "$KERNEL_DIR/include/zfs"
   27 cp -R module "$KERNEL_DIR/fs/zfs"
   28 cp zfs_config.h "$KERNEL_DIR/include/zfs/"
   29 
   30 cat > "$KERNEL_DIR/fs/zfs/Kconfig" <<EOF
   31 config ZFS
   32         tristate "ZFS filesystem support"
   33         depends on EFI_PARTITION
   34         select ZLIB_INFLATE
   35         select ZLIB_DEFLATE
   36         help
   37           This is the ZFS filesystem from the OpenZFS project.
   38 
   39           See https://github.com/openzfs/zfs
   40 
   41           To compile this file system support as a module, choose M here.
   42 
   43           If unsure, say N.
   44 EOF
   45 
   46 sed -i '/source "fs\/ext2\/Kconfig\"/i\source "fs/zfs/Kconfig"' "$KERNEL_DIR/fs/Kconfig"
   47 echo 'obj-$(CONFIG_ZFS) += zfs/' >> "$KERNEL_DIR/fs/Makefile"
   48 
   49 echo "$0: done. now you can build the kernel with ZFS support." >&2
   50 echo "$0: make sure you enable ZFS support (CONFIG_ZFS) before building." >&2

Cache object: 6bf15b3282ad48ec22bfafb701685499


[ 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.