12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952 |
- diff -urdN linux-4.14.21/Documentation/00-INDEX linux-4.14.21.new/Documentation/00-INDEX
- --- linux-4.14.21/Documentation/00-INDEX 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/Documentation/00-INDEX 2018-02-24 17:22:34.000000000 +0100
- @@ -260,6 +260,8 @@
- - info on creator of above logo & site to get additional images from.
- lsm.txt
- - Linux Security Modules: General Security Hooks for Linux
- +lzip.txt
- + - info on lzip compression for the linux kernel.
- lzo.txt
- - kernel LZO decompressor input formats
- m68k/
- diff -urdN linux-4.14.21/Documentation/dontdiff linux-4.14.21.new/Documentation/dontdiff
- --- linux-4.14.21/Documentation/dontdiff 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/Documentation/dontdiff 2018-02-24 17:22:34.000000000 +0100
- @@ -26,6 +26,7 @@
- *.ll
- *.log
- *.lst
- +*.lz
- *.lzma
- *.lzo
- *.mo
- diff -urdN linux-4.14.21/Documentation/lzip.txt linux-4.14.21.new/Documentation/lzip.txt
- --- linux-4.14.21/Documentation/lzip.txt 1970-01-01 01:00:00.000000000 +0100
- +++ linux-4.14.21.new/Documentation/lzip.txt 2018-02-24 17:22:34.000000000 +0100
- @@ -0,0 +1,46 @@
- +
- +Lzip data compression in Linux
- +==============================
- +
- +Linux already offers a lot of compression formats. Then, why lzip?
- +
- +Because lzip is the only gzip-like LZMA compressor featuring a
- +well-designed format:
- +
- + * Lzma-alone is a toy format lacking integrity checking or even a
- + proper header.
- +
- + * Xz has a complex and not properly designed format[1]. It can
- + compress the kernel image a little more than lzip on some
- + architectures (about 4% on x86) by using a different binary filter
- + for each architecture. But this increase in complexity does not
- + improve the decompression time (much less the boot time) compared
- + with lzip.
- +
- + Also the xz compressor is the only one needing special options to
- + compress data for linux, and xz decompression is the only one that
- + may fail because of wrong options used at compression time.
- +
- + [1] See http://www.nongnu.org/lzip/xz_inadequate.html
- +
- +I have the hope that lzma-alone and xz will be eventually abandoned in
- +favor of lzip.
- +
- +Lzip-compressed kernel images of multiple linux versions since 2.6.30.10
- +have been built and tested, even on machines as modest as an AMD 486-DX2
- +at 66 MHz with 64 MiB of RAM. In the worst case (on the slow machine
- +above), lzip just increased the boot time a 15% compared with gzip. On
- +more modern machines, lzip may boot slightly faster than gzip. It just
- +takes 0.2 seconds for lzip to decompress vmlinuz-4.4.16 on my machine.
- +
- +One little-publicized fact is that, except on embedded systems with fast
- +boot setups, decompression speed is not important in booting linux.
- +Decompression time is usually a small fraction of the total boot time.
- +For example, using lz4 on a desktop machine in order to save 0.05
- +seconds of a total boot time of 20 seconds is probably not worth the
- +increased image size.
- +
- +Learn more about lzip at http://www.nongnu.org/lzip/lzip.html
- +
- +Author: Antonio Diaz Diaz
- +Updated: 2017-04-19
- diff -urdN linux-4.14.21/Documentation/x86/boot.txt linux-4.14.21.new/Documentation/x86/boot.txt
- --- linux-4.14.21/Documentation/x86/boot.txt 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/Documentation/x86/boot.txt 2018-02-24 17:22:34.000000000 +0100
- @@ -665,10 +665,10 @@
- The payload may be compressed. The format of both the compressed and
- uncompressed data should be determined using the standard magic
- numbers. The currently supported compression formats are gzip
- - (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA
- - (magic number 5D 00), XZ (magic number FD 37), and LZ4 (magic number
- - 02 21). The uncompressed payload is currently always ELF (magic
- - number 7F 45 4C 46).
- + (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), lzip
- + (magic number 4C 5A), LZMA (magic number 5D 00), XZ (magic number FD
- + 37), and LZ4 (magic number 02 21). The uncompressed payload is
- + currently always ELF (magic number 7F 45 4C 46).
-
- Field name: payload_length
- Type: read
- diff -urdN linux-4.14.21/Makefile linux-4.14.21.new/Makefile
- --- linux-4.14.21/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -897,14 +897,17 @@
- export mod_strip_cmd
-
- # CONFIG_MODULE_COMPRESS, if defined, will cause module to be compressed
- -# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP
- -# or CONFIG_MODULE_COMPRESS_XZ.
- +# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP,
- +# CONFIG_MODULE_COMPRESS_LZIP or CONFIG_MODULE_COMPRESS_XZ.
-
- mod_compress_cmd = true
- ifdef CONFIG_MODULE_COMPRESS
- ifdef CONFIG_MODULE_COMPRESS_GZIP
- mod_compress_cmd = gzip -n -f
- endif # CONFIG_MODULE_COMPRESS_GZIP
- + ifdef CONFIG_MODULE_COMPRESS_LZIP
- + mod_compress_cmd = lzip -f
- + endif # CONFIG_MODULE_COMPRESS_LZIP
- ifdef CONFIG_MODULE_COMPRESS_XZ
- mod_compress_cmd = xz -f
- endif # CONFIG_MODULE_COMPRESS_XZ
- @@ -916,6 +919,7 @@
- #
- INITRD_COMPRESS-y := gzip
- INITRD_COMPRESS-$(CONFIG_RD_BZIP2) := bzip2
- +INITRD_COMPRESS-$(CONFIG_RD_LZIP) := lzip
- INITRD_COMPRESS-$(CONFIG_RD_LZMA) := lzma
- INITRD_COMPRESS-$(CONFIG_RD_XZ) := xz
- INITRD_COMPRESS-$(CONFIG_RD_LZO) := lzo
- diff -urdN linux-4.14.21/arch/arm/Kconfig linux-4.14.21.new/arch/arm/Kconfig
- --- linux-4.14.21/arch/arm/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/arm/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -72,6 +72,7 @@
- select HAVE_IRQ_TIME_ACCOUNTING
- select HAVE_KERNEL_GZIP
- select HAVE_KERNEL_LZ4
- + select HAVE_KERNEL_LZIP
- select HAVE_KERNEL_LZMA
- select HAVE_KERNEL_LZO
- select HAVE_KERNEL_XZ
- diff -urdN linux-4.14.21/arch/arm/boot/compressed/Makefile linux-4.14.21.new/arch/arm/boot/compressed/Makefile
- --- linux-4.14.21/arch/arm/boot/compressed/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/arm/boot/compressed/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -68,6 +68,7 @@
- CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
-
- compress-$(CONFIG_KERNEL_GZIP) = gzip
- +compress-$(CONFIG_KERNEL_LZIP) = klzip
- compress-$(CONFIG_KERNEL_LZO) = lzo
- compress-$(CONFIG_KERNEL_LZMA) = lzma
- compress-$(CONFIG_KERNEL_XZ) = xzkern
- diff -urdN linux-4.14.21/arch/arm/boot/compressed/decompress.c linux-4.14.21.new/arch/arm/boot/compressed/decompress.c
- --- linux-4.14.21/arch/arm/boot/compressed/decompress.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/arm/boot/compressed/decompress.c 2018-02-24 17:22:34.000000000 +0100
- @@ -40,6 +40,10 @@
- #include "../../../../lib/decompress_inflate.c"
- #endif
-
- +#ifdef CONFIG_KERNEL_LZIP
- +#include "../../../../lib/decompress_lunzip.c"
- +#endif
- +
- #ifdef CONFIG_KERNEL_LZO
- #include "../../../../lib/decompress_unlzo.c"
- #endif
- diff -urdN linux-4.14.21/arch/blackfin/Kconfig linux-4.14.21.new/arch/blackfin/Kconfig
- --- linux-4.14.21/arch/blackfin/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/blackfin/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -22,6 +22,7 @@
- select HAVE_IDE
- select HAVE_KERNEL_GZIP if RAMKERNEL
- select HAVE_KERNEL_BZIP2 if RAMKERNEL
- + select HAVE_KERNEL_LZIP if RAMKERNEL
- select HAVE_KERNEL_LZMA if RAMKERNEL
- select HAVE_KERNEL_LZO if RAMKERNEL
- select HAVE_OPROFILE
- diff -urdN linux-4.14.21/arch/blackfin/Makefile linux-4.14.21.new/arch/blackfin/Makefile
- --- linux-4.14.21/arch/blackfin/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/blackfin/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -141,7 +141,8 @@
-
- INSTALL_PATH ?= /tftpboot
- boot := arch/$(ARCH)/boot
- -BOOT_TARGETS = uImage uImage.bin uImage.bz2 uImage.gz uImage.lzma uImage.lzo uImage.xip
- +BOOT_TARGETS = uImage uImage.bin uImage.bz2 uImage.gz uImage.lz uImage.lzma \
- + uImage.lzo uImage.xip
- PHONY += $(BOOT_TARGETS) install
- KBUILD_IMAGE := $(boot)/uImage
-
- @@ -158,6 +159,7 @@
- echo ' vmImage.bin - Uncompressed Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bin)'
- echo ' vmImage.bz2 - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bz2)'
- echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)'
- + echo ' vmImage.lz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lz)'
- echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)'
- echo ' vmImage.lzo - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzo)'
- echo ' vmImage.xip - XIP Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.xip)'
- diff -urdN linux-4.14.21/arch/blackfin/boot/Makefile linux-4.14.21.new/arch/blackfin/boot/Makefile
- --- linux-4.14.21/arch/blackfin/boot/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/blackfin/boot/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -6,8 +6,10 @@
- # for more details.
- #
-
- -targets := uImage uImage.bin uImage.bz2 uImage.gz uImage.lzma uImage.lzo uImage.xip
- -extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip
- +targets := uImage uImage.bin uImage.bz2 uImage.gz uImage.lz uImage.lzma \
- + uImage.lzo uImage.xip
- +extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lz \
- + vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip
-
- ifeq ($(CONFIG_RAMKERNEL),y)
- UIMAGE_LOADADDR = $(CONFIG_BOOT_LOAD)
- @@ -27,6 +29,9 @@
- $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
- $(call if_changed,bzip2)
-
- +$(obj)/vmlinux.bin.lz: $(obj)/vmlinux.bin FORCE
- + $(call if_changed,klzip)
- +
- $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
- $(call if_changed,lzma)
-
- @@ -48,6 +53,9 @@
- $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
- $(call if_changed,uimage,gzip)
-
- +$(obj)/uImage.lz: $(obj)/vmlinux.bin.lz
- + $(call if_changed,uimage,lzip)
- +
- $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
- $(call if_changed,uimage,lzma)
-
- @@ -60,6 +68,7 @@
- suffix-y := bin
- suffix-$(CONFIG_KERNEL_GZIP) := gz
- suffix-$(CONFIG_KERNEL_BZIP2) := bz2
- +suffix-$(CONFIG_KERNEL_LZIP) := lz
- suffix-$(CONFIG_KERNEL_LZMA) := lzma
- suffix-$(CONFIG_KERNEL_LZO) := lzo
- suffix-$(CONFIG_ROMKERNEL) := xip
- diff -urdN linux-4.14.21/arch/m32r/Kconfig linux-4.14.21.new/arch/m32r/Kconfig
- --- linux-4.14.21/arch/m32r/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/m32r/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -7,6 +7,7 @@
- select INIT_ALL_POSSIBLE
- select HAVE_KERNEL_GZIP
- select HAVE_KERNEL_BZIP2
- + select HAVE_KERNEL_LZIP
- select HAVE_KERNEL_LZMA
- select ARCH_WANT_IPC_PARSE_VERSION
- select HAVE_DEBUG_BUGVERBOSE
- diff -urdN linux-4.14.21/arch/m32r/boot/compressed/Makefile linux-4.14.21.new/arch/m32r/boot/compressed/Makefile
- --- linux-4.14.21/arch/m32r/boot/compressed/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/m32r/boot/compressed/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -5,8 +5,8 @@
- # create a compressed vmlinux image from the original vmlinux
- #
-
- -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
- - vmlinux.bin.lzma head.o misc.o piggy.o vmlinux.lds
- +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
- + vmlinux.bin.lz vmlinux.bin.lzma head.o misc.o piggy.o vmlinux.lds
-
- OBJECTS = $(obj)/head.o $(obj)/misc.o
-
- @@ -30,6 +30,9 @@
- $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
- $(call if_changed,bzip2)
-
- +$(obj)/vmlinux.bin.lz: $(obj)/vmlinux.bin FORCE
- + $(call if_changed,klzip)
- +
- $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
- $(call if_changed,lzma)
-
- @@ -45,6 +48,7 @@
-
- suffix-$(CONFIG_KERNEL_GZIP) = gz
- suffix-$(CONFIG_KERNEL_BZIP2) = bz2
- +suffix-$(CONFIG_KERNEL_LZIP) = lz
- suffix-$(CONFIG_KERNEL_LZMA) = lzma
-
- $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
- diff -urdN linux-4.14.21/arch/m32r/boot/compressed/misc.c linux-4.14.21.new/arch/m32r/boot/compressed/misc.c
- --- linux-4.14.21/arch/m32r/boot/compressed/misc.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/m32r/boot/compressed/misc.c 2018-02-24 17:22:34.000000000 +0100
- @@ -39,7 +39,7 @@
- }
- #endif
-
- -#ifdef CONFIG_KERNEL_GZIP
- +#if defined(CONFIG_KERNEL_GZIP) || defined(CONFIG_KERNEL_LZIP)
- void *memcpy(void *dest, const void *src, size_t n)
- {
- char *d = dest;
- @@ -49,7 +49,9 @@
-
- return dest;
- }
- +#endif
-
- +#ifdef CONFIG_KERNEL_GZIP
- #define BOOT_HEAP_SIZE 0x10000
- #include "../../../../lib/decompress_inflate.c"
- #endif
- @@ -59,6 +61,11 @@
- #include "../../../../lib/decompress_bunzip2.c"
- #endif
-
- +#ifdef CONFIG_KERNEL_LZIP
- +#define BOOT_HEAP_SIZE 0x10000
- +#include "../../../../lib/decompress_lunzip.c"
- +#endif
- +
- #ifdef CONFIG_KERNEL_LZMA
- #define BOOT_HEAP_SIZE 0x10000
- #include "../../../../lib/decompress_unlzma.c"
- diff -urdN linux-4.14.21/arch/metag/Kconfig linux-4.14.21.new/arch/metag/Kconfig
- --- linux-4.14.21/arch/metag/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/metag/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -17,6 +17,7 @@
- select HAVE_FUNCTION_TRACER
- select HAVE_KERNEL_BZIP2
- select HAVE_KERNEL_GZIP
- + select HAVE_KERNEL_LZIP
- select HAVE_KERNEL_LZO
- select HAVE_KERNEL_XZ
- select HAVE_MEMBLOCK
- diff -urdN linux-4.14.21/arch/metag/Makefile linux-4.14.21.new/arch/metag/Makefile
- --- linux-4.14.21/arch/metag/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/metag/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -56,6 +56,7 @@
- boot_targets += uImage
- boot_targets += uImage.gz
- boot_targets += uImage.bz2
- +boot_targets += uImage.lz
- boot_targets += uImage.xz
- boot_targets += uImage.lzo
- boot_targets += uImage.bin
- @@ -83,6 +84,7 @@
- @echo ' uImage.bin - Kernel-only image for U-Boot (bin)'
- @echo ' uImage.gz - Kernel-only image for U-Boot (gzip)'
- @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
- + @echo ' uImage.lz - Kernel-only image for U-Boot (lzip)'
- @echo ' uImage.xz - Kernel-only image for U-Boot (xz)'
- @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)'
- @echo ' dtbs - Build device tree blobs for enabled boards'
- diff -urdN linux-4.14.21/arch/metag/boot/Makefile linux-4.14.21.new/arch/metag/boot/Makefile
- --- linux-4.14.21/arch/metag/boot/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/metag/boot/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -9,6 +9,7 @@
- suffix-y := bin
- suffix-$(CONFIG_KERNEL_GZIP) := gz
- suffix-$(CONFIG_KERNEL_BZIP2) := bz2
- +suffix-$(CONFIG_KERNEL_LZIP) := lz
- suffix-$(CONFIG_KERNEL_XZ) := xz
- suffix-$(CONFIG_KERNEL_LZO) := lzo
-
- @@ -16,6 +17,7 @@
- targets += uImage
- targets += uImage.gz
- targets += uImage.bz2
- +targets += uImage.lz
- targets += uImage.xz
- targets += uImage.lzo
- targets += uImage.bin
- @@ -23,6 +25,7 @@
- extra-y += vmlinux.bin
- extra-y += vmlinux.bin.gz
- extra-y += vmlinux.bin.bz2
- +extra-y += vmlinux.bin.lz
- extra-y += vmlinux.bin.xz
- extra-y += vmlinux.bin.lzo
-
- @@ -42,6 +45,9 @@
- $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
- $(call if_changed,bzip2)
-
- +$(obj)/vmlinux.bin.lz: $(obj)/vmlinux.bin FORCE
- + $(call if_changed,klzip)
- +
- $(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
- $(call if_changed,xzkern)
-
- @@ -54,6 +60,9 @@
- $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORCE
- $(call if_changed,uimage,bzip2)
-
- +$(obj)/uImage.lz: $(obj)/vmlinux.bin.lz FORCE
- + $(call if_changed,uimage,lzip)
- +
- $(obj)/uImage.xz: $(obj)/vmlinux.bin.xz FORCE
- $(call if_changed,uimage,xz)
-
- diff -urdN linux-4.14.21/arch/mips/Kconfig linux-4.14.21.new/arch/mips/Kconfig
- --- linux-4.14.21/arch/mips/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/mips/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -1820,6 +1820,7 @@
- select HAVE_KERNEL_GZIP
- select HAVE_KERNEL_BZIP2
- select HAVE_KERNEL_LZ4
- + select HAVE_KERNEL_LZIP
- select HAVE_KERNEL_LZMA
- select HAVE_KERNEL_LZO
- select HAVE_KERNEL_XZ
- diff -urdN linux-4.14.21/arch/mips/Makefile linux-4.14.21.new/arch/mips/Makefile
- --- linux-4.14.21/arch/mips/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/mips/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -338,12 +338,14 @@
- boot-y += uImage.bin
- boot-y += uImage.bz2
- boot-y += uImage.gz
- +boot-y += uImage.lz
- boot-y += uImage.lzma
- boot-y += uImage.lzo
- endif
- boot-y += vmlinux.itb
- boot-y += vmlinux.gz.itb
- boot-y += vmlinux.bz2.itb
- +boot-y += vmlinux.lz.itb
- boot-y += vmlinux.lzma.itb
- boot-y += vmlinux.lzo.itb
-
- @@ -454,6 +456,7 @@
- echo ' uImage.bin - U-Boot image (uncompressed)'
- echo ' uImage.bz2 - U-Boot image (bz2)'
- echo ' uImage.gz - U-Boot image (gzip)'
- + echo ' uImage.lz - U-Boot image (lzip)'
- echo ' uImage.lzma - U-Boot image (lzma)'
- echo ' uImage.lzo - U-Boot image (lzo)'
- echo ' uzImage.bin - U-Boot image (self-extracting)'
- diff -urdN linux-4.14.21/arch/mips/boot/Makefile linux-4.14.21.new/arch/mips/boot/Makefile
- --- linux-4.14.21/arch/mips/boot/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/mips/boot/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -26,6 +26,7 @@
- suffix-y := bin
- suffix-$(CONFIG_KERNEL_BZIP2) := bz2
- suffix-$(CONFIG_KERNEL_GZIP) := gz
- +suffix-$(CONFIG_KERNEL_LZIP) := lz
- suffix-$(CONFIG_KERNEL_LZMA) := lzma
- suffix-$(CONFIG_KERNEL_LZO) := lzo
-
- @@ -56,6 +57,7 @@
-
- extra-y += vmlinux.bin.bz2
- extra-y += vmlinux.bin.gz
- +extra-y += vmlinux.bin.lz
- extra-y += vmlinux.bin.lzma
- extra-y += vmlinux.bin.lzo
-
- @@ -65,6 +67,9 @@
- $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
- $(call if_changed,gzip)
-
- +$(obj)/vmlinux.bin.lz: $(obj)/vmlinux.bin FORCE
- + $(call if_changed,klzip)
- +
- $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
- $(call if_changed,lzma)
-
- @@ -79,6 +84,7 @@
- targets += uImage.bin
- targets += uImage.bz2
- targets += uImage.gz
- +targets += uImage.lz
- targets += uImage.lzma
- targets += uImage.lzo
-
- @@ -91,6 +97,9 @@
- $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
- $(call if_changed,uimage,gzip)
-
- +$(obj)/uImage.lz: $(obj)/vmlinux.bin.lz FORCE
- + $(call if_changed,uimage,lzip)
- +
- $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
- $(call if_changed,uimage,lzma)
-
- @@ -108,6 +117,7 @@
- targets += vmlinux.itb
- targets += vmlinux.gz.itb
- targets += vmlinux.bz2.itb
- +targets += vmlinux.lz.itb
- targets += vmlinux.lzma.itb
- targets += vmlinux.lzo.itb
-
- @@ -143,6 +153,9 @@
- $(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
- $(call if_changed_dep,cpp_its_S,bzip2,vmlinux.bin.bz2)
-
- +$(obj)/vmlinux.lz.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
- + $(call if_changed_dep,cpp_its_S,lzip,vmlinux.bin.lz)
- +
- $(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
- $(call if_changed_dep,cpp_its_S,lzma,vmlinux.bin.lzma)
-
- @@ -167,6 +180,9 @@
- $(obj)/vmlinux.bz2.itb: $(obj)/vmlinux.bz2.its $(obj)/vmlinux.bin.bz2 FORCE
- $(call if_changed,itb-image,$<)
-
- +$(obj)/vmlinux.lz.itb: $(obj)/vmlinux.lz.its $(obj)/vmlinux.bin.lz FORCE
- + $(call if_changed,itb-image,$<)
- +
- $(obj)/vmlinux.lzma.itb: $(obj)/vmlinux.lzma.its $(obj)/vmlinux.bin.lzma FORCE
- $(call if_changed,itb-image,$<)
-
- diff -urdN linux-4.14.21/arch/mips/boot/compressed/Makefile linux-4.14.21.new/arch/mips/boot/compressed/Makefile
- --- linux-4.14.21/arch/mips/boot/compressed/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/mips/boot/compressed/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -61,6 +61,7 @@
- tool_$(CONFIG_KERNEL_GZIP) = gzip
- tool_$(CONFIG_KERNEL_BZIP2) = bzip2
- tool_$(CONFIG_KERNEL_LZ4) = lz4
- +tool_$(CONFIG_KERNEL_LZIP) = klzip
- tool_$(CONFIG_KERNEL_LZMA) = lzma
- tool_$(CONFIG_KERNEL_LZO) = lzo
- tool_$(CONFIG_KERNEL_XZ) = xzkern
- diff -urdN linux-4.14.21/arch/mips/boot/compressed/decompress.c linux-4.14.21.new/arch/mips/boot/compressed/decompress.c
- --- linux-4.14.21/arch/mips/boot/compressed/decompress.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/mips/boot/compressed/decompress.c 2018-02-24 17:22:34.000000000 +0100
- @@ -64,6 +64,10 @@
- #include "../../../../lib/decompress_unlz4.c"
- #endif
-
- +#ifdef CONFIG_KERNEL_LZIP
- +#include "../../../../lib/decompress_lunzip.c"
- +#endif
- +
- #ifdef CONFIG_KERNEL_LZMA
- #include "../../../../lib/decompress_unlzma.c"
- #endif
- diff -urdN linux-4.14.21/arch/s390/Kconfig linux-4.14.21.new/arch/s390/Kconfig
- --- linux-4.14.21/arch/s390/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/s390/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -151,6 +151,7 @@
- select HAVE_KERNEL_BZIP2
- select HAVE_KERNEL_GZIP
- select HAVE_KERNEL_LZ4
- + select HAVE_KERNEL_LZIP
- select HAVE_KERNEL_LZMA
- select HAVE_KERNEL_LZO
- select HAVE_KERNEL_XZ
- diff -urdN linux-4.14.21/arch/s390/boot/compressed/Makefile linux-4.14.21.new/arch/s390/boot/compressed/Makefile
- --- linux-4.14.21/arch/s390/boot/compressed/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/s390/boot/compressed/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -7,9 +7,9 @@
-
- KCOV_INSTRUMENT := n
-
- -targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
- -targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
- -targets += misc.o piggy.o sizes.h head.o
- +targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
- +targets += vmlinux.bin.lz vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo
- +targets += vmlinux.bin.lz4 misc.o piggy.o sizes.h head.o
-
- KBUILD_CFLAGS := -m64 -D__KERNEL__ -O2
- KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
- @@ -51,6 +51,7 @@
- suffix-$(CONFIG_KERNEL_GZIP) := gz
- suffix-$(CONFIG_KERNEL_BZIP2) := bz2
- suffix-$(CONFIG_KERNEL_LZ4) := lz4
- +suffix-$(CONFIG_KERNEL_LZIP) := lz
- suffix-$(CONFIG_KERNEL_LZMA) := lzma
- suffix-$(CONFIG_KERNEL_LZO) := lzo
- suffix-$(CONFIG_KERNEL_XZ) := xz
- @@ -61,6 +62,8 @@
- $(call if_changed,bzip2)
- $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y)
- $(call if_changed,lz4)
- +$(obj)/vmlinux.bin.lz: $(vmlinux.bin.all-y)
- + $(call if_changed,klzip)
- $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y)
- $(call if_changed,lzma)
- $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y)
- diff -urdN linux-4.14.21/arch/s390/boot/compressed/misc.c linux-4.14.21.new/arch/s390/boot/compressed/misc.c
- --- linux-4.14.21/arch/s390/boot/compressed/misc.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/s390/boot/compressed/misc.c 2018-02-24 17:22:34.000000000 +0100
- @@ -53,6 +53,10 @@
- #include "../../../../lib/decompress_unlz4.c"
- #endif
-
- +#ifdef CONFIG_KERNEL_LZIP
- +#include "../../../../lib/decompress_lunzip.c"
- +#endif
- +
- #ifdef CONFIG_KERNEL_LZMA
- #include "../../../../lib/decompress_unlzma.c"
- #endif
- diff -urdN linux-4.14.21/arch/sh/Kconfig linux-4.14.21.new/arch/sh/Kconfig
- --- linux-4.14.21/arch/sh/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/sh/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -24,6 +24,7 @@
- select HAVE_KERNEL_GZIP
- select CPU_NO_EFFICIENT_FFS
- select HAVE_KERNEL_BZIP2
- + select HAVE_KERNEL_LZIP
- select HAVE_KERNEL_LZMA
- select HAVE_KERNEL_XZ
- select HAVE_KERNEL_LZO
- diff -urdN linux-4.14.21/arch/sh/Makefile linux-4.14.21.new/arch/sh/Makefile
- --- linux-4.14.21/arch/sh/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/sh/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -205,9 +205,9 @@
- libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
- libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
-
- -BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.xz uImage.lzo \
- - uImage.srec uImage.bin zImage vmlinux.bin vmlinux.srec \
- - romImage
- +BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lz uImage.lzma uImage.xz \
- + uImage.lzo uImage.srec uImage.bin zImage vmlinux.bin \
- + vmlinux.srec romImage
- PHONY += $(BOOT_TARGETS)
-
- all: $(notdir $(KBUILD_IMAGE))
- @@ -234,6 +234,7 @@
- @echo ' uImage.bin - Kernel-only image for U-Boot (bin)'
- @echo '* uImage.gz - Kernel-only image for U-Boot (gzip)'
- @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
- + @echo ' uImage.lz - Kernel-only image for U-Boot (lzip)'
- @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)'
- @echo ' uImage.xz - Kernel-only image for U-Boot (xz)'
- @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)'
- diff -urdN linux-4.14.21/arch/sh/boot/Makefile linux-4.14.21.new/arch/sh/boot/Makefile
- --- linux-4.14.21/arch/sh/boot/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/sh/boot/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -22,14 +22,15 @@
- suffix-y := bin
- suffix-$(CONFIG_KERNEL_GZIP) := gz
- suffix-$(CONFIG_KERNEL_BZIP2) := bz2
- +suffix-$(CONFIG_KERNEL_LZIP) := lz
- suffix-$(CONFIG_KERNEL_LZMA) := lzma
- suffix-$(CONFIG_KERNEL_XZ) := xz
- suffix-$(CONFIG_KERNEL_LZO) := lzo
-
- targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \
- - uImage.bz2 uImage.lzma uImage.xz uImage.lzo uImage.bin
- -extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
- - vmlinux.bin.xz vmlinux.bin.lzo
- + uImage.bz2 uImage.lz uImage.lzma uImage.xz uImage.lzo uImage.bin
- +extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lz \
- + vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
- subdir- := compressed romimage
-
- $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
- @@ -71,6 +72,9 @@
- $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
- $(call if_changed,bzip2)
-
- +$(obj)/vmlinux.bin.lz: $(obj)/vmlinux.bin FORCE
- + $(call if_changed,klzip)
- +
- $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
- $(call if_changed,lzma)
-
- @@ -86,6 +90,9 @@
- $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
- $(call if_changed,uimage,gzip)
-
- +$(obj)/uImage.lz: $(obj)/vmlinux.bin.lz
- + $(call if_changed,uimage,lzip)
- +
- $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
- $(call if_changed,uimage,lzma)
-
- diff -urdN linux-4.14.21/arch/sh/boot/compressed/Makefile linux-4.14.21.new/arch/sh/boot/compressed/Makefile
- --- linux-4.14.21/arch/sh/boot/compressed/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/sh/boot/compressed/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -5,10 +5,9 @@
- # create a compressed vmlinux image from the original vmlinux
- #
-
- -targets := vmlinux vmlinux.bin vmlinux.bin.gz \
- - vmlinux.bin.bz2 vmlinux.bin.lzma \
- - vmlinux.bin.xz vmlinux.bin.lzo \
- - head_$(BITS).o misc.o piggy.o
- +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
- + vmlinux.bin.lz vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo \
- + head_$(BITS).o misc.o piggy.o
-
- OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
-
- @@ -66,6 +65,8 @@
- $(call if_changed,gzip)
- $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
- $(call if_changed,bzip2)
- +$(obj)/vmlinux.bin.lz: $(vmlinux.bin.all-y) FORCE
- + $(call if_changed,klzip)
- $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
- $(call if_changed,lzma)
- $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
- diff -urdN linux-4.14.21/arch/sh/boot/compressed/misc.c linux-4.14.21.new/arch/sh/boot/compressed/misc.c
- --- linux-4.14.21/arch/sh/boot/compressed/misc.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/sh/boot/compressed/misc.c 2018-02-24 17:22:34.000000000 +0100
- @@ -58,6 +58,10 @@
- #include "../../../../lib/decompress_bunzip2.c"
- #endif
-
- +#ifdef CONFIG_KERNEL_LZIP
- +#include "../../../../lib/decompress_lunzip.c"
- +#endif
- +
- #ifdef CONFIG_KERNEL_LZMA
- #include "../../../../lib/decompress_unlzma.c"
- #endif
- diff -urdN linux-4.14.21/arch/unicore32/.gitignore linux-4.14.21.new/arch/unicore32/.gitignore
- --- linux-4.14.21/arch/unicore32/.gitignore 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/unicore32/.gitignore 2018-02-24 17:22:34.000000000 +0100
- @@ -17,5 +17,9 @@
- #
- boot/compressed/piggy.S
- boot/compressed/piggy.gzip
- +boot/compressed/piggy.bz2
- +boot/compressed/piggy.lzip
- +boot/compressed/piggy.lzma
- +boot/compressed/piggy.lzo
- boot/compressed/vmlinux
- boot/compressed/vmlinux.lds
- diff -urdN linux-4.14.21/arch/unicore32/Kconfig linux-4.14.21.new/arch/unicore32/Kconfig
- --- linux-4.14.21/arch/unicore32/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/unicore32/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -8,6 +8,7 @@
- select HAVE_GENERIC_DMA_COHERENT
- select HAVE_KERNEL_GZIP
- select HAVE_KERNEL_BZIP2
- + select HAVE_KERNEL_LZIP
- select GENERIC_ATOMIC64
- select HAVE_KERNEL_LZO
- select HAVE_KERNEL_LZMA
- diff -urdN linux-4.14.21/arch/unicore32/boot/compressed/Makefile linux-4.14.21.new/arch/unicore32/boot/compressed/Makefile
- --- linux-4.14.21/arch/unicore32/boot/compressed/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/unicore32/boot/compressed/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -23,6 +23,7 @@
- # piggy.S and piggy.o
- suffix_$(CONFIG_KERNEL_GZIP) := gzip
- suffix_$(CONFIG_KERNEL_BZIP2) := bz2
- +suffix_$(CONFIG_KERNEL_LZIP) := lzip
- suffix_$(CONFIG_KERNEL_LZO) := lzo
- suffix_$(CONFIG_KERNEL_LZMA) := lzma
-
- @@ -36,10 +37,10 @@
- $(obj)/piggy.o: $(obj)/piggy.$(suffix_y) $(obj)/piggy.S FORCE
-
- targets := vmlinux vmlinux.lds font.o font.c head.o misc.o \
- - piggy.$(suffix_y) piggy.o piggy.S \
- + piggy.$(suffix_y) piggy.o piggy.S
-
- # Make sure files are removed during clean
- -extra-y += piggy.gzip piggy.bz2 piggy.lzo piggy.lzma
- +extra-y += piggy.gzip piggy.bz2 piggy.lzip piggy.lzo piggy.lzma
-
- # ?
- LDFLAGS_vmlinux += -p
- diff -urdN linux-4.14.21/arch/unicore32/boot/compressed/misc.c linux-4.14.21.new/arch/unicore32/boot/compressed/misc.c
- --- linux-4.14.21/arch/unicore32/boot/compressed/misc.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/unicore32/boot/compressed/misc.c 2018-02-24 17:22:34.000000000 +0100
- @@ -95,6 +95,10 @@
- #include "../../../../lib/decompress_bunzip2.c"
- #endif
-
- +#ifdef CONFIG_KERNEL_LZIP
- +#include "../../../../lib/decompress_lunzip.c"
- +#endif
- +
- #ifdef CONFIG_KERNEL_LZO
- #include "../../../../lib/decompress_unlzo.c"
- #endif
- diff -urdN linux-4.14.21/arch/x86/Kconfig linux-4.14.21.new/arch/x86/Kconfig
- --- linux-4.14.21/arch/x86/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/x86/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -148,6 +148,7 @@
- select HAVE_KERNEL_BZIP2
- select HAVE_KERNEL_GZIP
- select HAVE_KERNEL_LZ4
- + select HAVE_KERNEL_LZIP
- select HAVE_KERNEL_LZMA
- select HAVE_KERNEL_LZO
- select HAVE_KERNEL_XZ
- diff -urdN linux-4.14.21/arch/x86/boot/compressed/Makefile linux-4.14.21.new/arch/x86/boot/compressed/Makefile
- --- linux-4.14.21/arch/x86/boot/compressed/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/x86/boot/compressed/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -23,8 +23,8 @@
- # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
- KCOV_INSTRUMENT := n
-
- -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
- - vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4
- +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lz \
- + vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4
-
- KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ -O2
- KBUILD_CFLAGS += -fno-strict-aliasing $(call cc-option, -fPIE, -fPIC)
- @@ -127,6 +127,8 @@
- $(call if_changed,gzip)
- $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
- $(call if_changed,bzip2)
- +$(obj)/vmlinux.bin.lz: $(vmlinux.bin.all-y) FORCE
- + $(call if_changed,klzip)
- $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
- $(call if_changed,lzma)
- $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
- @@ -138,6 +140,7 @@
-
- suffix-$(CONFIG_KERNEL_GZIP) := gz
- suffix-$(CONFIG_KERNEL_BZIP2) := bz2
- +suffix-$(CONFIG_KERNEL_LZIP) := lz
- suffix-$(CONFIG_KERNEL_LZMA) := lzma
- suffix-$(CONFIG_KERNEL_XZ) := xz
- suffix-$(CONFIG_KERNEL_LZO) := lzo
- diff -urdN linux-4.14.21/arch/x86/boot/compressed/misc.c linux-4.14.21.new/arch/x86/boot/compressed/misc.c
- --- linux-4.14.21/arch/x86/boot/compressed/misc.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/arch/x86/boot/compressed/misc.c 2018-02-24 17:22:34.000000000 +0100
- @@ -60,6 +60,10 @@
- #include "../../../../lib/decompress_bunzip2.c"
- #endif
-
- +#ifdef CONFIG_KERNEL_LZIP
- +#include "../../../../lib/decompress_lunzip.c"
- +#endif
- +
- #ifdef CONFIG_KERNEL_LZMA
- #include "../../../../lib/decompress_unlzma.c"
- #endif
- diff -urdN linux-4.14.21/include/linux/decompress/lunzip.h linux-4.14.21.new/include/linux/decompress/lunzip.h
- --- linux-4.14.21/include/linux/decompress/lunzip.h 1970-01-01 01:00:00.000000000 +0100
- +++ linux-4.14.21.new/include/linux/decompress/lunzip.h 2018-02-24 17:22:34.000000000 +0100
- @@ -0,0 +1,10 @@
- +#ifndef LINUX_DECOMPRESS_LUNZIP_H
- +#define LINUX_DECOMPRESS_LUNZIP_H
- +
- +int lunzip(unsigned char *inbuf, long in_len,
- + long (*fill)(void*, unsigned long),
- + long (*flush)(void*, unsigned long),
- + unsigned char *outbuf,
- + long *in_posp,
- + void (*error)(char *x));
- +#endif
- diff -urdN linux-4.14.21/init/Kconfig linux-4.14.21.new/init/Kconfig
- --- linux-4.14.21/init/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/init/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -115,6 +115,9 @@
- config HAVE_KERNEL_BZIP2
- bool
-
- +config HAVE_KERNEL_LZIP
- + bool
- +
- config HAVE_KERNEL_LZMA
- bool
-
- @@ -130,7 +133,7 @@
- choice
- prompt "Kernel compression mode"
- default KERNEL_GZIP
- - depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4
- + depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZIP || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4
- help
- The linux kernel is a kind of self-extracting executable.
- Several compression algorithms are available, which differ
- @@ -166,6 +169,15 @@
- Bzip2 uses a large amount of memory. For modern kernels you
- will need at least 8MB RAM or more for booting.
-
- +config KERNEL_LZIP
- + bool "Lzip"
- + depends on HAVE_KERNEL_LZIP
- + help
- + Lzip's compression ratio is better than that of gzip and bzip2.
- + Decompression speed is between gzip and bzip2. Compression can
- + be as fast as gzip or slower than bzip2 depending on compression
- + level. Lzip can produce a kernel about a 16% smaller than gzip.
- +
- config KERNEL_LZMA
- bool "LZMA"
- depends on HAVE_KERNEL_LZMA
- @@ -1834,8 +1846,8 @@
- depends on MODULES
- help
-
- - Compresses kernel modules when 'make modules_install' is run; gzip or
- - xz depending on "Compression algorithm" below.
- + Compresses kernel modules when 'make modules_install' is run; gzip,
- + lzip or xz are used depending on "Compression algorithm" below.
-
- module-init-tools MAY support gzip, and kmod MAY support gzip and xz.
-
- @@ -1857,11 +1869,14 @@
- This determines which sort of compression will be used during
- 'make modules_install'.
-
- - GZIP (default) and XZ are supported.
- + GZIP (default), LZIP and XZ are supported.
-
- config MODULE_COMPRESS_GZIP
- bool "GZIP"
-
- +config MODULE_COMPRESS_LZIP
- + bool "LZIP"
- +
- config MODULE_COMPRESS_XZ
- bool "XZ"
-
- diff -urdN linux-4.14.21/init/do_mounts_rd.c linux-4.14.21.new/init/do_mounts_rd.c
- --- linux-4.14.21/init/do_mounts_rd.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/init/do_mounts_rd.c 2018-02-24 17:22:34.000000000 +0100
- @@ -59,6 +59,7 @@
- * squashfs
- * gzip
- * bzip2
- + * lzip
- * lzma
- * xz
- * lzo
- diff -urdN linux-4.14.21/lib/Kconfig linux-4.14.21.new/lib/Kconfig
- --- linux-4.14.21/lib/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/lib/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -270,6 +270,9 @@
- config DECOMPRESS_BZIP2
- tristate
-
- +config DECOMPRESS_LZIP
- + tristate
- +
- config DECOMPRESS_LZMA
- tristate
-
- diff -urdN linux-4.14.21/lib/Makefile linux-4.14.21.new/lib/Makefile
- --- linux-4.14.21/lib/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/lib/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -125,6 +125,7 @@
-
- lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o
- lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o
- +lib-$(CONFIG_DECOMPRESS_LZIP) += decompress_lunzip.o
- lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
- lib-$(CONFIG_DECOMPRESS_XZ) += decompress_unxz.o
- lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o
- diff -urdN linux-4.14.21/lib/decompress.c linux-4.14.21.new/lib/decompress.c
- --- linux-4.14.21/lib/decompress.c 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/lib/decompress.c 2018-02-24 17:22:34.000000000 +0100
- @@ -8,6 +8,7 @@
- #include <linux/decompress/generic.h>
-
- #include <linux/decompress/bunzip2.h>
- +#include <linux/decompress/lunzip.h>
- #include <linux/decompress/unlzma.h>
- #include <linux/decompress/unxz.h>
- #include <linux/decompress/inflate.h>
- @@ -25,6 +26,9 @@
- #ifndef CONFIG_DECOMPRESS_BZIP2
- # define bunzip2 NULL
- #endif
- +#ifndef CONFIG_DECOMPRESS_LZIP
- +# define lunzip NULL
- +#endif
- #ifndef CONFIG_DECOMPRESS_LZMA
- # define unlzma NULL
- #endif
- @@ -48,6 +52,7 @@
- { {0x1f, 0x8b}, "gzip", gunzip },
- { {0x1f, 0x9e}, "gzip", gunzip },
- { {0x42, 0x5a}, "bzip2", bunzip2 },
- + { {0x4c, 0x5a}, "lzip", lunzip },
- { {0x5d, 0x00}, "lzma", unlzma },
- { {0xfd, 0x37}, "xz", unxz },
- { {0x89, 0x4c}, "lzo", unlzo },
- diff -urdN linux-4.14.21/lib/decompress_lunzip.c linux-4.14.21.new/lib/decompress_lunzip.c
- --- linux-4.14.21/lib/decompress_lunzip.c 1970-01-01 01:00:00.000000000 +0100
- +++ linux-4.14.21.new/lib/decompress_lunzip.c 2018-02-24 17:22:34.000000000 +0100
- @@ -0,0 +1,795 @@
- +/*
- + * lunzip implementation for linux
- + *
- + * Copyright (C) 2016, 2017 Antonio Diaz Diaz.
- + *
- + * Licensed under GPLv2 or later, see file LICENSE in this source tree.
- + */
- +
- +#ifdef STATIC
- +#define PREBOOT
- +#else
- +#include <linux/decompress/lunzip.h>
- +#endif
- +
- +#include <linux/decompress/mm.h>
- +
- +typedef int State;
- +
- +enum { states = 12 };
- +
- +static inline bool St_is_char(const State st) { return st < 7; }
- +
- +static inline State St_set_char(const State st)
- +{
- + static const State next[states] = { 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5 };
- + return next[st];
- +}
- +
- +static inline State St_set_match(const State st)
- +{
- + return ((st < 7) ? 7 : 10);
- +}
- +
- +static inline State St_set_rep(const State st)
- +{
- + return ((st < 7) ? 8 : 11);
- +}
- +
- +static inline State St_set_short_rep(const State st)
- +{
- + return ((st < 7) ? 9 : 11);
- +}
- +
- +
- +enum {
- + min_dictionary_bits = 12,
- + min_dictionary_size = 1 << min_dictionary_bits,
- + max_dictionary_bits = 29,
- + max_dictionary_size = 1 << max_dictionary_bits,
- + literal_context_bits = 3,
- + pos_state_bits = 2,
- + pos_states = 1 << pos_state_bits,
- + pos_state_mask = pos_states - 1,
- +
- + len_states = 4,
- + dis_slot_bits = 6,
- + start_dis_model = 4,
- + end_dis_model = 14,
- + modeled_distances = 1 << (end_dis_model / 2), /* 128 */
- + dis_align_bits = 4,
- + dis_align_size = 1 << dis_align_bits,
- +
- + len_low_bits = 3,
- + len_mid_bits = 3,
- + len_high_bits = 8,
- + len_low_symbols = 1 << len_low_bits,
- + len_mid_symbols = 1 << len_mid_bits,
- + len_high_symbols = 1 << len_high_bits,
- + max_len_symbols = len_low_symbols + len_mid_symbols + len_high_symbols,
- +
- + min_match_len = 2, /* must be 2 */
- + max_match_len = min_match_len + max_len_symbols - 1, /* 273 */
- + min_match_len_limit = 5
- +};
- +
- +static inline int get_len_state(const int len)
- +{
- + return min(len - min_match_len, len_states - 1);
- +}
- +
- +static inline int get_lit_state(const uint8_t prev_byte)
- +{
- + return (prev_byte >> (8 - literal_context_bits));
- +}
- +
- +
- +enum { bit_model_move_bits = 5,
- + bit_model_total_bits = 11,
- + bit_model_total = 1 << bit_model_total_bits
- +};
- +
- +typedef uint16_t Bit_model;
- +
- +static inline void Bm_init(Bit_model * const probability)
- +{
- + *probability = bit_model_total / 2;
- +}
- +
- +static inline void Bm_array_init(Bit_model * const p, const int size)
- +{
- + int i = 0;
- +
- + while (i < size)
- + p[i++] = bit_model_total / 2;
- +}
- +
- +struct Len_model {
- + Bit_model choice1;
- + Bit_model choice2;
- + Bit_model bm_low[pos_states][len_low_symbols];
- + Bit_model bm_mid[pos_states][len_mid_symbols];
- + Bit_model bm_high[len_high_symbols];
- +};
- +
- +static inline void Lm_init(struct Len_model * const lm)
- +{
- + Bm_init(&lm->choice1);
- + Bm_init(&lm->choice2);
- + Bm_array_init(lm->bm_low[0], pos_states * len_low_symbols);
- + Bm_array_init(lm->bm_mid[0], pos_states * len_mid_symbols);
- + Bm_array_init(lm->bm_high, len_high_symbols);
- +}
- +
- +
- +typedef uint32_t CRC32[256]; /* Table of CRCs of all 8-bit messages. */
- +
- +static CRC32 crc32;
- +
- +static inline void CRC32_init(void)
- +{
- + unsigned n;
- +
- + for (n = 0; n < 256; ++n) {
- + unsigned c = n;
- + int k;
- +
- + for (k = 0; k < 8; ++k) {
- + if (c & 1)
- + c = 0xEDB88320U ^ (c >> 1);
- + else
- + c >>= 1;
- + }
- + crc32[n] = c;
- + }
- +}
- +
- +static inline void CRC32_update_buf(uint32_t * const crc,
- + const uint8_t * const buffer,
- + const long size)
- +{
- + long i;
- + uint32_t c = *crc;
- +
- + for (i = 0; i < size; ++i)
- + c = crc32[(c^buffer[i])&0xFF] ^ (c >> 8);
- + *crc = c;
- +}
- +
- +
- +static const uint8_t magic_string[4] = { 0x4C, 0x5A, 0x49, 0x50 }; /* "LZIP" */
- +
- +typedef uint8_t File_header[6]; /* 0-3 magic bytes */
- + /* 4 version */
- + /* 5 coded_dict_size */
- +enum { Fh_size = 6 };
- +
- +static inline bool Fh_verify_magic(const File_header data)
- +{
- + int i;
- +
- + for (i = 0; i < 4; ++i)
- + if (data[i] != magic_string[i])
- + return false;
- + return (data[4] == 1);
- +}
- +
- +static inline unsigned Fh_get_dictionary_size(const File_header data)
- +{
- + unsigned sz = (1 << (data[5] & 0x1F));
- +
- + if (sz > min_dictionary_size)
- + sz -= (sz / 16) * ((data[5] >> 5) & 7);
- + return sz;
- +}
- +
- +
- +typedef uint8_t File_trailer[20];
- + /* 0-3 CRC32 of the uncompressed data */
- + /* 4-11 size of the uncompressed data */
- + /* 12-19 member size including header and trailer */
- +
- +enum { Ft_size = 20 };
- +
- +static inline unsigned Ft_get_data_crc(const File_trailer data)
- +{
- + unsigned tmp = 0;
- + int i;
- +
- + for (i = 3; i >= 0; --i) {
- + tmp <<= 8;
- + tmp += data[i];
- + }
- + return tmp;
- +}
- +
- +static inline unsigned long long Ft_get_data_size(const File_trailer data)
- +{
- + unsigned long long tmp = 0;
- + int i;
- +
- + for (i = 11; i >= 4; --i) {
- + tmp <<= 8;
- + tmp += data[i];
- + }
- + return tmp;
- +}
- +
- +static inline unsigned long long Ft_get_member_size(const File_trailer data)
- +{
- + unsigned long long tmp = 0;
- + int i;
- +
- + for (i = 19; i >= 12; --i) {
- + tmp <<= 8;
- + tmp += data[i];
- + }
- + return tmp;
- +}
- +
- +
- +struct Range_decoder {
- + unsigned long long partial_member_pos;
- + uint8_t *buffer; /* input buffer */
- + long buffer_size;
- + long pos; /* current pos in buffer */
- + long stream_pos; /* when reached, a new block must be read */
- + uint32_t code;
- + uint32_t range;
- + long (*fill)(void*, unsigned long);
- + bool at_stream_end;
- + bool buffer_given;
- +};
- +
- +
- +static bool Rd_read_block(struct Range_decoder * const rdec)
- +{
- + if (!rdec->at_stream_end) {
- + rdec->stream_pos = rdec->fill ?
- + rdec->fill(rdec->buffer, rdec->buffer_size) : 0;
- + rdec->at_stream_end = (rdec->stream_pos < rdec->buffer_size);
- + rdec->partial_member_pos += rdec->pos;
- + rdec->pos = 0;
- + }
- + return rdec->pos < rdec->stream_pos;
- +}
- +
- +
- +static bool Rd_init(struct Range_decoder * const rdec, uint8_t * const inbuf,
- + const long in_len, long (*fill)(void*, unsigned long))
- +{
- + rdec->partial_member_pos = 0;
- + rdec->buffer_size = (inbuf && in_len > 0) ? in_len : 16384;
- + rdec->buffer = inbuf ? inbuf : malloc(rdec->buffer_size);
- + if (!rdec->buffer)
- + return false;
- + rdec->pos = 0;
- + rdec->stream_pos = (inbuf && in_len > 0) ? in_len : 0;
- + rdec->code = 0;
- + rdec->range = 0xFFFFFFFFU;
- + rdec->fill = fill;
- + rdec->at_stream_end = false;
- + rdec->buffer_given = (inbuf != 0);
- + return true;
- +}
- +
- +static inline void Rd_free(struct Range_decoder * const rdec)
- +{
- + if (!rdec->buffer_given)
- + free(rdec->buffer);
- +}
- +
- +static inline bool Rd_finished(struct Range_decoder * const rdec)
- +{
- + return rdec->pos >= rdec->stream_pos && !Rd_read_block(rdec);
- +}
- +
- +static inline unsigned long long
- +Rd_member_position(const struct Range_decoder * const rdec)
- +{
- + return rdec->partial_member_pos + rdec->pos;
- +}
- +
- +static inline void Rd_reset_member_position(struct Range_decoder * const rdec)
- +{
- + rdec->partial_member_pos = 0; rdec->partial_member_pos -= rdec->pos;
- +}
- +
- +static inline uint8_t Rd_get_byte(struct Range_decoder * const rdec)
- +{
- + /* 0xFF avoids decoder error if member is truncated at EOS marker */
- + if (Rd_finished(rdec))
- + return 0xFF;
- + return rdec->buffer[rdec->pos++];
- +}
- +
- +static void Rd_load(struct Range_decoder * const rdec)
- +{
- + int i;
- +
- + rdec->code = 0;
- + for (i = 0; i < 5; ++i)
- + rdec->code = (rdec->code << 8) | Rd_get_byte(rdec);
- + rdec->range = 0xFFFFFFFFU;
- +}
- +
- +static inline void Rd_normalize(struct Range_decoder * const rdec)
- +{
- + if (rdec->range <= 0x00FFFFFFU) {
- + rdec->range <<= 8;
- + rdec->code = (rdec->code << 8) | Rd_get_byte(rdec);
- + }
- +}
- +
- +static uint32_t Rd_decode(struct Range_decoder * const rdec,
- + const uint32_t num_bits)
- +{
- + uint32_t symbol = 0;
- + uint32_t i;
- +
- + for (i = num_bits; i > 0; --i) {
- + bool bit;
- +
- + Rd_normalize(rdec);
- + rdec->range >>= 1;
- + /* symbol <<= 1; */
- + /* if(rdec->code >= rdec->range) { rdec->code -= rdec->range; symbol |= 1; } */
- + bit = (rdec->code >= rdec->range);
- + symbol = (symbol << 1) + bit;
- + rdec->code -= rdec->range & (0U - bit);
- + }
- + return symbol;
- +}
- +
- +static inline uint32_t Rd_decode_bit(struct Range_decoder * const rdec,
- + Bit_model * const probability)
- +{
- + uint32_t bound;
- +
- + Rd_normalize(rdec);
- + bound = (rdec->range >> bit_model_total_bits) * *probability;
- + if (rdec->code < bound) {
- + rdec->range = bound;
- + *probability += (bit_model_total - *probability) >> bit_model_move_bits;
- + return 0;
- + } else {
- + rdec->range -= bound;
- + rdec->code -= bound;
- + *probability -= *probability >> bit_model_move_bits;
- + return 1;
- + }
- +}
- +
- +static inline uint32_t Rd_decode_tree(struct Range_decoder * const rdec,
- + Bit_model bm[], const uint32_t num_bits)
- +{
- + uint32_t symbol = 1;
- + uint32_t i;
- +
- + for (i = num_bits; i > 0; --i)
- + symbol = (symbol << 1) | Rd_decode_bit(rdec, &bm[symbol]);
- + return symbol - (1 << num_bits);
- +}
- +
- +static inline uint32_t Rd_decode_tree_reversed(struct Range_decoder * const rdec,
- + Bit_model bm[], const uint32_t num_bits)
- +{
- + uint32_t model = 1;
- + uint32_t symbol = 0;
- + uint32_t i;
- +
- + for (i = 0; i < num_bits; ++i) {
- + const uint32_t bit = Rd_decode_bit(rdec, &bm[model]);
- +
- + model = (model << 1) + bit;
- + symbol |= (bit << i);
- + }
- + return symbol;
- +}
- +
- +static uint32_t Rd_decode_matched(struct Range_decoder * const rdec,
- + Bit_model bm[], uint32_t match_byte)
- +{
- + uint32_t symbol = 1;
- + uint32_t mask = 0x100;
- +
- + while (true) {
- + const uint32_t match_bit = (match_byte <<= 1) & mask;
- + const uint32_t bit = Rd_decode_bit(rdec, &bm[symbol+match_bit+mask]);
- +
- + symbol = (symbol << 1) + bit;
- + if (symbol > 0xFF)
- + return symbol & 0xFF;
- + mask &= ~(match_bit ^ (bit << 8)); /* if( match_bit != bit ) mask = 0; */
- + }
- +}
- +
- +static inline uint32_t Rd_decode_len(struct Range_decoder * const rdec,
- + struct Len_model * const lm,
- + const int pos_state)
- +{
- + if (Rd_decode_bit(rdec, &lm->choice1) == 0)
- + return Rd_decode_tree(rdec, lm->bm_low[pos_state], len_low_bits);
- + if (Rd_decode_bit(rdec, &lm->choice2) == 0)
- + return len_low_symbols +
- + Rd_decode_tree(rdec, lm->bm_mid[pos_state], len_mid_bits);
- + return len_low_symbols + len_mid_symbols +
- + Rd_decode_tree(rdec, lm->bm_high, len_high_bits);
- +}
- +
- +
- +struct LZ_decoder {
- + unsigned long long partial_data_pos;
- + struct Range_decoder *rdec;
- + /* Don't move bm_* to LZd_decode_member; makes frame too large. */
- + Bit_model bm_literal[1 << literal_context_bits][0x300];
- + Bit_model bm_match[states][pos_states];
- + Bit_model bm_rep[states];
- + Bit_model bm_rep0[states];
- + Bit_model bm_rep1[states];
- + Bit_model bm_rep2[states];
- + Bit_model bm_len[states][pos_states];
- + Bit_model bm_dis_slot[len_states][1 << dis_slot_bits];
- + Bit_model bm_dis[modeled_distances-end_dis_model+1];
- + Bit_model bm_align[dis_align_size];
- + struct Len_model match_len_model;
- + struct Len_model rep_len_model;
- +
- + unsigned long buffer_size;
- + uint32_t dictionary_size;
- + uint8_t *buffer; /* output buffer */
- + unsigned long pos; /* current pos in buffer */
- + unsigned long stream_pos; /* first byte not yet written to file */
- + uint32_t crc;
- + long (*flush)(void*, unsigned long);
- + bool pos_wrapped;
- + bool buffer_given;
- + bool write_error;
- +};
- +
- +static void LZd_flush_data(struct LZ_decoder * const d)
- +{
- + if (d->pos > d->stream_pos) {
- + const long size = d->pos - d->stream_pos;
- +
- + CRC32_update_buf(&d->crc, d->buffer + d->stream_pos, size);
- + if ((d->flush &&
- + d->flush(d->buffer + d->stream_pos, size) != size) ||
- + (!d->flush && d->pos_wrapped))
- + d->write_error = true;
- + if (d->pos >= d->buffer_size) {
- + d->partial_data_pos += d->pos;
- + d->pos = 0;
- + d->pos_wrapped = true;
- + }
- + d->stream_pos = d->pos;
- + }
- +}
- +
- +static inline uint8_t LZd_peek_prev(const struct LZ_decoder * const d)
- +{
- + if (d->pos > 0)
- + return d->buffer[d->pos-1];
- + if (d->pos_wrapped)
- + return d->buffer[d->buffer_size-1];
- + return 0; /* prev_byte of first byte */
- +}
- +
- +static inline uint8_t LZd_peek(const struct LZ_decoder * const d,
- + const uint32_t distance)
- +{
- + const unsigned long i = ((d->pos > distance) ? 0 : d->buffer_size) +
- + d->pos - distance - 1;
- + return d->buffer[i];
- +}
- +
- +static inline void LZd_put_byte(struct LZ_decoder * const d, const uint8_t b)
- +{
- + d->buffer[d->pos] = b;
- + if (++d->pos >= d->buffer_size)
- + LZd_flush_data(d);
- +}
- +
- +static void LZd_copy_block(struct LZ_decoder * const d,
- + const uint32_t distance, uint32_t len)
- +{
- + unsigned long lpos = d->pos, i = lpos - distance - 1;
- + bool fast, fast2;
- +
- + if (lpos > distance) {
- + fast = (len < d->buffer_size - lpos);
- + fast2 = (fast && len <= lpos - i);
- + } else {
- + i += d->buffer_size;
- + fast = (len < d->buffer_size - i); /* (i == pos) may happen */
- + fast2 = (fast && len <= i - lpos);
- + }
- + if (fast) { /* no wrap */
- + d->pos += len;
- + if (fast2) /* no wrap, no overlap */
- + memcpy(d->buffer + lpos, d->buffer + i, len);
- + else
- + for (; len > 0; --len)
- + d->buffer[lpos++] = d->buffer[i++];
- + } else
- + for (; len > 0; --len) {
- + d->buffer[d->pos] = d->buffer[i];
- + if (++d->pos >= d->buffer_size)
- + LZd_flush_data(d);
- + if (++i >= d->buffer_size)
- + i = 0;
- + }
- +}
- +
- +static bool LZd_init(struct LZ_decoder * const d,
- + struct Range_decoder * const rde,
- + const uint32_t dict_size, uint8_t * const outbuf,
- + long out_size, long (*flush)(void*, unsigned long))
- +{
- + d->partial_data_pos = 0;
- + d->rdec = rde;
- + Bm_array_init(d->bm_literal[0], (1 << literal_context_bits) * 0x300);
- + Bm_array_init(d->bm_match[0], states * pos_states);
- + Bm_array_init(d->bm_rep, states);
- + Bm_array_init(d->bm_rep0, states);
- + Bm_array_init(d->bm_rep1, states);
- + Bm_array_init(d->bm_rep2, states);
- + Bm_array_init(d->bm_len[0], states * pos_states);
- + Bm_array_init(d->bm_dis_slot[0], len_states * (1 << dis_slot_bits));
- + Bm_array_init(d->bm_dis, modeled_distances - end_dis_model + 1);
- + Bm_array_init(d->bm_align, dis_align_size);
- + Lm_init(&d->match_len_model);
- + Lm_init(&d->rep_len_model);
- +
- + d->buffer_size = (outbuf && out_size > 0) ? out_size : dict_size;
- + d->dictionary_size = min_t(unsigned long, d->buffer_size, dict_size);
- + d->buffer = outbuf ? outbuf : large_malloc(d->buffer_size);
- + if (!d->buffer)
- + return false;
- + d->pos = 0;
- + d->stream_pos = 0;
- + d->crc = 0xFFFFFFFFU;
- + d->flush = flush;
- + d->pos_wrapped = false;
- + d->buffer_given = (outbuf != 0);
- + d->write_error = false;
- + return true;
- +}
- +
- +static inline void LZd_free(struct LZ_decoder * const d)
- +{
- + if (!d->buffer_given)
- + large_free(d->buffer);
- +}
- +
- +static inline uint32_t LZd_crc(const struct LZ_decoder * const d)
- +{
- + return d->crc ^ 0xFFFFFFFFU;
- +}
- +
- +static inline unsigned long long
- +LZd_data_position(const struct LZ_decoder * const d)
- +{
- + return d->partial_data_pos + d->pos;
- +}
- +
- +
- +static bool LZd_verify_trailer(struct LZ_decoder * const d)
- +{
- + File_trailer trailer;
- + int i = 0;
- +
- + while (i < Ft_size)
- + trailer[i++] = Rd_get_byte(d->rdec);
- +
- + return (Ft_get_data_crc(trailer) == LZd_crc(d) &&
- + Ft_get_data_size(trailer) == LZd_data_position(d) &&
- + Ft_get_member_size(trailer) == Rd_member_position(d->rdec));
- +}
- +
- +
- +/* Return value: -1 = write error, 0 = OK, 1 = data error. */
- +static int LZd_decode_member(struct LZ_decoder * const d)
- +{
- + struct Range_decoder * const rdec = d->rdec;
- + uint32_t rep0 = 0; /* rep[0-3] latest four distances */
- + uint32_t rep1 = 0; /* used for efficient coding of */
- + uint32_t rep2 = 0; /* repeated distances */
- + uint32_t rep3 = 0;
- + State state = 0;
- +
- + Rd_load(rdec);
- + while (!Rd_finished(rdec)) {
- + const int pos_state = LZd_data_position(d) & pos_state_mask;
- +
- + if (Rd_decode_bit(rdec, &d->bm_match[state][pos_state]) == 0) {
- + Bit_model * const bm = d->bm_literal[get_lit_state(LZd_peek_prev(d))];
- +
- + if (St_is_char(state)) {
- + state -= (state < 4) ? state : 3;
- + LZd_put_byte(d, Rd_decode_tree(rdec, bm, 8));
- + } else {
- + state -= (state < 10) ? 3 : 6;
- + LZd_put_byte(d, Rd_decode_matched(rdec, bm, LZd_peek(d, rep0)));
- + }
- + } else { /* match or repeated match */
- + uint32_t len;
- +
- + if (Rd_decode_bit(rdec, &d->bm_rep[state]) != 0) {
- + if (Rd_decode_bit(rdec, &d->bm_rep0[state]) == 0) {
- + if (Rd_decode_bit(rdec, &d->bm_len[state][pos_state]) == 0) {
- + state = St_set_short_rep(state);
- + LZd_put_byte(d, LZd_peek(d, rep0));
- + continue;
- + }
- + } else {
- + uint32_t distance;
- +
- + if (Rd_decode_bit(rdec, &d->bm_rep1[state]) == 0)
- + distance = rep1;
- + else {
- + if (Rd_decode_bit(rdec, &d->bm_rep2[state]) == 0)
- + distance = rep2;
- + else {
- + distance = rep3;
- + rep3 = rep2;
- + }
- + rep2 = rep1;
- + }
- + rep1 = rep0;
- + rep0 = distance;
- + }
- + state = St_set_rep(state);
- + len = min_match_len + Rd_decode_len(rdec, &d->rep_len_model, pos_state);
- + } else { /* match */
- + uint32_t distance;
- +
- + len = min_match_len + Rd_decode_len(rdec, &d->match_len_model, pos_state);
- + distance = Rd_decode_tree(rdec, d->bm_dis_slot[get_len_state(len)], 6);
- + if (distance >= start_dis_model) {
- + const uint32_t dis_slot = distance;
- + const uint32_t direct_bits = (dis_slot >> 1) - 1;
- +
- + distance = (2 | (dis_slot & 1)) << direct_bits;
- + if (dis_slot < end_dis_model)
- + distance += Rd_decode_tree_reversed(rdec,
- + d->bm_dis + (distance - dis_slot), direct_bits);
- + else {
- + distance += Rd_decode(rdec, direct_bits - dis_align_bits) << dis_align_bits;
- + distance += Rd_decode_tree_reversed(rdec, d->bm_align, dis_align_bits);
- + if (distance == 0xFFFFFFFFU) { /* marker found */
- + Rd_normalize(rdec);
- + LZd_flush_data(d);
- + if (d->write_error)
- + return -1;
- + if (len == min_match_len && /* End Of Stream marker */
- + LZd_verify_trailer(d))
- + return 0;
- + if (len == min_match_len + 1) { /* Sync Flush marker */
- + Rd_load(rdec);
- + continue;
- + }
- + return 1;
- + }
- + }
- + }
- + rep3 = rep2; rep2 = rep1; rep1 = rep0; rep0 = distance;
- + state = St_set_match(state);
- + if (rep0 >= d->dictionary_size ||
- + (rep0 >= d->pos && !d->pos_wrapped)) {
- + LZd_flush_data(d);
- + return 1;
- + }
- + }
- + LZd_copy_block(d, rep0, len);
- + }
- + }
- + LZd_flush_data(d);
- + return 1;
- +}
- +
- +
- +STATIC int INIT __lunzip(unsigned char *inbuf, long in_len,
- + long (*fill)(void*, unsigned long),
- + long (*flush)(void*, unsigned long),
- + unsigned char *outbuf, long out_len,
- + long *in_posp,
- + void (*error)(char *x))
- +{
- + unsigned char *outptr = outbuf;
- + long out_size = out_len;
- + int retval = 0;
- + struct Range_decoder rdec;
- + struct LZ_decoder *decoder = 0;
- + bool first_member;
- +
- + if (in_posp)
- + *in_posp = 0;
- + CRC32_init();
- +
- + if (!Rd_init(&rdec, inbuf, in_len, fill)) {
- + error("Out of memory while allocating input buffer");
- + return -1;
- + }
- +
- + for (first_member = true;; first_member = false) {
- + int result, size;
- + unsigned dictionary_size;
- + File_header header;
- +
- + Rd_reset_member_position(&rdec);
- + for (size = 0; size < Fh_size; ++size)
- + header[size] = Rd_get_byte(&rdec);
- + if (Rd_finished(&rdec)) { /* End Of File */
- + if (first_member) {
- + error("File ends unexpectedly at member header");
- + retval = -1;
- + }
- + break;
- + }
- + if (!Fh_verify_magic(header)) {
- + if (first_member) {
- + error("Bad magic number (file not in lzip format)");
- + retval = -1;
- + }
- + break;
- + }
- + dictionary_size = Fh_get_dictionary_size(header);
- + if (dictionary_size < min_dictionary_size ||
- + dictionary_size > max_dictionary_size) {
- + error("Invalid dictionary size in member header");
- + retval = -1;
- + break;
- + }
- +
- + if (!decoder)
- + decoder = malloc(sizeof *decoder);
- + if (!decoder || !LZd_init(decoder, &rdec, dictionary_size, outptr, out_size, flush)) {
- + error("Out of memory while allocating output buffer");
- + retval = -1;
- + break;
- + }
- + result = LZd_decode_member(decoder);
- + if (in_posp)
- + *in_posp += Rd_member_position(&rdec);
- + if (outptr)
- + outptr += LZd_data_position(decoder);
- + if (out_size > 0)
- + out_size -= LZd_data_position(decoder);
- + LZd_free(decoder);
- + if (result != 0) {
- + if (result < 0)
- + error("write error");
- + else
- + error("LZIP-compressed data is corrupt");
- + retval = -1;
- + break;
- + }
- + }
- + if (decoder)
- + free(decoder);
- + Rd_free(&rdec);
- + return retval;
- +}
- +
- +#ifndef PREBOOT
- +STATIC int INIT lunzip(unsigned char *inbuf, long in_len,
- + long (*fill)(void*, unsigned long),
- + long (*flush)(void*, unsigned long),
- + unsigned char *outbuf,
- + long *in_posp,
- + void (*error)(char *x))
- +{
- + return __lunzip(inbuf, in_len, fill, flush, outbuf, 0, in_posp, error);
- +}
- +#else
- +STATIC int INIT __decompress(unsigned char *inbuf, long in_len,
- + long (*fill)(void*, unsigned long),
- + long (*flush)(void*, unsigned long),
- + unsigned char *outbuf, long out_len,
- + long *in_posp,
- + void (*error)(char *x))
- +{
- + return __lunzip(inbuf, in_len - 4, fill, flush, outbuf, out_len, in_posp, error);
- +}
- +#endif
- diff -urdN linux-4.14.21/scripts/Makefile.lib linux-4.14.21.new/scripts/Makefile.lib
- --- linux-4.14.21/scripts/Makefile.lib 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/scripts/Makefile.lib 2018-02-24 17:22:34.000000000 +0100
- @@ -343,6 +343,21 @@
- bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
- (rm -f $@ ; false)
-
- +# Lzip
- +# ---------------------------------------------------------------------------
- +# The .lz format has the uncompressed size available at the end of the
- +# file, but at offset (member_size - 16). So we append a gzip-style size.
- +# Use klzip to compress the kernel image and lzip to compress other things.
- +
- +quiet_cmd_klzip = LZIP $@
- +cmd_klzip = (cat $(filter-out FORCE,$^) | \
- + lzip -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
- + (rm -f $@ ; false)
- +
- +quiet_cmd_lzip = LZIP $@
- +cmd_lzip = (cat $(filter-out FORCE,$^) | lzip -9) > $@ || \
- + (rm -f $@ ; false)
- +
- # Lzma
- # ---------------------------------------------------------------------------
-
- diff -urdN linux-4.14.21/scripts/extract-ikconfig linux-4.14.21.new/scripts/extract-ikconfig
- --- linux-4.14.21/scripts/extract-ikconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/scripts/extract-ikconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -59,6 +59,7 @@
- try_decompress '\037\213\010' xy gunzip
- try_decompress '\3757zXZ\000' abcde unxz
- try_decompress 'BZh' xy bunzip2
- +try_decompress 'LZIP' xyz 'lzip -d'
- try_decompress '\135\0\0\0' xxx unlzma
- try_decompress '\211\114\132' xy 'lzop -d'
- try_decompress '\002\041\114\030' xyy 'lz4 -d -l'
- diff -urdN linux-4.14.21/scripts/extract-vmlinux linux-4.14.21.new/scripts/extract-vmlinux
- --- linux-4.14.21/scripts/extract-vmlinux 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/scripts/extract-vmlinux 2018-02-24 17:22:34.000000000 +0100
- @@ -55,6 +55,7 @@
- try_decompress '\037\213\010' xy gunzip
- try_decompress '\3757zXZ\000' abcde unxz
- try_decompress 'BZh' xy bunzip2
- +try_decompress 'LZIP' xyz 'lzip -d'
- try_decompress '\135\0\0\0' xxx unlzma
- try_decompress '\211\114\132' xy 'lzop -d'
-
- diff -urdN linux-4.14.21/scripts/gen_initramfs_list.sh linux-4.14.21.new/scripts/gen_initramfs_list.sh
- --- linux-4.14.21/scripts/gen_initramfs_list.sh 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/scripts/gen_initramfs_list.sh 2018-02-24 17:22:34.000000000 +0100
- @@ -249,6 +249,9 @@
- echo "$output_file" | grep -q "\.bz2$" \
- && [ -x "`which bzip2 2> /dev/null`" ] \
- && compr="bzip2 -9 -f"
- + echo "$output_file" | grep -q "\.lz$" \
- + && [ -x "`which lzip 2> /dev/null`" ] \
- + && compr="lzip -9 -f"
- echo "$output_file" | grep -q "\.lzma$" \
- && [ -x "`which lzma 2> /dev/null`" ] \
- && compr="lzma -9 -f"
- diff -urdN linux-4.14.21/scripts/package/Makefile linux-4.14.21.new/scripts/package/Makefile
- --- linux-4.14.21/scripts/package/Makefile 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/scripts/package/Makefile 2018-02-24 17:22:34.000000000 +0100
- @@ -123,8 +123,9 @@
- $(if $(findstring tar-src,$@),, \
- $(if $(findstring bz2,$@),bzip2, \
- $(if $(findstring gz,$@),gzip, \
- +$(if $(findstring lz,$@),lzip, \
- $(if $(findstring xz,$@),xz, \
- -$(error unknown target $@)))) \
- +$(error unknown target $@))))) \
- -f -9 $(perf-tar).tar)
-
- perf-%pkg: FORCE
- @@ -140,8 +141,10 @@
- @echo ' tar-pkg - Build the kernel as an uncompressed tarball'
- @echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
- @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
- + @echo ' tarlz-pkg - Build the kernel as a lzip compressed tarball'
- @echo ' tarxz-pkg - Build the kernel as a xz compressed tarball'
- @echo ' perf-tar-src-pkg - Build $(perf-tar).tar source tarball'
- @echo ' perf-targz-src-pkg - Build $(perf-tar).tar.gz source tarball'
- @echo ' perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball'
- + @echo ' perf-tarlz-src-pkg - Build $(perf-tar).tar.lz source tarball'
- @echo ' perf-tarxz-src-pkg - Build $(perf-tar).tar.xz source tarball'
- diff -urdN linux-4.14.21/scripts/package/buildtar linux-4.14.21.new/scripts/package/buildtar
- --- linux-4.14.21/scripts/package/buildtar 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/scripts/package/buildtar 2018-02-24 17:22:34.000000000 +0100
- @@ -35,6 +35,10 @@
- opts=--bzip2
- tarball=${tarball}.bz2
- ;;
- + tarlz-pkg)
- + opts=--lzip
- + tarball=${tarball}.lz
- + ;;
- tarxz-pkg)
- opts=--xz
- tarball=${tarball}.xz
- diff -urdN linux-4.14.21/scripts/patch-kernel linux-4.14.21.new/scripts/patch-kernel
- --- linux-4.14.21/scripts/patch-kernel 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/scripts/patch-kernel 2018-02-24 17:22:34.000000000 +0100
- @@ -117,6 +117,10 @@
- ext=".bz2"
- name="bzip2"
- uncomp="bunzip2 -dc"
- + elif [ -r ${filebase}.lz ]; then
- + ext=".lz"
- + name="lzip"
- + uncomp="lzip -dc"
- elif [ -r ${filebase}.xz ]; then
- ext=".xz"
- name="xz"
- diff -urdN linux-4.14.21/tools/testing/selftests/gen_kselftest_tar.sh linux-4.14.21.new/tools/testing/selftests/gen_kselftest_tar.sh
- --- linux-4.14.21/tools/testing/selftests/gen_kselftest_tar.sh 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/tools/testing/selftests/gen_kselftest_tar.sh 2018-02-24 17:22:34.000000000 +0100
- @@ -29,6 +29,10 @@
- copts="cvjf"
- ext=".tar.bz2"
- ;;
- + tarlz)
- + copts="cv --lzip -f"
- + ext=".tar.lz"
- + ;;
- tarxz)
- copts="cvJf"
- ext=".tar.xz"
- diff -urdN linux-4.14.21/usr/.gitignore linux-4.14.21.new/usr/.gitignore
- --- linux-4.14.21/usr/.gitignore 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/usr/.gitignore 2018-02-24 17:22:34.000000000 +0100
- @@ -5,6 +5,7 @@
- initramfs_data.cpio
- initramfs_data.cpio.gz
- initramfs_data.cpio.bz2
- +initramfs_data.cpio.lz
- initramfs_data.cpio.lzma
- initramfs_list
- include
- diff -urdN linux-4.14.21/usr/Kconfig linux-4.14.21.new/usr/Kconfig
- --- linux-4.14.21/usr/Kconfig 2018-02-22 15:42:33.000000000 +0100
- +++ linux-4.14.21.new/usr/Kconfig 2018-02-24 17:22:34.000000000 +0100
- @@ -70,6 +70,15 @@
- Support loading of a bzip2 encoded initial ramdisk or cpio buffer
- If unsure, say N.
-
- +config RD_LZIP
- + bool "Support initial ramdisk/ramfs compressed using lzip"
- + default y
- + depends on BLK_DEV_INITRD
- + select DECOMPRESS_LZIP
- + help
- + Support loading of a lzip encoded initial ramdisk or cpio buffer.
- + If unsure, say N.
- +
- config RD_LZMA
- bool "Support initial ramdisk/ramfs compressed using LZMA"
- default y
- @@ -165,6 +174,18 @@
- If you choose this, keep in mind that you need to have the bzip2 tool
- available to be able to compress the initram.
-
- +config INITRAMFS_COMPRESSION_LZIP
- + bool "Lzip"
- + depends on RD_LZIP
- + help
- + Lzip's compression ratio is better than that of gzip and bzip2.
- + Decompression speed is between gzip and bzip2. Compression can
- + be as fast as gzip or slower than bzip2 depending on compression
- + level. Lzip can produce a initramfs about a 16% smaller than gzip.
- +
- + If you choose this, keep in mind that you need to have the lzip tool
- + available to be able to compress the initram.
- +
- config INITRAMFS_COMPRESSION_LZMA
- bool "LZMA"
- depends on RD_LZMA
- @@ -222,12 +243,14 @@
- default "" if INITRAMFS_COMPRESSION_NONE
- default ".gz" if INITRAMFS_COMPRESSION_GZIP
- default ".bz2" if INITRAMFS_COMPRESSION_BZIP2
- + default ".lz" if INITRAMFS_COMPRESSION_LZIP
- default ".lzma" if INITRAMFS_COMPRESSION_LZMA
- default ".xz" if INITRAMFS_COMPRESSION_XZ
- default ".lzo" if INITRAMFS_COMPRESSION_LZO
- default ".lz4" if INITRAMFS_COMPRESSION_LZ4
- default ".gz" if RD_GZIP
- default ".lz4" if RD_LZ4
- + default ".lz" if RD_LZIP
- default ".lzo" if RD_LZO
- default ".xz" if RD_XZ
- default ".lzma" if RD_LZMA
|