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.
This commit is contained in:
Gleb Chesnokov
2023-06-14 16:49:36 +03:00
parent 6c2771baef
commit a6e0967054
+7 -7
View File
@@ -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