aboutsummaryrefslogtreecommitdiff
path: root/copy-builtin
Commit message (Collapse)AuthorAgeFilesLines
* Allow copy-builtin to work with modified sourcesMatthew Thode2018-10-171-1/+1
| | | | | | | | | | | | | | `scripts/make_gitrev.sh` had 'set -e' so if any command failed it would fail and cause copy-builtin to fail (copy-builtin also has `set -e`. This commit also simplifies scripts/make_gitrev.sh to always write a file by using a cleanup function. It also simplifies other areas of the script as well (making it much shorter). Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matthew Thode <mthode@mthode.org> Closes #8022 Closes #8025
* Create /proc/sys/kernel/spl/gitrev with git hashMatthew Ahrens2018-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing mechanisms for determining what code is running in the kernel do not always correctly report the git hash. The versions reported there do not reflect changes made since `configure` was run (i.e. incremental builds do not update the version) and they are misleading if git tags are not set up properly. This applies to `modinfo zfs`, `dmesg`, and `/sys/module/zfs/version`. There are complicated requirements on how the existing version is generated. Therefore we are leaving that alone, and adding a new mechanism to record and retrieve the git hash: `cat /proc/sys/kernel/spl/gitrev` The gitrev is re-generated at compile time, when running `make` (including for incremental builds). The value is the output of `git describe` (or "unknown" if not in a git repo or there are uncommitted changes). We're also removing /proc/sys/kernel/spl/version, which was never very useful. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Tim Chase <tim@chase2k.com> Signed-off-by: Matthew Ahrens <mahrens@delphix.com> Closes #7931 Closes #7965
* copy-builtin: SPL must be in Kbuild firstRichard Yao2018-06-151-0/+2
| | | | | | | | | | | | | | | The recent SPL merge caused a regression in kernels with ZFS integrated into the sources where our modules would be initialized in alphabetical order, despite icp requiring the spl module be loaded first. This caused kernels with ZFS builtin to fail to boot. We resolve this by adding a special case for the spl that lists it first. It is somewhat ugly, but it works. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Thode <prometheanfire@gentoo.org> Signed-off-by: Richard Yao <ryao@gentoo.org> Closes #7595 Closes #7606
* Update build system and packagingBrian Behlendorf2018-05-291-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minimal changes required to integrate the SPL sources in to the ZFS repository build infrastructure and packaging. Build system and packaging: * Renamed SPL_* autoconf m4 macros to ZFS_*. * Removed redundant SPL_* autoconf m4 macros. * Updated the RPM spec files to remove SPL package dependency. * The zfs package obsoletes the spl package, and the zfs-kmod package obsoletes the spl-kmod package. * The zfs-kmod-devel* packages were updated to add compatibility symlinks under /usr/src/spl-x.y.z until all dependent packages can be updated. They will be removed in a future release. * Updated copy-builtin script for in-kernel builds. * Updated DKMS package to include the spl.ko. * Updated stale AUTHORS file to include all contributors. * Updated stale COPYRIGHT and included the SPL as an exception. * Renamed README.markdown to README.md * Renamed OPENSOLARIS.LICENSE to LICENSE. * Renamed DISCLAIMER to NOTICE. Required code changes: * Removed redundant HAVE_SPL macro. * Removed _BOOT from nvpairs since it doesn't apply for Linux. * Initial header cleanup (removal of empty headers, refactoring). * Remove SPL repository clone/build from zimport.sh. * Use of DEFINE_RATELIMIT_STATE and DEFINE_SPINLOCK removed due to build issues when forcing C99 compilation. * Replaced legacy ACCESS_ONCE with READ_ONCE. * Include needed headers for `current` and `EXPORT_SYMBOL`. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> TEST_ZIMPORT_SKIP="yes" Closes #7556
* Fix copy-builtin to work with ASAN patchMatthew Thode2018-01-121-2/+4
| | | | | | | | | | Commit fed90353 didn't fully update the copy-builtin script as needed to perform in-kernel builds. Add the missing options and flags. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matthew Thode <mthode@mthode.org> Closes #7033 Closes #7037
* Allow c99 when building ZFS in the kernel treeBrian Behlendorf2017-03-271-2/+5
| | | | | | | | | | Commit 4a5d7f82 enabled building c99 out of the kernel tree. However, when building as part of the kernel different Makefiles are used and -std=gnu99 must additionially be added there. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #5919
* Illumos Crypto Port module added to enable native encryption in zfsTom Caputi2016-07-201-19/+0
| | | | | | | | | | | | | | | | | | | | A port of the Illumos Crypto Framework to a Linux kernel module (found in module/icp). This is needed to do the actual encryption work. We cannot use the Linux kernel's built in crypto api because it is only exported to GPL-licensed modules. Having the ICP also means the crypto code can run on any of the other kernels under OpenZFS. I ended up porting over most of the internals of the framework, which means that porting over other API calls (if we need them) should be fairly easy. Specifically, I have ported over the API functions related to encryption, digests, macs, and crypto templates. The ICP is able to use assembly-accelerated encryption on amd64 machines and AES-NI instructions on Intel chips that support it. There are place-holder directories for similar assembly optimizations for other architectures (although they have not been written). Signed-off-by: Tom Caputi <tcaputi@datto.com> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #4329
* Fix --enable-linux-builtinBrian Behlendorf2015-12-021-0/+2
| | | | | | | | | | Adding VPATH support, commit 47a4a6f, required that a `src` and `obj` line be added to the top of the Makefiles. They must be removed from the Makefiles when builtin. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue zfsonlinux/spl#481 Issue zfsonlinux/spl#498
* Consistent menuconfig nameRichard Yao2012-08-261-1/+1
| | | | | | | | Make name in Linux menuconfig consistent with those of other filesystems Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #897
* Add missing dependencies to ./copy-builtinRichard Yao2012-08-061-0/+3
| | | | | | | | | | | | | | ZFS depends on EFI_PARTITION, ZLIB_DEFLATE and ZLIB_INFLATE, but when ZFS is integrated with the kernel source tree, menuconfig does not enforce these dependencies. This can cause build failures in the case of ZLIB_DEFLATE and ZLIB_INFLATE where symbols are not found. This can also cause runtime failures in the case of EFI_PARTITION, where the kernel will not understand GPT partitions when creating pools from raw disks. We solve this by making menuconfig aware of these dependencies. Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #854
* Add script for builtin module building.Etienne Dechamps2012-07-261-0/+121
This commit introduces a "copy-builtin" script designed to prepare a kernel source tree for building ZFS as a builtin module. The script makes a full copy of all needed files, thus making the kernel source tree fully independent of the zfs source package. To achieve that, some compilation flags (-include, -I) have been moved to module/Makefile. This Makefile is only used when compiling external modules; when compiling builtin modules, a Kbuild file generated by the configure-builtin script is used instead. This makes sure Makefiles inside the kernel source tree does not contain references to the zfs source package. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #851