[Letux-kernel] compressing kernel

H. Nikolaus Schaller hns at goldelico.com
Tue Oct 29 08:54:30 CET 2019


> Am 26.10.2019 um 20:33 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> Hi,
> 
>> Am 26.10.2019 um 20:11 schrieb Andreas Kemnade <andreas at kemnade.info>:
>> 
>> Hi Nikolaus,
>> 
>> On Sat, 26 Oct 2019 19:09:10 +0200
>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>> 
>>> Hi,
>>> 
>>>> Am 26.10.2019 um 16:11 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>>> 
>>>> Hi,
>>>> 
>>>> I have just played around with compression options and found that
>>>> we are still  < 4MB with lzma  
>>> 
>>> Would be nice!
>>> 
>>> Although we have 6 MB in NAND for GTA04 and plenty of space on µSD
>>> for all others.
>> 
>> well, we are at >5MB, and there might be more stuff to be compiled
>> statically (if we want imx6sl* in. 
>> # CONFIG_SOC_IMX6SL is not set
>> # CONFIG_SOC_IMX6SLL is not set
>> 
>>> 
>>>> 
>>>> That can be switched by
>>>> # CONFIG_KERNEL_GZIP is not set
>>>> CONFIG_KERNEL_LZMA=y  
>>> 
>>> Yes, it is the default in omap2plus_defconfig AFAIK.
>>> 
>> And I booted omap2plus_defconfig several times.
>> 
>> 
>>>> Downside is a lot slower compression and a bit slower decompression
>>>> (still faster than bzip2).  

Hm. My first impression is that it is much slower than gzip compressed.

Some (rough) test on GTA04A4 measuring time between

	Starting kernel ...

and

	[    0.000000] Booting Linux on physical CPU 0x0

gzip:	2.5 seconds
root at letux:~# ls -l /boot/uImage
-rw-r--r-- 1 root root 5143856 Oct 29  2019 /boot/uImage
root at letux:~# 

lzma:	8 seconds
root at letux:~# ls -l /boot/uImage
-rw-r--r-- 1 root root 3823992 Oct 29  2019 /boot/uImage
root at letux:~# 

So I't say this slowdown is significant...
Unfortunately it makes slow devices with NAND limits even slower.

And unfortunately we need a setting that fits all devices, big and small, fast and slow.
So IMHO gzip seems still to be a good compromise.

BR,
Nikolaus



More information about the Letux-kernel mailing list