# HG changeset patch # User Pascal Bellard # Date 1620305446 0 # Node ID c4968381aed9ba52e3f8a600cfdb663b2d69fe1b # Parent 0a67bf248823f1fcd7988bfe367c1eeda49dd0be memtest,plop: tune lzma compression diff -r 0a67bf248823 -r c4968381aed9 coturn/receipt --- a/coturn/receipt Sat May 01 09:28:58 2021 +0100 +++ b/coturn/receipt Thu May 06 12:50:46 2021 +0000 @@ -14,6 +14,12 @@ DEPENDS="libssl libsqlite zlib libevent" BUILD_DEPENDS="openssl-dev sqlite-dev zlib-dev libevent-dev" +current_version() +{ + wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ + sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q' +} + # Rules to configure and make the package. compile_rules() { diff -r 0a67bf248823 -r c4968381aed9 ipxe/stuff/bootloader.S --- a/ipxe/stuff/bootloader.S Sat May 01 09:28:58 2021 +0100 +++ b/ipxe/stuff/bootloader.S Thu May 06 12:50:46 2021 +0000 @@ -31,7 +31,7 @@ //#define NO_DOTS show progression dots ? -5 #ifndef BZIMAGE //#define TINY_ZIMAGE system < 64Kb ? -11 -//#defime NO_MINSETUP default setup (dos only) ? -4 +//#define NO_MINSETUP default setup (dos only) ? -4 //#define NO_CURSOR_DEFINITION -8 #endif @@ -300,7 +300,7 @@ xorw %si, %si xorw %di, %di cmpw %ax, %bx - jc forward + jnc forward decw %si decw %di std @@ -313,8 +313,8 @@ #else subw %ax, %bx jnc forward + //movw $0x8FFF, %ax movb $0x90, %ah - ;decw %ax forward: movw %ax, %es movw %ax, %di @@ -467,7 +467,9 @@ # Assume no error on first track. #ifdef FLOPPY_1440K_ONLY +#ifndef FLOPPY_HAS_2_SIDES #define FLOPPY_HAS_2_SIDES hardcore heads count to 2 +#endif #define FLOPPY_SECTORS 18 /* 18 sectors */ #else #define FLOPPY_HEADS 2 /* 2 heads minimum */ diff -r 0a67bf248823 -r c4968381aed9 memtest/receipt --- a/memtest/receipt Sat May 01 09:28:58 2021 +0100 +++ b/memtest/receipt Thu May 06 12:50:46 2021 +0000 @@ -13,6 +13,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() { @@ -21,19 +36,14 @@ patch -p1 < $i done make - 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 211 PB 3 ./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 ./pack memtest.bin memtest.packed-115200 mv memtest.bin memtest.bin.serial } diff -r 0a67bf248823 -r c4968381aed9 memtest/stuff/bootloader.S --- a/memtest/stuff/bootloader.S Sat May 01 09:28:58 2021 +0100 +++ b/memtest/stuff/bootloader.S Thu May 06 12:50:46 2021 +0000 @@ -313,8 +313,8 @@ #else subw %ax, %bx jnc forward + //movw $0x8FFF, %ax movb $0x90, %ah - ;decw %ax forward: movw %ax, %es movw %ax, %di diff -r 0a67bf248823 -r c4968381aed9 memtest/stuff/pack --- a/memtest/stuff/pack Sat May 01 09:28:58 2021 +0100 +++ b/memtest/stuff/pack Thu May 06 12:50:46 2021 +0000 @@ -38,9 +38,14 @@ done | xargs echo -en | dd conv=notrunc bs=1 of=$2 seek=$3 } +bits() +{ + sed "/define PROP_$1/!d;s|.*PROP_...||" unlzma.S +} + compress() { - xz -z -e --format=lzma --lzma1=mf=bt2 --stdout | dd bs=1 skip=13 + xz -z -e --format=raw --lzma1=lc=$(bits LC),lp=$(bits LP),pb=$(bits PB) --stdout } main() diff -r 0a67bf248823 -r c4968381aed9 plop/stuff/pack --- a/plop/stuff/pack Sat May 01 09:28:58 2021 +0100 +++ b/plop/stuff/pack Thu May 06 12:50:46 2021 +0000 @@ -42,9 +42,14 @@ done | xargs echo -en | dd conv=notrunc bs=1 of=$2 seek=$3 } +bits() +{ + sed "/^#define PROP_$1/!d;s|.*PROP_...||" unlzma.S +} + compress() { - xz -z -e --format=lzma --lzma1=mf=bt2 --stdout | dd bs=1 skip=13 + xz -z -e --format=raw --lzma1=mf=bt2,lc=$(bits LC),lp=$(bits LP),pb=$(bits PB),nice=84 --stdout } main() diff -r 0a67bf248823 -r c4968381aed9 plop/stuff/unlzma.S --- a/plop/stuff/unlzma.S Sat May 01 09:28:58 2021 +0100 +++ b/plop/stuff/unlzma.S Thu May 06 12:50:46 2021 +0000 @@ -18,9 +18,11 @@ * Compression with : lzma e src dst -eos -pb2 -lp0 -lc3 */ -#define PROP_PB 2 +//#define PROP_PB 2 +#define PROP_PB 0 #define PROP_LP 0 -#define PROP_LC 3 +//#define PROP_LC 3 +#define PROP_LC 0 #define PROPS (PROP_LC+(PROP_LP*9)+(PROP_PB*45)) // static const Byte *Buffer;