lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Dec 2011 13:50:19 -0200
From:	Lucas De Marchi <lucas.demarchi@...fusion.mobi>
To:	Michal Marek <mmarek@...e.cz>, Sam Ravnborg <sam@...nborg.org>
Cc:	linux-modules@...r.kernel.org,
	Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] kbuild: add target to install xz modules

Add target in Makefile to compress the module with XZ  after it's
installed. kmod can handle modules compressed with xz and it's replacing
module-init-tools.

Signed-off-by: Lucas De Marchi <lucas.demarchi@...fusion.mobi>
---
 Makefile                 |    6 +++++-
 scripts/Makefile.modinst |    7 +++++++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index baddcfe..f06f886 100644
--- a/Makefile
+++ b/Makefile
@@ -1104,9 +1104,10 @@ PHONY += modules_prepare
 modules_prepare: prepare scripts
 
 # Target to install modules
-PHONY += modules_install modules_install_gz
+PHONY += modules_install modules_install_gz modules_install_xz
 modules_install: _modinst_bare _modinst_post
 modules_install_gz: _modinst_gz _modinst_post
+modules_install_xz: _modinst_xz _modinst_post
 
 PHONY += _modinst_
 _modinst_:
@@ -1127,6 +1128,9 @@ _modinst_bare: _modinst_
 _modinst_gz: _modinst_
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst compression=gz
 
+_modinst_xz: _modinst_
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst compression=xz
+
 # This depmod is only for convenience to give the initial
 # boot a modules.dep even before / is mounted read-write.  However the
 # boot script depmod is the master version.
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index 442f953..297c546 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -24,6 +24,9 @@ quiet_cmd_modules_install = INSTALL $@
 quiet_cmd_modules_compress_gz = GZ      $@.gz
       cmd_modules_compress_gz = gzip $(2)/$(notdir $@)
 
+quiet_cmd_modules_compress_xz = XZ      $@.xz
+      cmd_modules_compress_xz = xz $(2)/$(notdir $@)
+
 # Modules built outside the kernel source tree go into extra by default
 INSTALL_MOD_DIR ?= extra
 ext-mod-dir = $(INSTALL_MOD_DIR)$(subst $(patsubst %/,%,$(KBUILD_EXTMOD)),,$(@D))
@@ -34,6 +37,10 @@ $(modules):
 	$(call cmd,modules_install,$(MODLIB)/$(modinst_dir))
 ifeq ($(compression),gz)
 	$(call cmd,modules_compress_gz,$(MODLIB)/$(modinst_dir))
+else
+ifeq ($(compression),xz)
+	$(call cmd,modules_compress_xz,$(MODLIB)/$(modinst_dir))
+endif
 endif
 
 
-- 
1.7.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ