Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lzip kernel compression
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Sat Apr 13, 2024 11:19 am    Post subject: lzip kernel compression Reply with quote

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 :lol:
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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54276
Location: 56N 3W

PostPosted: Sat Apr 13, 2024 12:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 569
Location: Ásgarðr

PostPosted: Sat Apr 13, 2024 3:47 pm    Post subject: Reply with quote

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 :wink:

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. :o
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum