mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 13:46:25 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
KBUILD_EXTRA_SYMBOLS=$(src)/../scst/src/Module.symvers
|
||||
ccflags-y += -I$(src)/../scst/include
|
||||
|
||||
obj-$(CONFIG_FCST) += fcst.o
|
||||
|
||||
fcst-objs := \
|
||||
ft_cmd.o \
|
||||
ft_io.o \
|
||||
ft_scst.o \
|
||||
ft_sess.o
|
||||
+1
-11
@@ -32,11 +32,6 @@ export CONFIG_FCST := m
|
||||
|
||||
MODULE_NAME = fcst
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
include $(src)/Makefile_in-tree
|
||||
else
|
||||
######### BEGIN OUT-OF-TREE RULES #########
|
||||
|
||||
ifndef PREFIX
|
||||
PREFIX=/usr/local
|
||||
endif
|
||||
@@ -79,13 +74,8 @@ uninstall:
|
||||
rm -f $(INSTALL_DIR)/$(MODULE_NAME).ko
|
||||
-/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER)
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c .*.d .depend *~ \
|
||||
Module.symvers Module.markers modules.order
|
||||
rm -rf .tmp_versions
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
+21
-13
@@ -99,8 +99,20 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
# Use make instead of $(MAKE) to get rid of command-line option -i
|
||||
run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi)
|
||||
# Use make instead of $(MAKE) to get rid of command-line option -i. Enable
|
||||
# -Wno-deprecated-declarations for the RHEL 7.x kernels.
|
||||
run_conftest = $(shell \
|
||||
export KCFLAGS="-Wno-deprecated-declarations"; \
|
||||
if [ "0$(V)" -gt 0 ]; then \
|
||||
output=/dev/stdout; \
|
||||
else \
|
||||
output=conftest/$1/build-output-$(KVER).txt; \
|
||||
fi; \
|
||||
if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then \
|
||||
echo "$(strip $2)"; \
|
||||
else \
|
||||
echo "$(strip $3)"; \
|
||||
fi)
|
||||
run_conftest_bool = $(call run_conftest,$1,-D$(strip $2)=1,-D$(strip $2)=0)
|
||||
|
||||
CONFTESTS = $(shell ls -d conftest/*)
|
||||
@@ -164,18 +176,14 @@ uninstall:
|
||||
-/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER)
|
||||
|
||||
clean:
|
||||
rm -rf include/iscsi_scst_itf_ver.h
|
||||
rm -rf conftest/*/{build-output,result}*.txt
|
||||
for d in conftest/* kernel kernel/isert-scst; do \
|
||||
[ -d "$$d" ] && $(MAKE) -C $(KDIR) M=$(shell pwd)/$$d $@ & \
|
||||
rm -f $$d/result*.txt; \
|
||||
done; \
|
||||
wait
|
||||
$(MAKE) -C usr $@
|
||||
$(MAKE) -C $(KDIR) M=$(KMOD) $@
|
||||
$(MAKE) -C $(KDIR) M=$(ISERTMOD) $@
|
||||
rm -f kernel/Module.symvers \
|
||||
kernel/Module.markers kernel/modules.order \
|
||||
kernel/isert-scst/Module.symvers \
|
||||
kernel/isert-scst/Module.markers kernel/isert-scst/modules.order \
|
||||
include/iscsi_scst_itf_ver.h
|
||||
rm -rf conftest/*/*.ko conftest/*/*.mod.c conftest/*/Module.symvers conftest/*/*.o \
|
||||
conftest/*/*.o.cmd conftest/*/*.ko.cmd conftest/*/.*.o.cmd conftest/*/.*.ko.cmd \
|
||||
conftest/*/*.order conftest/*/.*.o.d conftest/*/.tmp_versions/ \
|
||||
conftest/*/result*.txt
|
||||
|
||||
extraclean: clean
|
||||
rm -f kernel/*.orig kernel/*.rej \
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers \
|
||||
-I$(src)/../scst/include -I$(src)/include \
|
||||
-DDEFAULT_SYMBOL_NAMESPACE=QLA32GB
|
||||
|
||||
ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET)
|
||||
endif
|
||||
|
||||
obj-m := qla2xxx_scst.o
|
||||
qla2xxx_scst-objs := \
|
||||
qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
|
||||
qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \
|
||||
qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_nvme.o
|
||||
@@ -44,23 +44,6 @@ endif
|
||||
|
||||
INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra
|
||||
|
||||
ifneq ($(PATCHLEVEL),)
|
||||
ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers \
|
||||
-I$(src)/../scst/include -I$(src)/include \
|
||||
-DDEFAULT_SYMBOL_NAMESPACE=QLA32GB
|
||||
|
||||
ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET)
|
||||
endif
|
||||
|
||||
obj-m := qla2xxx_scst.o
|
||||
qla2xxx_scst-objs := \
|
||||
qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
|
||||
qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \
|
||||
qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_nvme.o
|
||||
else
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) \
|
||||
$(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET
|
||||
@@ -76,11 +59,9 @@ uninstall:
|
||||
-/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER)
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
clean:
|
||||
@$(MAKE) -C $(KDIR) M=$(shell pwd) clean
|
||||
@$(RM) tags Modules.symvers module.symvers Module.markers modules.order
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \
|
||||
$(src)/../Module.symvers
|
||||
ccflags-y += -I$(src)/../../scst/include -I$(src)/..
|
||||
ccflags-y += -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR
|
||||
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=y
|
||||
endif
|
||||
|
||||
obj-m := qla2x00tgt.o
|
||||
qla2x00tgt-objs := qla_tgt.o scst_qla2xxx.o
|
||||
@@ -51,34 +51,11 @@ ifeq ($(INSTALL_MOD_PATH),)
|
||||
export INSTALL_MOD_PATH := $(DESTDIR)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_2X_MODULE),)
|
||||
QLA2XXX_INC_DIR := $(KDIR)/drivers/scsi/qla2xxx
|
||||
else
|
||||
QLA2XXX_INC_DIR := $(src)/..
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
QLA2XXX_DIR := $(shell pwd)/..
|
||||
QLA2XXX_SCST := qla2xxx_scst
|
||||
endif
|
||||
|
||||
ifneq ($(PATCHLEVEL),)
|
||||
|
||||
KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \
|
||||
$(src)/../Module.symvers
|
||||
ccflags-y += -I$(src)/../../scst/include
|
||||
ccflags-y += -W -Wno-unused-parameter -Wno-missing-field-initializers
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR
|
||||
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=y
|
||||
endif
|
||||
|
||||
ccflags-y += -I$(QLA2XXX_INC_DIR)
|
||||
|
||||
obj-m := qla2x00tgt.o
|
||||
qla2x00tgt-objs := qla_tgt.o scst_qla2xxx.o
|
||||
else
|
||||
######### BEGIN OUT-OF-TREE RULES #########
|
||||
|
||||
ifndef PREFIX
|
||||
PREFIX=/usr/local
|
||||
endif
|
||||
@@ -112,13 +89,11 @@ qla2xxx_scst:
|
||||
M=$(QLA2XXX_DIR) -C $(QLA2XXX_DIR) all
|
||||
endif
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c .*.d .depend *~ \
|
||||
Module.symvers Module.markers modules.order
|
||||
rm -rf .tmp_versions
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
$(MAKE) -C $(QLA2XXX_DIR) $@
|
||||
endif
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers -I$(src)/../scst/include\
|
||||
-DDEFAULT_SYMBOL_NAMESPACE=QLA16GB
|
||||
|
||||
ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET)
|
||||
endif
|
||||
|
||||
obj-m := qla2xxx_scst.o
|
||||
qla2xxx_scst-objs := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
|
||||
qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o qla_nx.o
|
||||
+1
-17
@@ -43,20 +43,6 @@ endif
|
||||
|
||||
INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra
|
||||
|
||||
ifneq ($(PATCHLEVEL),)
|
||||
ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers -I$(src)/../scst/include\
|
||||
-DDEFAULT_SYMBOL_NAMESPACE=QLA16GB
|
||||
|
||||
ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET)
|
||||
endif
|
||||
|
||||
obj-m := qla2xxx_scst.o
|
||||
qla2xxx_scst-objs := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
|
||||
qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o qla_nx.o
|
||||
else
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) \
|
||||
$(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET
|
||||
@@ -72,11 +58,9 @@ uninstall:
|
||||
-/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER)
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
clean:
|
||||
@$(MAKE) -C $(KDIR) M=$(shell pwd) clean
|
||||
@$(RM) tags Modules.symvers module.symvers Module.markers modules.order
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \
|
||||
$(src)/../Module.symvers
|
||||
ccflags-y += -I$(src)/../../scst/include -I$(src)/..
|
||||
ccflags-y += -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR
|
||||
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=y
|
||||
endif
|
||||
|
||||
obj-m := qla2x00tgt.o
|
||||
qla2x00tgt-objs := qla2x00t.o
|
||||
@@ -50,34 +50,11 @@ ifeq ($(INSTALL_MOD_PATH),)
|
||||
export INSTALL_MOD_PATH := $(DESTDIR)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_2X_MODULE),)
|
||||
QLA2XXX_INC_DIR := $(KDIR)/drivers/scsi/qla2xxx
|
||||
else
|
||||
QLA2XXX_INC_DIR := $(src)/..
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
QLA2XXX_DIR := $(shell pwd)/..
|
||||
QLA2XXX_SCST := qla2xxx_scst
|
||||
endif
|
||||
|
||||
ifneq ($(PATCHLEVEL),)
|
||||
|
||||
KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \
|
||||
$(src)/../Module.symvers
|
||||
ccflags-y += -I$(src)/../../scst/include
|
||||
ccflags-y += -W -Wno-unused-parameter -Wno-missing-field-initializers
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR
|
||||
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=y
|
||||
endif
|
||||
|
||||
ccflags-y += -I$(QLA2XXX_INC_DIR)
|
||||
|
||||
obj-m := qla2x00tgt.o
|
||||
qla2x00tgt-objs := qla2x00t.o
|
||||
else
|
||||
######### BEGIN OUT-OF-TREE RULES #########
|
||||
|
||||
ifndef PREFIX
|
||||
PREFIX=/usr/local
|
||||
endif
|
||||
@@ -111,13 +88,11 @@ qla2xxx_scst:
|
||||
M=$(QLA2XXX_DIR) -C $(QLA2XXX_DIR) all
|
||||
endif
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c .*.d .depend *~ \
|
||||
Module.symvers Module.markers modules.order
|
||||
rm -rf .tmp_versions
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
$(MAKE) -C $(QLA2XXX_DIR) $@
|
||||
endif
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
@@ -459,7 +459,7 @@ if [ "${include_fcst}" = true ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
add_file "fcst/Makefile_in-tree" \
|
||||
add_file "fcst/Kbuild" \
|
||||
"drivers/scst/fcst/Makefile"
|
||||
|
||||
add_file "fcst/Kconfig" "drivers/scst/fcst/Kconfig"
|
||||
|
||||
@@ -42,6 +42,7 @@ uninstall:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
clean:
|
||||
rm -f include/build_mode.h
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
extraclean:
|
||||
|
||||
@@ -805,10 +805,10 @@ enum umh_wait {
|
||||
|
||||
/* <linux/kobject_ns.h> */
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
/*
|
||||
* See also commit 8488a38f4d2f ("kobject: Break the kobject namespace defs
|
||||
* into their own header") # v2.6.36.
|
||||
* See also commit 608b4b9548de ("netns: Teach network device kobjects which
|
||||
* namespace they are in.") # v2.6.35.
|
||||
*/
|
||||
enum kobj_ns_type {
|
||||
KOBJ_NS_TYPE_NET = 1,
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# See also Documentation/core-api/symbol-namespaces.rst for more information
|
||||
# about DEFAULT_SYMBOL_NAMESPACE.
|
||||
ccflags-y += -I$(src)/../include $(call cc-option,-Wextra) \
|
||||
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare\
|
||||
-DDEFAULT_SYMBOL_NAMESPACE=SCST\
|
||||
$(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM)
|
||||
|
||||
#ccflags-y += -DCONFIG_SCST_STRICT_SERIALIZING
|
||||
#ccflags-y += -DCONFIG_SCST_USE_EXPECTED_VALUES
|
||||
#ccflags-y += -DCONFIG_SCST_TEST_IO_IN_SIRQ
|
||||
#ccflags-y += -DCONFIG_SCST_ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_RETRY
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_OOM
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_SN
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_SYSFS_EAGAIN
|
||||
|
||||
# If defined, makes SCST zero allocated data buffers.
|
||||
# Undefining it considerably improves performance and eases CPU load,
|
||||
# but could create a security hole (information leakage), so
|
||||
# enable it if you have strict security requirements.
|
||||
#ccflags-y += -DSCST_STRICT_SECURITY
|
||||
|
||||
obj-m := scst.o
|
||||
|
||||
scst-y += scst_copy_mgr.o
|
||||
scst-y += scst_debug.o
|
||||
scst-y += scst_dlm.o
|
||||
scst-y += scst_event.o
|
||||
scst-y += scst_lib.o
|
||||
scst-y += scst_local_cmd.o
|
||||
scst-y += scst_main.o
|
||||
scst-y += scst_mem.o
|
||||
scst-y += scst_no_dlm.o
|
||||
scst-y += scst_pres.o
|
||||
scst-y += scst_sysfs.o
|
||||
scst-y += scst_targ.o
|
||||
scst-y += scst_tg.o
|
||||
obj-$(CONFIG_SCST) += scst.o dev_handlers/
|
||||
+6
-54
@@ -35,51 +35,6 @@ SHELL=/bin/bash
|
||||
|
||||
DEV_HANDLERS_DIR = dev_handlers
|
||||
|
||||
ifneq ($(PATCHLEVEL),)
|
||||
# See also Documentation/core-api/symbol-namespaces.rst for more information
|
||||
# about DEFAULT_SYMBOL_NAMESPACE.
|
||||
ccflags-y += -I$(src)/../include $(call cc-option,-Wextra) \
|
||||
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare\
|
||||
-DDEFAULT_SYMBOL_NAMESPACE=SCST\
|
||||
$(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM)
|
||||
|
||||
#ccflags-y += -DCONFIG_SCST_STRICT_SERIALIZING
|
||||
#ccflags-y += -DCONFIG_SCST_USE_EXPECTED_VALUES
|
||||
#ccflags-y += -DCONFIG_SCST_TEST_IO_IN_SIRQ
|
||||
#ccflags-y += -DCONFIG_SCST_ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_RETRY
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_OOM
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_SN
|
||||
#ccflags-y += -DCONFIG_SCST_DEBUG_SYSFS_EAGAIN
|
||||
|
||||
# If defined, makes SCST zero allocated data buffers.
|
||||
# Undefining it considerably improves performance and eases CPU load,
|
||||
# but could create a security hole (information leakage), so
|
||||
# enable it if you have strict security requirements.
|
||||
#ccflags-y += -DSCST_STRICT_SECURITY
|
||||
|
||||
obj-m := scst.o
|
||||
|
||||
scst-y += scst_copy_mgr.o
|
||||
scst-y += scst_debug.o
|
||||
scst-y += scst_dlm.o
|
||||
scst-y += scst_event.o
|
||||
scst-y += scst_lib.o
|
||||
scst-y += scst_local_cmd.o
|
||||
scst-y += scst_main.o
|
||||
scst-y += scst_mem.o
|
||||
scst-y += scst_no_dlm.o
|
||||
scst-y += scst_pres.o
|
||||
scst-y += scst_sysfs.o
|
||||
scst-y += scst_targ.o
|
||||
scst-y += scst_tg.o
|
||||
obj-$(CONFIG_SCST) += scst.o dev_handlers/
|
||||
|
||||
obj-$(BUILD_DEV) += $(DEV_HANDLERS_DIR)/
|
||||
|
||||
else
|
||||
######### BEGIN OUT-OF-TREE RULES #########
|
||||
|
||||
ifeq ($(KVER),)
|
||||
ifeq ($(KDIR),)
|
||||
KVER := $(shell uname -r)
|
||||
@@ -115,10 +70,11 @@ $(SCST_INTF_VER_FILE): $(SCST_INC_DIR)/scst.h $(SCST_INC_DIR)/scst_const.h $(SCS
|
||||
|
||||
all: $(SCST_INTF_VER_FILE)
|
||||
$(MAKE) -C certs KDIR=$(KDIR)
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_DEV=m
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd)
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd)/dev_handlers
|
||||
|
||||
scst:
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_DEV=n
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd)
|
||||
|
||||
install: all
|
||||
@if [ -z "$(DESTDIR)" ] && \
|
||||
@@ -172,17 +128,13 @@ uninstall:
|
||||
-/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER)
|
||||
rm -rf $(INSTALL_DIR_H)
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra
|
||||
INSTALL_DIR_H := $(DESTDIR)$(PREFIX)/include/scst
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c .*.d .depend Modules.symvers \
|
||||
Module.symvers Module.markers modules.order
|
||||
rm -rf .tmp_versions
|
||||
cd $(DEV_HANDLERS_DIR) && $(MAKE) $@
|
||||
rm -f $(SCST_INTF_VER_FILE)
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
$(MAKE) -C $(DEV_HANDLERS_DIR) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f $(SCST_INTF_VER_FILE)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
KBUILD_EXTRA_SYMBOLS=$(src)/../Module.symvers
|
||||
ccflags-y += -I$(src)/../../include \
|
||||
$(call cc-option,-Wextra) \
|
||||
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare
|
||||
#ccflags-y += -DCONFIG_DEBUG_EXT_COPY_REMAP
|
||||
|
||||
obj-m := scst_cdrom.o scst_changer.o scst_disk.o scst_modisk.o scst_tape.o \
|
||||
scst_vdisk.o scst_raid.o scst_processor.o scst_user.o
|
||||
@@ -29,19 +29,6 @@
|
||||
|
||||
SHELL=/bin/bash
|
||||
|
||||
ifneq ($(PATCHLEVEL),)
|
||||
KBUILD_EXTRA_SYMBOLS=$(src)/../../Module.symvers
|
||||
ccflags-y += -I$(src)/../../include \
|
||||
$(call cc-option,-Wextra) \
|
||||
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare
|
||||
#ccflags-y += -DCONFIG_DEBUG_EXT_COPY_REMAP
|
||||
|
||||
obj-m := scst_cdrom.o scst_changer.o scst_disk.o scst_modisk.o scst_tape.o \
|
||||
scst_vdisk.o scst_raid.o scst_processor.o scst_user.o
|
||||
|
||||
else
|
||||
######### BEGIN OUT-OF-TREE RULES #########
|
||||
|
||||
ifeq ($(KVER),)
|
||||
ifeq ($(KDIR),)
|
||||
KVER := $(shell uname -r)
|
||||
@@ -77,13 +64,8 @@ install: all
|
||||
uninstall:
|
||||
rm -f $(INSTALL_DIR)/dev_handlers/scst_*.ko
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c .*.d .depend Modules.symvers \
|
||||
Module.symvers Module.markers modules.order
|
||||
rm -rf .tmp_versions
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
KBUILD_EXTRA_SYMBOLS=$(src)/../scst/src/Module.symvers
|
||||
ccflags-y += -I$(src)/../scst/include
|
||||
ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter\
|
||||
-Wno-missing-field-initializers
|
||||
|
||||
obj-m := scst_local.o
|
||||
+1
-15
@@ -6,16 +6,6 @@ SHELL=/bin/bash
|
||||
|
||||
KMOD := $(shell pwd)/kernel
|
||||
|
||||
ifneq ($(PATCHLEVEL),)
|
||||
KBUILD_EXTRA_SYMBOLS=$(src)/../scst/src/Module.symvers
|
||||
ccflags-y += -I$(src)/../scst/include
|
||||
ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter\
|
||||
-Wno-missing-field-initializers
|
||||
|
||||
obj-m := scst_local.o
|
||||
else
|
||||
######### BEGIN OUT-OF-TREE RULES #########
|
||||
|
||||
ifndef PREFIX
|
||||
PREFIX=/usr/local
|
||||
endif
|
||||
@@ -54,12 +44,8 @@ uninstall:
|
||||
rm -f $(INSTALL_DIR)/scst_local.ko
|
||||
-/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER)
|
||||
|
||||
########## END OUT-OF-TREE RULES ##########
|
||||
endif
|
||||
|
||||
clean:
|
||||
@$(MAKE) -C $(KDIR) M=$(shell pwd) clean
|
||||
@$(RM) tags Module.symvers Module.markers modules.order
|
||||
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
+20
-7
@@ -76,8 +76,20 @@ endif
|
||||
OFED_MODULE_SYMVERS:=$(OFED_KERNEL_DIR)/Module.symvers
|
||||
endif
|
||||
|
||||
# Use make instead of $(MAKE) to get rid of command-line option -i
|
||||
run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi)
|
||||
# Use make instead of $(MAKE) to get rid of command-line option -i. Enable
|
||||
# -Wno-deprecated-declarations for the RHEL 7.x kernels.
|
||||
run_conftest = $(shell \
|
||||
export KCFLAGS="-Wno-deprecated-declarations"; \
|
||||
if [ "0$(V)" -gt 0 ]; then \
|
||||
output=/dev/stdout; \
|
||||
else \
|
||||
output=conftest/$1/build-output-$(KVER).txt; \
|
||||
fi; \
|
||||
if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" 1>&2 2>$${output}; then \
|
||||
echo "$(strip $2)"; \
|
||||
else \
|
||||
echo "$(strip $3)"; \
|
||||
fi)
|
||||
run_conftest_bool = $(call run_conftest,$1,-D$(strip $2)=1,-D$(strip $2)=0)
|
||||
|
||||
CONFTESTS = $(shell ls -d conftest/*)
|
||||
@@ -131,11 +143,12 @@ check:
|
||||
|
||||
clean:
|
||||
rm -rf conftest/pre_cflags conftest/kcflags
|
||||
for d in conftest/* src; do \
|
||||
[ -d "$$d" ] && $(MAKE) -C $(KDIR) M=$(shell pwd)/$$d clean; \
|
||||
rm -f $$d/result*.txt; \
|
||||
done
|
||||
rm -f src/Module.symvers src/Module.markers src/modules.order
|
||||
rm -rf conftest/*/{build-output,result}*.txt
|
||||
for d in conftest/* src; do \
|
||||
[ -d "$$d" ] && $(MAKE) -C $(KDIR) M=$(shell pwd)/$$d $@ & \
|
||||
rm -f $$d/result*.txt; \
|
||||
done; \
|
||||
wait
|
||||
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes \
|
||||
PROGS = events
|
||||
LIBS = -lpthread
|
||||
|
||||
CFLAGS += -W -Wno-unused-parameter
|
||||
CFLAGS += -Wextra -Wno-unused-parameter
|
||||
CFLAGS += $(LOCAL_CFLAGS)
|
||||
#CFLAGS += -DDEBUG_NOMEM
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes \
|
||||
PROGS = fileio_tgt
|
||||
LIBS = -lpthread
|
||||
|
||||
CFLAGS += -W -Wno-unused-parameter
|
||||
CFLAGS += -Wextra -Wno-unused-parameter
|
||||
CFLAGS += $(LOCAL_CFLAGS)
|
||||
#CFLAGS += -DDEBUG_NOMEM
|
||||
#CFLAGS += -DDEBUG_SENSE
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes \
|
||||
PROGS = stpgd
|
||||
LIBS = -lpthread
|
||||
|
||||
CFLAGS += -W -Wno-unused-parameter
|
||||
CFLAGS += -Wextra -Wno-unused-parameter
|
||||
CFLAGS += $(LOCAL_CFLAGS)
|
||||
#CFLAGS += -DDEBUG_NOMEM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user