# HG changeset patch # User Pascal Bellard # Date 1620399156 0 # Node ID 8d938c826a9b756a518a724ab0c891e8364fce6f # Parent c4968381aed9ba52e3f8a600cfdb663b2d69fe1b memtest,plop: tune lzma compression (again) diff -r c4968381aed9 -r 8d938c826a9b memtest/receipt --- a/memtest/receipt Thu May 06 12:50:46 2021 +0000 +++ b/memtest/receipt Fri May 07 14:52:36 2021 +0000 @@ -36,14 +36,14 @@ patch -p1 < $i done make - tune_lzma 211 PB 3 + tune_lzma 218,mf=bt2 LC 2 ./pack memtest.bin memtest.packed mv memtest.bin memtest.bin.console sed -i -e 's/SERIAL_CONSOLE_DEFAULT 0/SERIAL_CONSOLE_DEFAULT 1/' \ -e 's/SERIAL_BAUD_RATE 9600/SERIAL_BAUD_RATE 115200/' config.h make clean make - tune_lzma 147 LC 2 + tune_lzma 179,mf=bt2 LC 2 ./pack memtest.bin memtest.packed-115200 mv memtest.bin memtest.bin.serial } diff -r c4968381aed9 -r 8d938c826a9b memtest/stuff/memtest86+-5.01-O0.patch --- a/memtest/stuff/memtest86+-5.01-O0.patch Thu May 06 12:50:46 2021 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- memtest86+-5.01/Makefile 2014-01-08 01:30:11.355900076 +0000 -+++ memtest86+-5.01/Makefile 2014-01-08 01:31:19.387555469 +0000 -@@ -12,7 +12,7 @@ - AS=as -32 - CC=gcc - --CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \ -+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \ - -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector - - OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ diff -r c4968381aed9 -r 8d938c826a9b memtest/stuff/memtest86+-5.01-Os.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/memtest/stuff/memtest86+-5.01-Os.patch Fri May 07 14:52:36 2021 +0000 @@ -0,0 +1,11 @@ +--- memtest86+-5.01/Makefile 2014-01-08 01:30:11.355900076 +0000 ++++ memtest86+-5.01/Makefile 2014-01-08 01:31:19.387555469 +0000 +@@ -12,7 +12,7 @@ + AS=as -32 + CC=gcc + +-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \ ++CFLAGS= -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin \ + -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector + + OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ diff -r c4968381aed9 -r 8d938c826a9b memtest/stuff/unlzma.S --- a/memtest/stuff/unlzma.S Thu May 06 12:50:46 2021 +0000 +++ b/memtest/stuff/unlzma.S Fri May 07 14:52:36 2021 +0000 @@ -195,17 +195,21 @@ # else shrb $8-PROP_LC, %bl # endif +#else + xor %bx,%bx #endif #if PROP_LP != 0 movb posState2(BP), %dl -# ifdef ONLY8086 +# if PROP_LC != 0 +# ifdef ONLY8086 movb $PROP_LC, %cl shl %cl, DX -# else +# else shl $PROP_LC, DX +# endif + movb $0, %bh # endif - movb $0, %bh add BX, DX #endif diff -r c4968381aed9 -r 8d938c826a9b plop/receipt --- a/plop/receipt Thu May 06 12:50:46 2021 +0000 +++ b/plop/receipt Fri May 07 14:52:36 2021 +0000 @@ -12,6 +12,21 @@ BUILD_DEPENDS="xz" +tune_lzma() +{ + cp $stuff/*.S $stuff/pack . + sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$1,|" -i pack + while [ -n "$2" ]; do + sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S + shift 2 + done + for i in bootloader unpack ; do + cc -o $i.o -Wa,-a=$i.lst -c $i.S + objcopy -O binary $i.o $i.bin + done + ./pack --build bootloader.bin unpack.bin +} + # Rules to configure and make the package. compile_rules() { @@ -24,13 +39,7 @@ 0299 01 font=bios 029A 00 zoomanimation=off EOT - cp $stuff/*.S $stuff/pack . - for i in bootloader unpack ; do - cc -o $i.o -Wa,-a=$i.lst -c $i.S - objcopy -O binary $i.o $i.bin - done - sed -i "s/VERSION/$VERSION/" pack - ./pack --build bootloader.bin unpack.bin + tune_lzma 84,mf=bt2 LC 0 PB 0 ./pack plpbt.bin plop } diff -r c4968381aed9 -r 8d938c826a9b plop/stuff/pack --- a/plop/stuff/pack Thu May 06 12:50:46 2021 +0000 +++ b/plop/stuff/pack Fri May 07 14:52:36 2021 +0000 @@ -49,7 +49,7 @@ compress() { - xz -z -e --format=raw --lzma1=mf=bt2,lc=$(bits LC),lp=$(bits LP),pb=$(bits PB),nice=84 --stdout + xz -z -e --format=raw --lzma1=lc=$(bits LC),lp=$(bits LP),pb=$(bits PB) --stdout } main() diff -r c4968381aed9 -r 8d938c826a9b plop/stuff/unlzma.S --- a/plop/stuff/unlzma.S Thu May 06 12:50:46 2021 +0000 +++ b/plop/stuff/unlzma.S Fri May 07 14:52:36 2021 +0000 @@ -18,11 +18,9 @@ * Compression with : lzma e src dst -eos -pb2 -lp0 -lc3 */ -//#define PROP_PB 2 -#define PROP_PB 0 +#define PROP_PB 2 #define PROP_LP 0 -//#define PROP_LC 3 -#define PROP_LC 0 +#define PROP_LC 3 #define PROPS (PROP_LC+(PROP_LP*9)+(PROP_PB*45)) // static const Byte *Buffer; @@ -197,17 +195,21 @@ # else shrb $8-PROP_LC, %bl # endif +#else + xor %bx,%bx #endif #if PROP_LP != 0 movb posState2(BP), %dl -# ifdef ONLY8086 +# if PROP_LC != 0 +# ifdef ONLY8086 movb $PROP_LC, %cl shl %cl, DX -# else +# else shl $PROP_LC, DX +# endif + movb $0, %bh # endif - movb $0, %bh add BX, DX #endif