From patchwork Thu Jun 18 00:09:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 6632121 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2830DC0020 for ; Thu, 18 Jun 2015 00:12:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49839207E7 for ; Thu, 18 Jun 2015 00:12:12 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C344206B0 for ; Thu, 18 Jun 2015 00:12:09 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8B144182954; Wed, 17 Jun 2015 17:12:09 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id D2CF91828C6 for ; Wed, 17 Jun 2015 17:12:08 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 17 Jun 2015 17:12:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,636,1427785200"; d="scan'208";a="745490974" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.23.232.36]) by fmsmga002.fm.intel.com with ESMTP; 17 Jun 2015 17:12:08 -0700 Subject: [ndctl PATCH 3/6] ndctl: add README.md From: Dan Williams To: linux-nvdimm@lists.01.org Date: Wed, 17 Jun 2015 20:09:28 -0400 Message-ID: <20150618000928.13255.80532.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20150618000139.13255.82894.stgit@dwillia2-desk3.amr.corp.intel.com> References: <20150618000139.13255.82894.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-8-g92dd MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Include a URL for the upstream documentation and instructions on how to run the unit tests. Signed-off-by: Dan Williams --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000000..53c43c515009 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# ndctl +Utility library for managing the libnvdimm (non-volatile memory device) +sub-system in the Linux kernel + +Documentation +============= +See the latest documentation for the NVDIMM kernel sub-system here: + +https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next + +Unit Tests +========== +The unit tests run by `make check` require the nfit_test.ko module to be +loaded. To build and install nfit_test.ko: + +1. Obtain the kernel source. For example, +`git clone -b libnvdimm-for-next +git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git` + +2. 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=150` +**or** +`cma=150M` on the kernel command line. + +3. 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` + +4. 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 -C tools/testing/nvdimm/` +`sudo make -C tools/testing/nvdimm/ install` +`sudo make modules_install` + +5. Now run `make check` in the ndctl source directory, or `ndctl test`, + if ndctl was built with `--enable-test`. +