View previous topic :: View next topic |
Author |
Message |
sdauth l33t
Joined: 19 Sep 2018 Posts: 643 Location: Ásgarðr
|
Posted: Sat Apr 13, 2024 11:19 am Post subject: lzip kernel compression |
|
|
Hello,
Is there a patch available to add lzip compression for the kernel ? I was looking to replace xz.
I tried zstd but it still is almost 2MiB bigger than xz (1.6MiB with bzip2). I was curious how much I could save with lzip, or maybe it would be worst I don't know
Right now, this is what is available :
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_HAVE_KERNEL_ZSTD=y |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Sat Apr 13, 2024 12:28 pm Post subject: |
|
|
sdauth,
You could look at the experimental patch set.
Code: | USE=experimental emerge gentoo-sources |
I'm not in a hurry to avoid xz. It will soon be the best security audited compressor available.
You can test the size of the kernel compressed with any tool you have installed.
The uncompressed kernel is Code: | -rwxr-xr-x 1 root root 47139216 Apr 1 15:03 vmlinux | or 47M for me.
Point various user space compressors at that and see what you get.
Its a very bad idea to try to boot with a compression method that the kernel does not understand. :)
Sidenote. On arm64, the kernel does not support internal decompression. (Yet?)
The boot loader has to do it. Maybe that works on amd64 too? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
sdauth l33t
Joined: 19 Sep 2018 Posts: 643 Location: Ásgarðr
|
Posted: Sat Apr 13, 2024 3:47 pm Post subject: |
|
|
Code: | Its a very bad idea to try to boot with a compression method that the kernel does not understand. |
Indeed, I forgot about that..
Quote: | You can test the size of the kernel compressed with any tool you have installed. |
and this too
Well, the size is roughly the same as with zstd (using lzip -9) so I have my answer.
I will stick to xz for this particular machine where I need the kernel (with embedded initramfs) to be no more than 7.8MiB.
Only xz can achieve that it seems. I already trimmed the useless stuff as best as I could. |
|
Back to top |
|
|
|