From a6e09670547ba6b62d36b6102f13b47fa4bdc140 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Wed, 14 Jun 2023 12:14:43 +0300 Subject: [PATCH] scst/src/Makefile: Fix depmod warnings during installation process This patch fixes the following warnings: /lib/.../scst_cdrom.ko needs unknown symbol scst_obtain_device_parameters /lib/.../scst_cdrom.ko needs unknown symbol scst_unregister_dev_driver ... These warnings were caused by an incorrect module installation order: the SCST module was being installed after the device handler modules on which they depend. This patch rectifies the issue by altering the order in which the modules are installed. Additionally, this patch fixes the missing signatures for the device handler modules. --- scst/src/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scst/src/Makefile b/scst/src/Makefile index a4469bfcb..1d7914346 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -97,16 +97,17 @@ install: all false; fi -rm -f $(INSTALL_DIR)/scsi_tgt.ko KDIR=$(KDIR) ../../scripts/sign-modules - $(MAKE) -C $(KDIR) M=$(SCST_DH_MOD_DIR) \ - $(shell [ -n "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \ - INSTALL_MOD_DIR=$(INSTALL_MOD_DIR)/dev_handlers \ - $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ - CONFIG_MODULE_SIG_ALL= modules_install $(MAKE) -C $(KDIR) M=$(SCST_MOD_DIR) \ $(shell [ -n "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \ INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \ $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ CONFIG_MODULE_SIG_ALL= modules_install + (cd $(SCST_DH_MOD_DIR) && KDIR=$(KDIR) ../../../scripts/sign-modules) + $(MAKE) -C $(KDIR) M=$(SCST_DH_MOD_DIR) \ + $(shell [ -n "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \ + INSTALL_MOD_DIR=$(INSTALL_MOD_DIR)/dev_handlers \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ + CONFIG_MODULE_SIG_ALL= modules_install install -d $(INSTALL_DIR_H) header_files="backport.h build_mode.h scst.h scst_const.h \ scst_debug.h scst_itf_ver.h scst_sgv.h \ @@ -140,12 +141,11 @@ uninstall: rm -rf $(INSTALL_DIR_H) clean: + $(MAKE) -C $(DEV_HANDLERS_DIR) $@ rm -f $(SCST_INTF_VER_FILE) $(MAKE) -C $(KDIR) M=$(SCST_MOD_DIR) $@ - $(MAKE) -C $(DEV_HANDLERS_DIR) $@ extraclean: clean - rm -f $(SCST_INTF_VER_FILE) cd $(DEV_HANDLERS_DIR) && $(MAKE) $@ rm -f *.orig *.rej