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 <piotr.pelplinski@intel.com>
Change-Id: I7df228481c4228e6dbdea2ef0dc1d5513069ee08

Reviewed-on: https://review.gerrithub.io/c/444256
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Piotr Pelplinski 2019-02-12 14:27:52 +01:00 committed by Jim Harris
parent 6d55c085c9
commit 98d60de60f
3 changed files with 9 additions and 6 deletions

3
.gitmodules vendored
View File

@ -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

11
configure vendored
View File

@ -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

1
ocf Submodule

@ -0,0 +1 @@
Subproject commit 2074495935888683a94b3915f70630ecb2a25e0d