From 98d60de60f6f378549cfe1ad53d4c4c9265d9a55 Mon Sep 17 00:00:00 2001 From: Piotr Pelplinski Date: Tue, 12 Feb 2019 14:27:52 +0100 Subject: [PATCH] ocf: add ocf submodule This patch adds OCF as spdk submodule. By default ocf submodule is unused. Type ./configure --with-ocf to enable ocf compliation. Signed-off-by: Piotr Pelplinski Change-Id: I7df228481c4228e6dbdea2ef0dc1d5513069ee08 Reviewed-on: https://review.gerrithub.io/c/444256 Reviewed-by: Vitaliy Mysak Reviewed-by: Tomasz Zawadzki Reviewed-by: Darek Stojaczyk Reviewed-by: Jim Harris Reviewed-by: Ben Walker Tested-by: SPDK CI Jenkins --- .gitmodules | 3 +++ configure | 11 +++++------ ocf | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) create mode 160000 ocf diff --git a/.gitmodules b/.gitmodules index 1dc55f164..a163ceb16 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "isa-l"] path = isa-l url = https://github.com/spdk/isa-l.git +[submodule "ocf"] + path = ocf + url = https://github.com/Open-CAS/ocf.git diff --git a/configure b/configure index bc506acd1..2dd7d8d9d 100755 --- a/configure +++ b/configure @@ -69,6 +69,7 @@ function usage() echo " ocf Required to build OCF module." echo " If argument is directory, interpret it as root of OCF repo" echo " If argument is file, interpret it as compiled OCF lib" + echo " If no argument is specified, OCF git submodule is used by default" echo " example: /usr/src/ocf/" echo " isal Enabled by default on x86 architecture. Can be built without though." echo " No path required." @@ -285,6 +286,10 @@ for i in "$@"; do --without-ftl) CONFIG[FTL]=n ;; + --with-ocf) + CONFIG[OCF]=y + CONFIG[OCF_PATH]=$(readlink -f "./ocf") + ;; --with-ocf=*) CONFIG[OCF]=y CONFIG[OCF_PATH]=$(readlink -f ${i#*=}) @@ -456,12 +461,6 @@ if [[ "${CONFIG[REDUCE]}" = "y" ]]; then fi if [[ "${CONFIG[OCF]}" = "y" ]]; then - if [ -z "${CONFIG[OCF_PATH]}" ]; then - echo "When OCF module is enabled, you must specify" - echo "the OCF directory or path to OCF library using --with-ocf=path" - exit 1 - fi - # If OCF_PATH is a file, assume it is a library and use it to compile with if [ -f ${CONFIG[OCF_PATH]} ]; then CONFIG[CUSTOMOCF]=y diff --git a/ocf b/ocf new file mode 160000 index 000000000..207449593 --- /dev/null +++ b/ocf @@ -0,0 +1 @@ +Subproject commit 2074495935888683a94b3915f70630ecb2a25e0d