commit | 0aa00204e01a01f657377ac2b626f421df7abb9a | [log] [tgz] |
---|---|---|
author | Dan Williams <dan.j.williams@intel.com> | Mon Mar 14 15:40:26 2016 -0700 |
committer | Dan Williams <dan.j.williams@intel.com> | Mon Mar 14 15:40:26 2016 -0700 |
tree | 25b991d1fbb84890f2a98abafae9a51e9af52ccd | |
parent | bcf2a0617bed2fe71c9d02522ad0f71eb5b48ef8 [diff] |
ndctl: fix definition of conditional functionality Resolve HAVE_NDCTL_ARS and HAVE_NDCTL_CLEAR_ERROR in libndctl.h from the results of configure. Otherwise, these will always be undefined for external programs which do not have access to config.h. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel
./autogen.sh
./configure --enable-local
make
make check
sudo make install
See the latest documentation for the NVDIMM kernel sub-system here:
The unit tests run by make check
require the nfit_test.ko module to be loaded. To build and install nfit_test.ko:
Obtain the kernel source. For example,git clone -b libnvdimm-for-next git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git
Configure the kernel to make some memory available to CMA (contiguous memory allocator). This will be used to emulate DAX.CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=200
orcma=200M
on the kernel command line.
Compile all components of the libnvdimm sub-system as modules:CONFIG_LIBNVDIMM=m
CONFIG_BLK_DEV_PMEM=m
CONFIG_ND_BLK=m
CONFIG_ND_BTT=m
Build and install the unit test enabled libnvdimm modules in the following order. The unit test modules need to be in place prior to the depmod
that runs during the final modules_install
make M=tools/testing/nvdimm/
sudo make M=tools/testing/nvdimm/ modules_install
sudo make modules_install
Now run make check
in the ndctl source directory, or ndctl test
, if ndctl was built with --enable-test
.