FS#22310 - gzip kernel modules

Attached to Project: Arch Linux
Opened by Zeqadious (Zeqadious) - Tuesday, 04 January 2011, 15:50 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 30 January 2011, 10:46 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

In my endeavor to always make my install smaller, I have begun to gzip -9 my kernel modules. This is a very simple thing to do and it only requires a simple tweak to the initcpio scripts, functions and autodetect, and for module-init-tools to be compiled with the --enable-zlib switch. The resultant modprobe, rmmod, insmod binaries have no dynamic dependency on zlib so zlib does not need to be moved to /lib. I've wondered why Arch doesn't already do this, but I find no answers in the forums (search), or flyspray bugs/request for this. On my system /lib/modules/2.6.36-ARCH is 144MB, whereas with all modules gzipped -9, it is 40MB.

Additional info:
I've actually wrote my own PKGBUILD for a replacement module-init-tools packaged called module-init-tools_gz, where I can demonstrate what I've done to accomplish this idea.

http://zeqadious.homelinux.net/arch-linux/sources/core/module-init-tools_gz/PKGBUILD
http://zeqadious.homelinux.net/arch-linux/sources/core/module-init-tools_gz/module-init-tools_gz.install

Feedback?
Zeq
This task depends upon

Closed by  Thomas Bächler (brain0)
Sunday, 30 January 2011, 10:46 GMT
Reason for closing:  Implemented
Comment by Thomas Bächler (brain0) - Wednesday, 05 January 2011, 15:41 GMT
I don't think we ever really discussed this, and less than a third of the size seems worth the work.
Comment by Dan McGee (toofishes) - Wednesday, 05 January 2011, 16:08 GMT
Seems at least a no-brainer to add the `--enable-zlib` switch so people can have the option of compressed modules; the rest of the tooling can slowly move to support it then too.
Comment by Allan McRae (Allan) - Thursday, 06 January 2011, 01:52 GMT
I will rebuild module-init-tools with the '--enable-zlib' but will not make the adjustments as in the linked .install script. Adjustments to mkinitcpio should be done there and then packages providing kernel modules can start compressing them.

Is there a speed hit having these compressed?
Comment by Allan McRae (Allan) - Thursday, 06 January 2011, 10:19 GMT
module-init-tools-3.12-2 has this enabled. I leave implementing the rest up to other people.
Comment by Zeqadious (Zeqadious) - Monday, 24 January 2011, 16:39 GMT
Dyndns decided that homelinux.net is no longer a usable domain name, so just in case someone references the previous links:

http://zeqadious.dyndns.org/arch-linux/sources/core/module-init-tools_gz/PKGBUILD
http://zeqadious.dyndns.org/arch-linux/sources/core/module-init-tools_gz/module-init-tools_gz.install
Comment by Thomas Bächler (brain0) - Tuesday, 25 January 2011, 20:09 GMT
Next mkinitcpio release will support .ko or .ko.gz - I will likely release this on Sunday.
https://projects.archlinux.org/mkinitcpio.git/commit/?id=692a44574241c32e213f48884a653a9535021091
Comment by Thomas Bächler (brain0) - Wednesday, 26 January 2011, 20:53 GMT
Okay, mkinitcpio is in testing, kernel26 2.6.37-3 will have gzipped modules.

Loading...