From 65ce9c38326e2588fcd1a3a4817c14b4660f430b Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 31 Mar 2021 22:38:08 +0900 Subject: kbuild: move module strip/compression code into scripts/Makefile.modinst Both mod_strip_cmd and mod_compress_cmd are only used in scripts/Makefile.modinst, hence there is no good reason to define them in the top Makefile. Move the relevant code to scripts/Makefile.modinst. Also, show separate log messages for each of install, strip, sign, and compress. Signed-off-by: Masahiro Yamada --- Makefile | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 88e5c15e1186..f96ae09d111b 100644 --- a/Makefile +++ b/Makefile @@ -1063,38 +1063,6 @@ export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE) MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) export MODLIB -# -# INSTALL_MOD_STRIP, if defined, will cause modules to be -# stripped after they are installed. If INSTALL_MOD_STRIP is '1', then -# the default option --strip-debug will be used. Otherwise, -# INSTALL_MOD_STRIP value will be used as the options to the strip command. - -ifdef INSTALL_MOD_STRIP -ifeq ($(INSTALL_MOD_STRIP),1) -mod_strip_cmd = $(STRIP) --strip-debug -else -mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP) -endif # INSTALL_MOD_STRIP=1 -else -mod_strip_cmd = true -endif # INSTALL_MOD_STRIP -export mod_strip_cmd - -# CONFIG_MODULE_COMPRESS, if defined, will cause module to be compressed -# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP -# or CONFIG_MODULE_COMPRESS_XZ. - -mod_compress_cmd = true -ifdef CONFIG_MODULE_COMPRESS - ifdef CONFIG_MODULE_COMPRESS_GZIP - mod_compress_cmd = $(KGZIP) -n -f - endif # CONFIG_MODULE_COMPRESS_GZIP - ifdef CONFIG_MODULE_COMPRESS_XZ - mod_compress_cmd = $(XZ) --lzma2=dict=2MiB -f - endif # CONFIG_MODULE_COMPRESS_XZ -endif # CONFIG_MODULE_COMPRESS -export mod_compress_cmd - ifdef CONFIG_MODULE_SIG_ALL $(eval $(call config_filename,MODULE_SIG_KEY)) -- cgit v1.2.3