# HG changeset patch # User Pascal Bellard # Date 1675589331 0 # Node ID 7f7bd3c9775ef589b14d927dc722bac5478e30d8 # Parent 9fdfc7625dd71d03cce47574c690409c44205f50 Update some web_site / wget_url diff -r 9fdfc7625dd7 -r 7f7bd3c9775e adobe-air-sdk/receipt --- a/adobe-air-sdk/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/adobe-air-sdk/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,7 +8,7 @@ LICENSE="custom" WEB_SITE="https://get.adobe.com/air" TARBALL="$PACKAGE-$VERSION.tar.bz2" -WGET_URL="http://airdownload.adobe.com/air/lin/download/$VERSION/AdobeAIRSDK.tbz2" +WGET_URL="https://airdownload.adobe.com/air/lin/download/$VERSION/AdobeAIRSDK.tbz2" DEPENDS="nss gtk+ libxslt" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e aurorials-theme/receipt --- a/aurorials-theme/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/aurorials-theme/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,7 +8,7 @@ LICENSE="GPL3" WEB_SITE="http://holkfoor.deviantart.com/art/Aurorials-pack-themes-382752941" TARBALL="$PACKAGE-$VERSION.tar.bz2" -WGET_URL="https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2" +WGET_URL="https://web.archive.org/web/20230120115700/https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2" TAGS="holkfoor openbox slim wallpaper" HOST_ARCH="any" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e btmgr/receipt --- a/btmgr/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/btmgr/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,7 +8,7 @@ LICENSE="GPL2" TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="https://$PACKAGE.sourceforge.net/about.html" -WGET_URL="http://$PACKAGE.sourceforge.net/${VERSION%-*}/$TARBALL" +WGET_URL="https://$PACKAGE.sourceforge.net/${VERSION%-*}/$TARBALL" TAGS="boot loader floppy CD" # What is the latest version available today? diff -r 9fdfc7625dd7 -r 7f7bd3c9775e chocolate-doom/receipt --- a/chocolate-doom/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/chocolate-doom/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -6,10 +6,10 @@ SHORT_DESC="Doom source port as close as possible to vanilla Doom." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="GPL2" -WEB_SITE="https://chocolate-doom.org/wiki/index.php/Chocolate_Doom" +WEB_SITE="https://www.chocolate-doom.org/wiki/index.php/Chocolate_Doom" TARBALL="$PACKAGE-$VERSION.tar.gz" -WGET_URL="https://chocolate-doom.org/downloads/$VERSION/$TARBALL" +WGET_URL="https://wwww.chocolate-doom.org/downloads/$VERSION/$TARBALL" DEPENDS="libsamplerate libsdl2 libsdl2-mixer libsdl2-net" BUILD_DEPENDS="libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e decibel/receipt --- a/decibel/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/decibel/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -10,7 +10,7 @@ SOURCE="$PACKAGE-audio-player" TARBALL="$SOURCE-$VERSION.tar.gz" -WGET_URL="${WEB_SITE}uploads/Main/$TARBALL" +WGET_URL="$WEB_SITE/uploads/Main/$TARBALL" DEPENDS="dbus-python gst-python mutagen notify-python pygtk python" BUILD_DEPENDS="findutils gettext" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e libav-dev/receipt --- a/libav-dev/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/libav-dev/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="Development files for libav." MAINTAINER="al.bobylev@gmail.com" LICENSE="GPL2 GPL3 LGPL2.1 LGPL3" -WEB_SITE="https://www.libav.org/" +WEB_SITE="https://web.archive.org/web/20221220014926/https://www.libav.org/" DEPENDS="libav pkg-config" WANTED="libav" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e libav/receipt --- a/libav/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/libav/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="Audio and video conversion library." MAINTAINER="al.bobylev@gmail.com" LICENSE="GPL2 GPL3 LGPL2.1 LGPL3" -WEB_SITE="https://www.libav.org/" +WEB_SITE="https://web.archive.org/web/20221220014926/https://www.libav.org/" #TARBALL="$PACKAGE-$VERSION.tar.bz2" #WGET_URL="git|git://github.com/andoma/libav.git" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e liblouis-dev/receipt --- a/liblouis-dev/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/liblouis-dev/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -6,7 +6,7 @@ LICENSE="GPL3" SHORT_DESC="Open-source braille translator and back-translator, development files." MAINTAINER="yuripourre@gmail.com" -WEB_SITE="http://liblouis.org/" +WEB_SITE="https://web.archive.org/web/20221220101611/http://liblouis.org/" DEPENDS="liblouis pkg-config" WANTED="liblouis" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e liblouis/receipt --- a/liblouis/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/liblouis/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -6,7 +6,7 @@ LICENSE="GPL3" SHORT_DESC="Open-source braille translator and back-translator." MAINTAINER="yuripourre@gmail.com" -WEB_SITE="http://liblouis.org/" +WEB_SITE="https://web.archive.org/web/20221220101611/http://liblouis.org/" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="https://github.com/$PACKAGE/$PACKAGE/releases/download/v$VERSION/$TARBALL" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e libunixODBC/receipt --- a/libunixODBC/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/libunixODBC/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="ODBC for unix - libraries." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="LGPL2.1" -WEB_SITE="http://www.unixodbc.org/" +WEB_SITE="https://www.unixodbc.org/" WANTED="unixODBC" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e madeirado-theme/receipt --- a/madeirado-theme/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/madeirado-theme/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,7 +8,7 @@ LICENSE="GPL3" WEB_SITE="http://holkfoor.deviantart.com/art/Madeirado-Pack-Theme-382214228" TARBALL="$PACKAGE-$VERSION.tar.bz2" -WGET_URL="https://dl.dropboxusercontent.com/s/ax6iqx6aa344fsu/Madeirado_GTK2_Openbox_Slim_Wallpaper.tar.bz2" +WGET_URL="https://web.archive.org/web/20230129190806if_/https://dl.dropboxusercontent.com/s/ax6iqx6aa344fsu/Madeirado_GTK2_Openbox_Slim_Wallpaper.tar.bz2" TAGS="holkfoor openbox slim wallpaper" #HOST_ARCH="any" # imagemagick missing in arm diff -r 9fdfc7625dd7 -r 7f7bd3c9775e memtest/receipt --- a/memtest/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/memtest/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -30,28 +30,36 @@ { file=$1 shift - for i in lzma lz4 lzsa1 lzsa2 ; do + for i in lzma lz4x2 lzsa1x2 lzsa2x2 ; do cp $stuff/*.S $stuff/pack . sed "s/VERSION/$VERSION/;s|lzma1=|&nice=${1:-64},|" -i pack while [ -n "$2" ]; do sed "s|^#define PROP_$2 .*|#define PROP_$2 $3|" -i unlzma.S shift 2 done - sed -i "s|uncompress|un$i|" unpack.S + sed -i "s|uncompress|un${i%x2}|" unpack.S asm bootloader asm unpack cp pack pack.bak ./pack --build bootloader.bin unpack.bin - PACKER=$i ./pack $file $file.$i - if [ $(stat -c %s $file.$i) -ge $((0x101F0)) ]; then - rm $file.$i + PACKER=${i%x2} ./pack $file $file.${i%x2} + if [ $(stat -c %s $file.${i%x2}) -ge $((0x101F0)) ]; then + rm $file.${i%x2} cp pack.bak pack - sed -e "s|^#define FLAT16.*// lzma case|#define FLAT16 0 // $i|" -i unpack.S + sed -e "s|^#define FLAT16.*// lzma case|#define FLAT16 0 // ${i%x2}|" -i unpack.S asm unpack ./pack --build bootloader.bin unpack.bin - PACKER=$i ./pack $file $file.$i + PACKER=${i%x2} ./pack $file $file.${i%x2} fi - mv unpack.lst unpack.lst.$i + mv unpack.lst unpack.lst.${i%x2} + if [ "${i#*x}" = "2" ]; then + cp pack.bak pack + sed -e "s|^#define DOUBLE_PACKED|#define DOUBLE_PACKED 1 // $i|" -i unpack.S + asm unpack + ./pack --build bootloader.bin unpack.bin + PACKER=${i%x2} ./pack $file $file.$i + mv unpack.lst unpack.lst.$i + fi done } diff -r 9fdfc7625dd7 -r 7f7bd3c9775e memtest/stuff/pack --- a/memtest/stuff/pack Fri Jan 27 10:37:43 2023 +0100 +++ b/memtest/stuff/pack Sun Feb 05 09:28:51 2023 +0000 @@ -11,6 +11,21 @@ [ -n "$x" ] && sed -i "s/XXXSP/$((514+0x$x))/" $0 || sed -i "/XXXSP/d" $0 x=$(grep -s setup_seg$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') [ -n "$x" ] && sed -i "s/XXXSS/$((513+0x$x))/" $0 || sed -i "/XXXSS/d" $0 + x=$(grep -s setup_keep$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') + if [ -n "$x" ]; then + sed -i "s/XXXK2 //" $0 + else + x=$(grep -s setup_syssize$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') + if [ -n "$x" ]; then + sed -i "s/XXXK2/bs=500 skip=1/" $0 + else + sed -i "s/XXXK2/bs=512 skip=1/" $0 + fi + fi + x=$(grep -s double_packed$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') + [ -n "$x" ] && sed -i "s/| compress /&& 2 /" $0 + x=$(grep -s update_code32_start$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') + [ -n "$x" ] && sed -i '/XXXU2/d; s| XXXU1||' $0 || sed -i '/XXXU1/d; s| XXXU2||' $0 grep -q BFF401 ${2/.bin/.lst} && sed -i 's/512 skip/500 skip/;s/1000 -/&32 - /' $0 grep -q 83C60D ${2/.bin/.lst} && sed -i 's/ | dd bs=1 skip=13//' $0 helpmsg=$(grep -s helpmsg$ ${1/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') @@ -40,15 +55,15 @@ bits() { - sed "/define PROP_$1/!d;s|.*PROP_...||" unlzma.S + sed "/^#define PROP_$1/!d;s|.*PROP_...||" unlzma.S } compress() { case "$PACKER" in lz4) lz4 -l --best | tail -c +5 ;; - lzsa1) cat > /tmp/in$$ ; lzsa -f1 /tmp/in$$ /tmp/out$$ ; tail -c +4 /tmp/out$$ ; rm -f /tmp/in$$ /tmp/out$$ ;; - lzsa2) cat > /tmp/in$$ ; lzsa -f2 /tmp/in$$ /tmp/out$$ ; tail -c +4 /tmp/out$$ ; rm -f /tmp/in$$ /tmp/out$$ ;; + lzsa1) cat > /tmp/in$$$1 ; lzsa -f1 /tmp/in$$$1 /tmp/out$$$1 ; tail -c +4 /tmp/out$$$1 ; rm -f /tmp/in$$$1 /tmp/out$$$1 ;; + lzsa2) cat > /tmp/in$$$1 ; lzsa -f2 /tmp/in$$$1 /tmp/out$$$1 ; tail -c +4 /tmp/out$$$1 ; rm -f /tmp/in$$$1 /tmp/out$$$1 ;; *) xz -z -e --format=raw --lzma1=lc=$(bits LC),lp=$(bits LP),pb=$(bits PB) --stdout esac } @@ -59,18 +74,23 @@ dd if=$1 bs=1 skip=497 seek=497 count=15 of=$2 conv=notrunc setup="$(echo $(od -j 497 -N 1 -dAn $1))" [ $setup -eq 0 ] && setup=4 + store $setup $2 497 1 + setup=$((setup+1)) store $setup $2 XXXSB 1 store $setup $2 XXXSW 1 - store $((32 * $setup)) $2 XXXSP - store $((0x1000 - 32*$setup)) $2 XXXSS - dd if=$1 bs=512 skip=1 | compress >>$2 + store $((32*setup+0xF000)) $2 XXXSP + store $((0x1000 - 32*setup)) $2 XXXSS + cp $1 /tmp/un$$ XXXU1 + store 1 /tmp/un$$ 534 1 XXXU1 + dd if=/tmp/un$$ XXXK2 | compress >>$2 XXXU1 + rm -f /tmp/un$$ XXXU1 + dd if=$1 XXXK2 | compress >>$2 XXXU2 size=$(stat -c %s $2) - syssize=$((($size-512*($setup+1)+15)/16)) - store $(($syssize + 0x1000)) $2 XXXP + syssize=$(((size-512*setup+15)/16)) + store $((syssize + 0x1000 + 0x1000)) $2 XXXP store $syssize $2 500 - store 4 $2 497 1 - store $((($size+511)/512)) $2 4 - store $((($size+15)/16)) $2 14 + store $(((size+511)/512)) $2 4 + store $(((size+15)/16)) $2 14 echo -e "$3" | dd conv=notrunc bs=1 seek=YYY of=$2 count=ZZZ } diff -r 9fdfc7625dd7 -r 7f7bd3c9775e memtest/stuff/unlz4.S --- a/memtest/stuff/unlz4.S Fri Jan 27 10:37:43 2023 +0100 +++ b/memtest/stuff/unlz4.S Sun Feb 05 09:28:51 2023 +0000 @@ -54,7 +54,7 @@ subl $1+2, %edx // count token & string address jle lz4main lodsw // get string address - xchgw %ax, %bx + xchg AX, BX call lz4len // get string length add $4, CX #if !defined(FLAT32) && !defined(FLAT16OUT) @@ -91,7 +91,7 @@ xchg AX, SI mov DI, SI sub BX, SI - rep movsb %es(SI), %es(DI) + rep movsb %es:(SI), %es:(DI) xchg AX, SI #endif jmp lz4chunk diff -r 9fdfc7625dd7 -r 7f7bd3c9775e memtest/stuff/unlzsa1.S --- a/memtest/stuff/unlzsa1.S Fri Jan 27 10:37:43 2023 +0100 +++ b/memtest/stuff/unlzsa1.S Sun Feb 05 09:28:51 2023 +0000 @@ -69,12 +69,13 @@ jne lzsa1chunk // 64Kb block # endif jcxz lzsa1quit // bail if we hit EOD - movw %cx, %dx + pushw %cx # if !defined(FLAT32) && !defined(FLAT16) xorw %cx, %cx call normalize # define NeedNormalize # endif + popw %dx addw %si, %dx #endif lzsa1chunk: // uncompress chunk @@ -83,7 +84,7 @@ shrb $4, %al // shift literals length into place movw $LITERALS_RUN_LEN*256+MIN_LITERALS_SIZE, %cx call lzsa1len // %ch = LITERALS_RUN_LEN -#if defined(NeedNormalize) && defined(PARANOIA) +#if defined(NeedNormalize) call lzsa1movLit // copy %cx literals from %ds:%si to %es:%di #else rep movsb // copy %cx literals from %ds:%si to %es:%di @@ -121,11 +122,12 @@ axok: .macro norm reg movw %si, \reg + subw %si, %dx andw $0xF, %si + addw %si, %dx shrw $4, \reg addw \reg, %ax movw %ax, %ds -lzsa1movLit: movw %di, \reg andw $0xF, %di shrw $4, \reg @@ -133,12 +135,14 @@ addw \reg, %ax movw %ax, %es .endm + pushw %dx # if defined(NeedNormalize) || defined(PARANOIA) call lzsa1movStr // copy string # else norm %bp rep movsb # endif + popw %dx popw %si popw %ds #else @@ -178,7 +182,8 @@ incw %ch # endif normalize: - movw %ds, %bp +lzsa1movLit: + movw %ds, %ax lzsa1movStr: norm %bp # if defined(PARANOIA) diff -r 9fdfc7625dd7 -r 7f7bd3c9775e memtest/stuff/unlzsa2.S --- a/memtest/stuff/unlzsa2.S Fri Jan 27 10:37:43 2023 +0100 +++ b/memtest/stuff/unlzsa2.S Sun Feb 05 09:28:51 2023 +0000 @@ -76,10 +76,11 @@ # endif jcxz lzsa2quit // bail if we hit EOD # if !defined(FLAT16) - movw %cx, %dx + pushw %cx xorw %cx, %cx call normalize # define NeedNormalize + popw %dx addw %si, %dx # else movw %si, %dx @@ -99,7 +100,7 @@ movw $LITERALS_RUN_LEN+256*MIN_LITERALS_SIZE, %cx shrb %cl, %al // shift literals length into place call lzsa2len // %cl = LITERALS_RUN_LEN -#if defined(NeedNormalize) && defined(PARANOIA) +#if defined(NeedNormalize) pushw %bp call lzsa2movLit // copy %cx literals from %ds:%si to %es:%di popw %bp @@ -181,11 +182,12 @@ axok: .macro norm reg movw %si, \reg + subw %si, %dx andw $0xF, %si + addw %si, %dx shrw $4, \reg addw \reg, %ax movw %ax, %ds -lzsa2movLit: movw %di, \reg andw $0xF, %di shrw $4, \reg @@ -194,12 +196,14 @@ movw %ax, %es .endm pushw %bp + pushw %dx # if defined(NeedNormalize) || defined(PARANOIA) call lzsa2movStr // copy string # else norm %bp rep movsb # endif + popw %dx popw %bp popw %si popw %ds @@ -254,7 +258,8 @@ incw %ch # endif normalize: - movw %ds, %bp +lzsa2movLit: + movw %ds, %ax lzsa2movStr: norm %bp # if defined(PARANOIA) diff -r 9fdfc7625dd7 -r 7f7bd3c9775e memtest/stuff/unpack.S --- a/memtest/stuff/unpack.S Fri Jan 27 10:37:43 2023 +0100 +++ b/memtest/stuff/unpack.S Sun Feb 05 09:28:51 2023 +0000 @@ -3,12 +3,14 @@ #define SYSSIZE 0x1F4 #define SETUPSIZE 0x1F1 +#define KEEP_BOOTSECTOR 0 #define LINUX_HEADER 0 #define UPDATE_SYSSIZE 1 -#define HARDCODED_SYSSIZE 1 -#define HARDCODED_SETUPSIZE 1 #define FLAT16 1 // lzma case -//#define FLAT16OUT 0 +#define FLAT16OUT 0 +#define COPYTOHIGHMEM 0 +#define UPDATE_CODE32_START 0 +#define DOUBLE_PACKED 0 #define SAVEREGS 0 #define ELKS 0 @@ -16,9 +18,14 @@ .code16 .org 0 +#if KEEP_BOOTSECTOR +#undef UPDATE_SYSSIZE +#define UPDATE_SYSSIZE 0 +#endif #if ELKS .arch i8086 #define FLAT16 1 +#define KEEP_BOOTSECTOR 1 #define LINUX_HEADER 0 #define SAVEREGS 0 #define TOPSEG 0x2000 @@ -26,6 +33,58 @@ #define TOPSEG 0x8000 #endif +.macro pusham +#if ELKS + pushw %ax +// movw %sp, %ax +// incw %ax // emulate popa behaviour +// incw %ax + pushw %cx + pushw %dx + pushw %bx +// pushw %ax // %sp + pushw %bp + pushw %si + pushw %di +#else + pushaw +#endif +.endm + +.macro popam +#if ELKS + popw %di + popw %si + popw %bp +// popw %ax + popw %bx + popw %dx + popw %cx + popw %ax +#else + popaw +#endif +.endm + +.macro pushm val +#if ELKS + movw \val, %ax + pushw %ax +#else + pushw \val +#endif +.endm + +.macro shrwm cnt, reg +#if ELKS + .rept \cnt + shrw $1, \reg + .endr +#else + shrw $\cnt, \reg +#endif +.endm + .globl _start _start: #if LINUX_HEADER @@ -48,113 +107,82 @@ pushfw pushw %cs pushw $0 - pushal + pusham + xorw %si, %si pushw %ds + pushw %es cld #else - pushw %cs // return adress is %cs:0 -# if FLAT16 - xorw %di, %di - pushw %di -# else - pushw $0 + pushw %cs // return adress is %cs:0 + xorw %si, %si + pushw %si +#endif // SAVEREGS + pushw %ds // bootsector+setup segment +#if FLAT16 +# 1- move 9000..9020+stp -> TOPSEG + pushm $TOPSEG + popw %es +# if SAVEREGS +setup_word: + movw $SETUP*256+256, %cx + pushw %cx // bootsector+setup words # endif -#endif -#if ELKS - movw $0x100, %ax - pushw %ax -#else -# if UPDATE_SYSSIZE - pushw %ds // -# else - pushw %cs // -# endif -#endif -#if FLAT16 -# 1- move 9020..9020+stp -> TOPSEG -# if ELKS - movb $TOPSEG/256, %ah - movw %ax, %es -# else - pushw $TOPSEG - popw %es // %es:%di = TOPSEG:0 -# endif - movw $0x200, %si // %ds:%si = 9000:0200 -# if SAVEREGS == 0 + pushw %es // TOPSEG pushw %es - call jumpinto // move setup & jmp %es:cont -# else -# if HARDCODED_SETUPSIZE -setup_word: - movw $SETUP*256, %cx -# else - xorw %cx, %cx - movb SETUPSIZE, %ch - movw %cx, %dx -# endif - pushw %cx // - pushw %es - pushw %di +# if SAVEREGS + xorw %di, %di // %ds:%si = 9000:0000 %es:%di = TOPSEG:0 + pushm $0x200+cont rep movsw lret +cont: +# else + movw $-0x200, %di + call jumpinto # endif -cont: # 2- move 1000..1000+sys -> TOPSEG+stp -# if ELKS - movw $0x1000, %ax - movw %ax, %ds -# else - pushw $0x1000 + pushm $0x1000 popw %ds -# endif xorw %si, %si // %ds:%si = 1000:0 subw %di, %cx // %cx = 64K - setupsz rep movsb # 3- unlz(TOPSEG+stp:end, 1000-stp:0) - pushw %es // -# if HARDCODED_SETUPSIZE setup_seg: -# if ELKS -# if UPDATE_SYSSIZE - movw $0x1000-(SETUP*32)-32, %ax -# else - movw $0x1000-(SETUP*32), %ax -# endif - movw %ax, %es -# else -# if UPDATE_SYSSIZE - pushw $0x1000-(SETUP*32)-32 -# else - pushw $0x1000-(SETUP*32) -# endif + pushm $0x1000-(SETUP*32)-32 popw %es -# endif +#else // FLAT16 +# 1- move 9020..9020+unpack -> 0700 and jump into + movw $0x700, %cx // Up to 3.5KB for unpacker (unlzma is << 1KB) + movw %cx, %es // Use 7000 .. 7E00, keep up to 23 elks setup sectors + pushw %es + xorw %di, %di // %ds:%si = 9000:0000 %es:%di = 0700:0000 + pushm $0x200+cont +# if SAVEREGS + rep + movsw + lret # else -# if UPDATE_SYSSIZE - incb %dh -# endif -# if ELKS - shrw $1, %dx - shrw $1, %dx - shrw $1, %dx -# else - shrw $3, %dx -# endif - movw %ds, %ax - subw %dx, %ax - movw %ax, %es -# endif -# else // FLAT16 -# 1- move 1000..1000+sys -> 9000-sys -# if HARDCODED_SYSSIZE + jmp jumpinto +# endif +cont: +# 2- move 9020..9020+stp -> 9000-sys-stp + movw %ds, %dx +setup_byte: + movb $SETUP+1, %ch +setup_para: + subw $SETUP*32+32+0xF000, %dx packed_syssize: - movw $0x1000+0, %ax -# else - movw SYSSIZE, %ax - addw $0x1000, %ax -# endif + movw $0+0x1000, %ax + pushw %cx // bootsector+setup words + subw %ax, %dx + movw %dx, %es + pushw %es // 9000-sys-stp + xorw %si, %si + xorw %di, %di // %ds:%si = 9000:0 %es:%di = 9000-sys-stp:0 + rep + movsw +# 3- move 1000..1000+sys -> 9000-sys movw %ds, %dx mvsys: decw %ax @@ -168,102 +196,109 @@ movsw cmpw $0x1000, %ax jne mvsys -# 2- move 9020..9020+stp -> 9000-sys-stp - -# if HARDCODED_SETUPSIZE -setup_byte: - movb $SETUP, %ch -setup_para: - subw $SETUP*32, %dx -# else - movb %ss:SETUPSIZE, %ch - movw %cx, %ax -# if ELKS - shrw $1, %ax - shrw $1, %ax - shrw $1, %ax -# else - shrw $3, %ax -# endif - subw %ax, %dx -# endif -# if SAVEREGS != 0 - pushw %cx // -# endif - movw %dx, %es - xorw %si, %si // %cs:%si = 9020:0 - xorw %di, %di // %es:%di = 9000-sys-stp:0 - rep - movsw %cs:(%si),%es:(%di) - pushw %es // -# 3- reloc itself in 0x7C00 - pushw $0x07C0 +# 4- unlz(9000-sys-stp:end, 1000-stp:0) +setup_seg: + pushm $0x1000-(SETUP*32)-32 popw %es - movw $cont, %si // %cs:%si = 9020:cont - movw %si, %di // %es:%di = 7C0:cont - movw $end-_start, %cx - pushw %es - pushw %di - rep - movsb %cs:(%si),%es:(%di) - lret -cont: -# 4- unlz(9000-sys-stp:end, 1000-stp:0) -# if HARDCODED_SETUPSIZE -setup_seg: -# if UPDATE_SYSSIZE - pushw $0x1000-(SETUP*32)-32 -# else - pushw $0x1000-(SETUP*32) -# endif - popw %es -# else - negw %ax -# if UPDATE_SYSSIZE - addw $0x1000-32, %ax -# else - addw $0x1000, %ax -# endif - movw %ax, %es -# endif #endif // FLAT16 popw %ds // - movw $end-_start, %si // %ds:%si = TOPSSEG:compressed / 9000-sys-stp:compressed -#if UPDATE_SYSSIZE - movw $SYSSIZE, %di // %es:%di = 1000-setup-bootsector:SYSSIZE +#if FLAT16 && SAVEREGS == 0 + movw $end-_start, %si // %ds:%si = TOPSSEG:compressed #else + movw $0x200+end-_start, %si // %ds:%si = 9000-sys-stp:compressed +#endif +#if KEEP_BOOTSECTOR +setup_keep: xorw %di, %di +#else +# if UPDATE_SYSSIZE +setup_syssize: + movw $0x1F4, %di // %es:%di = 1000-setup-bootsector:SYSSIZE +# else + movw $0x200, %di +# endif #endif pushw %di pushw %es +#if DOUBLE_PACKED +double_packed: + pushm $0x4000 + popw %es + pushw %di + pushw %es call unpack popw %ds - popw %si // %ds:%si = 1000-setup-bootsector:SYSSIZE + popw %si + popw %es + popw %di + pushw %di + pushw %es +#endif + call unpack +#if COPYTOHIGHMEM +# if FLAT16OUT + movw $0x9310+1, %ax // from 1000:FFFF +# else +# if 0 + movw %es, %ax + shrw $12, %ax + orw $0x9310, %ax +# else + movw $0x9310+7, %ax // from 7000:FFFF +# endif +# endif + pushw %ss + popw %es + movw $8, %cx +zero1: + pushw $0 // 2E..20 + loop zero1 +src: + pushw %cx // 1E, 16 + pushw %ax // 1A: dst %ax:%cx, 12: src %ax:%cx + pushw %cx + pushw $-1 // 18, 10: full 64K segment + subb $0x10, %al + jnc src + movb $8, %cl +zero2: + pushw $0 // 0E..00 + loop zero2 + movw %sp, %si +syslp: + movb $0x80, %ch + movb $0x87, %ah + int $0x15 +# if FLAT16OUT == 0 + decb %es:0x1C(%si) + decb %es:0x14(%si) + jne syslp // down to 1000:0000 +# endif + addw $0x30, %sp +#endif // COPYTOHIGHMEM + popw %ds + popw %si // %ds:%si = 1000-setup-bootsector:SYSSIZE / 0 +#if UPDATE_CODE32_START +update_code32_start: +// movb $1, 0x216 +#endif +#if FLAT16 == 0 || SAVEREGS + popw %cx // bootsector+setup words +#endif + popw %es // bootsector+setup segment movw %si, %di -# if SAVEREGS != 0 - popw %cx // -#if UPDATE_SYSSIZE -// not need with memtest movb $(512-SYSSIZE)/2, %cl +jumpinto: +#if FLAT16 && SAVEREGS == 0 +setup_word: + movw $SETUP*256+256, %cx #endif - popw %es // -# 5- move 1000-stp..1000 -> 9020 -# else - popw %es // %es:%di = 9000:SYSSIZE (the last 12 bytes are missing) -jumpinto: -# if HARDCODED_SETUPSIZE -setup_word: - movw $SETUP*256, %cx -# else - xorw %cx, %cx - movb %ss:SETUPSIZE, %ch - movw %cx, %dx -# endif -# endif +# 5- move 1000-stp..1000 -> 9000 rep movsw #if SAVEREGS + popw %es popw %ds - popal + popam iret #else lret @@ -277,6 +312,12 @@ #if ELKS #define ONLY8086 1 #endif +#if defined(FLAT16OUT) && FLAT16OUT == 0 +#undef FLAT16OUT +#endif +#if defined(FLAT16) && FLAT16 == 0 +#undef FLAT16 +#endif #include "uncompress.S" end: diff -r 9fdfc7625dd7 -r 7f7bd3c9775e picoblog/receipt --- a/picoblog/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/picoblog/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -7,7 +7,7 @@ MAINTAINER="pascal.bellard@slitaz.org" LICENSE="MIT" TARBALL="$PACKAGE-$VERSION" -WEB_SITE="https://dev.kd2.org/picoblog/" +WEB_SITE="https://web.archive.org/web/20200128165016/https://dev.kd2.org/picoblog/" WGET_URL="https://svn.kd2.org/svn/misc/apps/picoblog/index.php" HOST_ARCH="any" TAGS="blog" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e pkcs/receipt --- a/pkcs/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/pkcs/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,7 +8,7 @@ LICENSE="MIT" TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="http://www.truecrypt.org/" -WGET_URL="https://arch.juline.tech/other/tc/$TARBALL" +WGET_URL="http://mirror.vcu.edu/pub/gnu_linux/archlinux/other/tc/$TARBALL" genpkg_rules() { diff -r 9fdfc7625dd7 -r 7f7bd3c9775e plop/receipt --- a/plop/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/plop/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -10,27 +10,51 @@ TARBALL="plpbt-$VERSION.zip" WGET_URL="https://download.plop.at/files/bootmngr/$TARBALL" -BUILD_DEPENDS="xz" +BUILD_DEPENDS="xz lz4 lzsa" +# What is the latest version available today? current_version() { wget -O - $WEB_SITE 2>/dev/null | \ sed '/td align=center/!d;s|.*center>||;s| unpack.S + cp $stuff/pack . + sed "s/VERSION/$VERSION/;s|lzma1=|&nice=$nice,|" -i pack + cp pack pack.bak + asm bootloader + asm unpack + cp unpack.lst unpack.lst.${c%x2} + ./pack --build bootloader.bin unpack.bin + PACKER=${c%x2} ./pack plpbt.bin plop.${c%x2} + [ $(stat -c %s plop.${c%x2}) -lt $(stat -c %s plop) ] && cp plop.${c%x2} plop + if [ "${c#*x}" = "2" ]; then + cp pack.bak pack + sed -e "s|^#define DOUBLE_PACKED|#define DOUBLE_PACKED 1 // $i|" -i unpack.S + asm unpack + ./pack --build bootloader.bin unpack.bin + PACKER=${c%x2} ./pack plpbt.bin plop.$c + mv unpack.lst unpack.lst.$c + fi done - ./pack --build bootloader.bin unpack.bin + true } # Rules to configure and make the package. @@ -38,7 +62,7 @@ { while read ofs data name; do echo -en "\x$data" | \ - dd conv=notrunc of=plpbt.bin bs=1 seek=$((0x$ofs)) + dd conv=notrunc of=plpbt.bin bs=1 seek=$((0x$ofs)) 2> /dev/null done < /tmp/in$$$1 ; lzsa -f1 /tmp/in$$$1 /tmp/out$$$1 ; tail -c +4 /tmp/out$$$1 ; rm -f /tmp/in$$$1 /tmp/out$$$1 ;; + lzsa2) cat > /tmp/in$$$1 ; lzsa -f2 /tmp/in$$$1 /tmp/out$$$1 ; tail -c +4 /tmp/out$$$1 ; rm -f /tmp/in$$$1 /tmp/out$$$1 ;; + *) xz -z -e --format=raw --lzma1=lc=$(bits LC),lp=$(bits LP),pb=$(bits PB) --stdout + esac } main() @@ -58,19 +74,23 @@ dd if=$1 bs=1 skip=497 seek=497 count=15 of=$2 conv=notrunc setup="$(echo $(od -j 497 -N 1 -dAn $1))" [ $setup -eq 0 ] && setup=4 - setup=$(($setup+XXXK1)) + store $setup $2 497 1 + setup=$((setup+1)) store $setup $2 XXXSB 1 store $setup $2 XXXSW 1 - store $((32 * $setup)) $2 XXXSP - store $((0x1000 - 32*$setup)) $2 XXXSS - dd if=$1 bs=512 skip=XXXK2 | compress >>$2 + store $((32*setup+0xF000)) $2 XXXSP + store $((0x1000 - 32*setup)) $2 XXXSS + cp $1 /tmp/un$$ XXXU1 + store 1 /tmp/un$$ 534 1 XXXU1 + dd if=/tmp/un$$ XXXK2 | compress >>$2 XXXU1 + rm -f /tmp/un$$ XXXU1 + dd if=$1 XXXK2 | compress >>$2 XXXU2 size=$(stat -c %s $2) - syssize=$((($size-512*($setup+XXXK3)+15)/16)) - store $(($syssize + 0x1000)) $2 XXXP + syssize=$(((size-512*setup+15)/16)) + store $((syssize + 0x1000 + 0x1000)) $2 XXXP store $syssize $2 500 - store 4 $2 497 1 - store $((($size+511)/512)) $2 4 - store $((($size+15)/16)) $2 14 + store $(((size+511)/512)) $2 4 + store $(((size+15)/16)) $2 14 echo -e "$3" | dd conv=notrunc bs=1 seek=YYY of=$2 count=ZZZ } diff -r 9fdfc7625dd7 -r 7f7bd3c9775e plop/stuff/unlz4.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plop/stuff/unlz4.S Sun Feb 05 09:28:51 2023 +0000 @@ -0,0 +1,132 @@ +// Lz4Decode: +#ifndef FLAT32 +// input ds:si=inStream, es:di=outStream +// output outStream[], ds:si, es:di + .code16 +#define AX %ax +#define BX %bx +#define CX %cx +#define SI %si +#define DI %di +#else +// input esi=inStream, edi=outStream +// output outStream[], ds:esi, es:edi + .code32 +#define AX %eax +#define BX %ebx +#define CX %ecx +#define SI %esi +#define DI %edi +#endif + +#define ARCHIVE_MAGICNUMBER 0x184C2102 + +//#define PARANOIA // cover rare cases, optional + +lz4main: +#ifdef PARANOIA + cld +# if !defined(FLAT32) && !defined(FLAT16OUT) + xorl %cx, %cx + call lz4mov +# endif +#endif + lodsl // get chunkSize +#ifndef NO_LZ4_HEADER + cmpl $ARCHIVE_MAGICNUMBER, %eax + je lz4main +#endif + orl %eax, %eax // end of file ? + je lz4quit + xchgl %eax, %edx +lz4chunk: // uncompress chunk + lodsb // get token + movb %al, %bl + shrb $4, %al + call lz4len // get literal length + subl %ecx, %edx // count literal +#if !defined(FLAT32) && !defined(FLAT16OUT) && (!defined(FLAT16) || !defined(PARANOIA)) +#define NeedLz4mov + call lz4mov // copy literals +#else + rep movsb +#endif + subl $1+2, %edx // count token & string address + jle lz4main + lodsw // get string address + xchg AX, BX + call lz4len // get string length + add $4, CX +#if !defined(FLAT32) && !defined(FLAT16OUT) + pushw %ds + pushw %si + movw %di, %si + subw %bx, %si + movw %es, %ax + jnc axok + subb $0x10, %ah +axok: +.macro norm reg + movw %si, \reg + andw $0xF, %si + shrw $4, \reg + addw \reg, %ax + movw %ax, %ds + movw %di, \reg + andw $0xF, %di + shrw $4, \reg + movw %es, %ax + addw \reg, %ax + movw %ax, %es +.endm +# if !defined (NeedLz4mov) + norm %bp + rep movsb +# else + call lz4movStr // copy string +# endif + popw %si + popw %ds +#else + xchg AX, SI + mov DI, SI + sub BX, SI + rep movsb %es:(SI), %es:(DI) + xchg AX, SI +#endif + jmp lz4chunk + +#if defined(NeedLz4mov) +# if defined(PARANOIA) +lz4movlp: + xchgw %ax, %cx + movw $0x3C00, %cx + rep movsl + xchgw %ax, %cx + sub $0xF0, %ch +# endif +lz4mov: + movw %ds, %ax +lz4movStr: + norm %bp +# if defined(PARANOIA) + cmp $0xFF, %ch // catch FFFX case + jz lz4movlp +# endif + rep movsb + ret +#endif + +lz4len: // get length in %ecx + andl $0xF, %eax + movl %eax, %ecx + cmpb $0xF, %al + jne lz4quit +lz4len2: + lodsb + decl %edx // remaining chunk size + addw %ax, %cx + cmpb $0xFF, %al + je lz4len2 +lz4quit: + ret diff -r 9fdfc7625dd7 -r 7f7bd3c9775e plop/stuff/unlzsa1.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plop/stuff/unlzsa1.S Sun Feb 05 09:28:51 2023 +0000 @@ -0,0 +1,195 @@ +// Lzsa1Decode: +#ifndef FLAT32 +// input ds:si=inStream, es:di=outStream +// output outStream[], ds:si, es:di + .code16 +#define AX %ax +#define BX %bx +#define SI %si +#define DI %di +#else +// input esi=inStream, edi=outStream +// output outStream[], ds:esi, es:edi + .code32 +#define AX %eax +#define BX %ebx +#define SI %esi +#define DI %edi +#endif + +MATCH_RUN_LEN = 15 +LITERALS_RUN_LEN = 7 +MIN_MATCH_SIZE = 3 +MIN_LITERALS_SIZE = 0 + +#define PACKED_ONLY // assume no copy block, optional +//#define PARANOIA // cover rare cases, optional + +lzsa1main: +#ifdef PARANOIA + cld +#endif +#ifndef RAW_FORMAT +# if defined(PARANOIA) && !defined(FLAT32) && !defined(FLAT16) + xorw %cx, %cx + call normalize +# endif +# ifndef NO_LZSA1_HEADER + lodsw + cmpw $0x9E7B, %ax // magic + jne lzsa1main + lodsb + cmpb $0, %al // lzsa1 + jne lzsa1main +# endif +lzsa1block: // uncompress chunk + lodsw // block size + xchgw %ax, %cx + lodsb +# ifndef PACKED_ONLY + orb %al, %al + jns lzsa1compressed +# if !defined(FLAT32) && !defined(FLAT16OUT) + movw %cx, %dx + movb $0, %cl + movb $0, %dh +copytail: + call lzsa1movStr + xchg %dx, %cx + incw %cx + loop copytail +# else + movsb // copy block +copylp: + movsb // copy block + loop copylp // handle 64K case +# endif + jmp lzsa1block +lzsa1compressed: + jne lzsa1chunk // 64Kb block +# endif + jcxz lzsa1quit // bail if we hit EOD + pushw %cx +# if !defined(FLAT32) && !defined(FLAT16) + xorw %cx, %cx + call normalize +# define NeedNormalize +# endif + popw %dx + addw %si, %dx +#endif +lzsa1chunk: // uncompress chunk + lodsb // get token O|LLL|MMMM + movb %al, %bl // keep token in bl + shrb $4, %al // shift literals length into place + movw $LITERALS_RUN_LEN*256+MIN_LITERALS_SIZE, %cx + call lzsa1len // %ch = LITERALS_RUN_LEN +#if defined(NeedNormalize) + call lzsa1movLit // copy %cx literals from %ds:%si to %es:%di +#else + rep movsb // copy %cx literals from %ds:%si to %es:%di +#endif +#ifndef RAW_FORMAT + cmpw %dx, %si + jae lzsa1block // bail if we hit EOD +#endif +#ifdef FLAT32 + orl $-1, %eax +#else + movb $-1, %ah +#endif + testb %bl, %bl // check match offset size in token (O bit) + jns lzsa1ShortOfs + lodsw + .byte 0x3C // mask lodsb with cmpb $0xAC, %al +lzsa1ShortOfs: + lodsb +#ifdef RAW_FORMAT + orw %ax, %ax + jz lzsa1quit // bail if we hit EOD +#endif + xchg AX, BX // %bx: match offset %ax: original token + movw $MATCH_RUN_LEN*256+MIN_MATCH_SIZE, %cx + call lzsa1len +#if !defined(FLAT32) && !defined(FLAT16OUT) + pushw %ds + pushw %si + movw %di, %si + addw %bx, %si + movw %es, %ax + jc axok + subb $0x10, %ah +axok: +.macro norm reg + movw %si, \reg + subw %si, %dx + andw $0xF, %si + addw %si, %dx + shrw $4, \reg + addw \reg, %ax + movw %ax, %ds + movw %di, \reg + andw $0xF, %di + shrw $4, \reg + movw %es, %ax + addw \reg, %ax + movw %ax, %es +.endm + pushw %dx +# if defined(NeedNormalize) || defined(PARANOIA) + call lzsa1movStr // copy string +# else + norm %bp + rep movsb +# endif + popw %dx + popw %si + popw %ds +#else + xchg AX, SI // save %si + lea (BX,DI), SI + rep movsb %es:(SI), %es:(DI) + xchg AX, SI // restore %si +#endif + jmp lzsa1chunk + +lzsa1len: // get length in %ecx + andb %ch, %al + cbw // clear %ah + cmpb %ch, %al + jne lzsa1minNumber // S=0-6, L=0-14 + lodsb + addb %ch, %cl +lzsa1minNumber: + addb %cl, %al + jnc lzsa1gotNumber // 0-255 + movb %al, %ah // S=256-1791, L=256-3839 or S=256-511, L=256-511 + jne lzsa1midNumber + lodsw // 0-65535 + .byte 0x3C // mask lodsb with cmpb $0xAC, %al +lzsa1midNumber: + lodsb +lzsa1gotNumber: + xchgw %ax, %cx +lzsa1quit: + ret + +#if defined(NeedNormalize) || defined(PARANOIA) +# if defined(PARANOIA) +lzsa1movlp: + decw %ch + rep movsb + incw %ch +# endif +normalize: +lzsa1movLit: + movw %ds, %ax +lzsa1movStr: + norm %bp +# if defined(PARANOIA) + cmpb $0xFF, %ch // catch FFFX case + je lzsa1movlp +# endif + rep movsb + ret +#endif diff -r 9fdfc7625dd7 -r 7f7bd3c9775e plop/stuff/unlzsa2.S --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plop/stuff/unlzsa2.S Sun Feb 05 09:28:51 2023 +0000 @@ -0,0 +1,271 @@ +// Lzsa2Decode: +#ifndef FLAT32 +// input ds:si=inStream, es:di=outStream +// output outStream[], ds:si, es:di + .code16 +#define AX %ax +#define BX %bx +#define BP %bp +#define SI %si +#define DI %di +#else +// input esi=inStream, edi=outStream +// output outStream[], ds:esi, es:edi + .code32 +#define AX %eax +#define BX %ebx +#define BP %ebp +#define SI %esi +#define DI %edi +#endif + +MATCH_RUN_LEN = 7 +LITERALS_RUN_LEN = 3 +MIN_MATCH_SIZE = 2 +MIN_LITERALS_SIZE = 0 + +#define PACKED_ONLY // assume no copy block, optional +//#define PARANOIA // cover rare cases, optional + +lzsa2main: +#ifdef PARANOIA + cld +#endif +#ifndef RAW_FORMAT +# if defined(PARANOIA) && !defined(FLAT32) && !defined(FLAT16) + xorw %cx, %cx + call normalize +# endif +# ifndef NO_LZSA2_HEADER + lodsw + cmpw $0x9E7B, %ax // magic + jne lzsa2main + lodsb + testb $0x20, %al // lzsa2 + je lzsa2main +# endif +lzsa2block: // uncompress chunk +# if !defined(FLAT32) && !defined(FLAT16) + xorw %cx, %cx + call normalize +# endif + lodsw // block size + xchgw %ax, %cx + lodsb +# ifndef PACKED_ONLY + orb %al, %al + jns lzsa2compressed +# if !defined(FLAT32) && !defined(FLAT16OUT) + movw %cx, %dx + movb $0, %cl + movb $0, %dh +copytail: + call lzsa1movStr + xchg %dx, %cx + incw %cx + loop copytail +# else + movsb // copy block +copylp: + movsb // copy block + loop copylp // handle 64K case +# endif + jmp lzsa2block +lzsa2compressed: + jne lzsa2chunk // 64Kb block +# endif + jcxz lzsa2quit // bail if we hit EOD +# if !defined(FLAT16) + pushw %cx + xorw %cx, %cx + call normalize +# define NeedNormalize + popw %dx + addw %si, %dx +# else + movw %si, %dx + addw %cx, %dx +# endif +#else +# if !defined(FLAT16) + xorw %cx, %cx + call normalize +# define NeedNormalize +# endif +#endif + movb $0, %bh // no nibble stored +lzsa2chunk: // uncompress chunk + lodsb // get token XYZ|LL|MMM + movb %al, %bl // keep token in bl + movw $LITERALS_RUN_LEN+256*MIN_LITERALS_SIZE, %cx + shrb %cl, %al // shift literals length into place + call lzsa2len // %cl = LITERALS_RUN_LEN +#if defined(NeedNormalize) + pushw %bp + call lzsa2movLit // copy %cx literals from %ds:%si to %es:%di + popw %bp +#else + rep movsb // copy %cx literals from %ds:%si to %es:%di +#endif +#ifndef RAW_FORMAT +maxsi: + cmpw %dx, %si + jae lzsa2block // bail if we hit EOD +#endif +#ifdef FLAT32 + orl $-1, %eax // set offset bits 31-8 to 1 +#else + movb $-1, %ah // set offset bits 15-8 to 1 +#endif +// XYZ + testb $0xC0, %bl // check match offset mode in token (X bit) + bt $5, %bx // move bit 5 to carry + js rep_match_or_large_offset + jne offset_9_bit +// 00Z 5-bit offset: read a nibble for offset bits 1-4 and use the inverted bit Z of the token as bit 0 of the offset. +// set bits 5-15 of the offset to 1. + call getByteFromNibbleAndC + jmp get_match_length +offset_9_bit: +// 01Z 9-bit offset: read a byte for offset bits 0-7 and use the inverted bit Z for bit 8 of the offset. +// set bits 9-15 of the offset to 1. + sbbb %cl, %ah // clear bit 8 if Z bit is clear + jmp get_match_length_0 + +getNibble: + xorb $0xF0, %bh // toggle nibble stored flags + movb %bh, %al + jns gotnibble + lodsb + movb $0xF0, %bh + orb %al, %bh + shrb $4, %al +gotnibble: +lzsa2quit: + ret + +rep_match_or_large_offset: + jpe rep_match_or_16_bit +//10Z 13-bit offset: read a nibble for offset bits 9-12 and use the inverted bit Z for bit 8 of the offset, +// then read a byte for offset bits 0-7. set bits 13-15 of the offset to 1. +// substract 512 from the offset to get the final value. + call getByteFromNibbleAndC + subb $2, %al // substract 512 + jmp get_match_length_1 +rep_match_or_16_bit: + jc repeat_match // rep-match +//110 16-bit offset: read a byte for offset bits 8-15, then another byte for offset bits 0-7. + lodsb // Get 2-byte match offset +get_match_length_1: + xchgb %al, %ah +get_match_length_0: + lodsb // load match offset bits 0-7 +get_match_length: + xchgw %ax, %bp // bp: offset +repeat_match: +//111 repeat offset: reuse the offset value of the previous match command. + + movb %bl, %al // %al: original token + movw $MATCH_RUN_LEN+256*MIN_MATCH_SIZE, %cx + call lzsa2len +#ifdef RAW_FORMAT + jz lzsa2quit // bail if we hit EOD +#endif +#if !defined(FLAT32) && !defined(FLAT16OUT) + pushw %ds + pushw %si + movw %di, %si + addw %bp, %si + movw %es, %ax + jc axok + subb $0x10, %ah +axok: +.macro norm reg + movw %si, \reg + subw %si, %dx + andw $0xF, %si + addw %si, %dx + shrw $4, \reg + addw \reg, %ax + movw %ax, %ds + movw %di, \reg + andw $0xF, %di + shrw $4, \reg + movw %es, %ax + addw \reg, %ax + movw %ax, %es +.endm + pushw %bp + pushw %dx +# if defined(NeedNormalize) || defined(PARANOIA) + call lzsa2movStr // copy string +# else + norm %bp + rep movsb +# endif + popw %dx + popw %bp + popw %si + popw %ds +#else + xchg AX, SI // save %si + lea (BP,DI), SI + rep movsb %es:(SI), %es:(DI) + xchg AX, SI // restore %si +#endif + jmp lzsa2chunk + +getByteFromNibbleAndC: + pushfw + call getNibble // get nibble for offset bits 0-3 + popfw + rclb $1, %al + xorb $0xE1, %al // set offset bits 7-5 to 1 + ret + +lzsa2len: // get length in %cx + andb %cl, %al + cbw // clear %ah + cmpb %al, %cl + jne lzsa2minNumber // S=0-2, L=0-6 + call getNibble + cmp $0xF, %al + jne lzsa2noExtraByte + addb %al, %ch + lodsb +lzsa2noExtraByte: + addb %cl, %ch +lzsa2minNumber: + addb %ch, %al + jnc lzsa2gotNumber // 0-255 +#if 0 + je lzsa2BigNumber + movb %al, %ah // S=256-767, L=256-1791 + lodsb + .byte 0xB1 // mask lodsw with movb $0xAD, %cl +lzsa2BigNumber: +#endif + lodsw // 0-65535 +lzsa2gotNumber: + xchgw %ax, %cx + ret + +#if defined(NeedNormalize) || defined(PARANOIA) +# if defined(PARANOIA) +lzsa2movlp: + decw %ch + rep movsb + incw %ch +# endif +normalize: +lzsa2movLit: + movw %ds, %ax +lzsa2movStr: + norm %bp +# if defined(PARANOIA) + cmpb $0xFF, %ch // catch FFFX case + je lzsa2movlp +# endif + rep movsb + ret +#endif diff -r 9fdfc7625dd7 -r 7f7bd3c9775e plop/stuff/unpack.S --- a/plop/stuff/unpack.S Fri Jan 27 10:37:43 2023 +0100 +++ b/plop/stuff/unpack.S Sun Feb 05 09:28:51 2023 +0000 @@ -6,10 +6,11 @@ #define KEEP_BOOTSECTOR 1 #define LINUX_HEADER 0 #define UPDATE_SYSSIZE 1 -#define HARDCODED_SYSSIZE 1 -#define HARDCODED_SETUPSIZE 1 #define FLAT16 1 #define FLAT16OUT 1 +#define COPYTOHIGHMEM 0 +#define UPDATE_CODE32_START 0 +#define DOUBLE_PACKED 0 #define SAVEREGS 0 #define ELKS 0 @@ -21,12 +22,10 @@ #undef UPDATE_SYSSIZE #define UPDATE_SYSSIZE 0 #endif -#if defined(FLAT16OUT) && FLAT16OUT == 0 -#undef FLAT16OUT -#endif #if ELKS .arch i8086 #define FLAT16 1 +#define KEEP_BOOTSECTOR 1 #define LINUX_HEADER 0 #define SAVEREGS 0 #define TOPSEG 0x2000 @@ -34,6 +33,58 @@ #define TOPSEG 0x8000 #endif +.macro pusham +#if ELKS + pushw %ax +// movw %sp, %ax +// incw %ax // emulate popa behaviour +// incw %ax + pushw %cx + pushw %dx + pushw %bx +// pushw %ax // %sp + pushw %bp + pushw %si + pushw %di +#else + pushaw +#endif +.endm + +.macro popam +#if ELKS + popw %di + popw %si + popw %bp +// popw %ax + popw %bx + popw %dx + popw %cx + popw %ax +#else + popaw +#endif +.endm + +.macro pushm val +#if ELKS + movw \val, %ax + pushw %ax +#else + pushw \val +#endif +.endm + +.macro shrwm cnt, reg +#if ELKS + .rept \cnt + shrw $1, \reg + .endr +#else + shrw $\cnt, \reg +#endif +.endm + .globl _start _start: #if LINUX_HEADER @@ -56,156 +107,82 @@ pushfw pushw %cs pushw $0 - pushal + pusham + xorw %si, %si pushw %ds + pushw %es cld #else - pushw %cs -# if FLAT16 - xorw %di, %di - pushw %di -# else - pushw $0 + pushw %cs // return adress is %cs:0 + xorw %si, %si + pushw %si +#endif // SAVEREGS + pushw %ds // bootsector+setup segment +#if FLAT16 +# 1- move 9000..9020+stp -> TOPSEG + pushm $TOPSEG + popw %es +# if SAVEREGS +setup_word: + movw $SETUP*256+256, %cx + pushw %cx // bootsector+setup words # endif -#endif -#if ELKS - movw $0x100, %ax - pushw %ax -#else -# if UPDATE_SYSSIZE || KEEP_BOOTSECTOR - pushw %ds // -# else - pushw %cs // -# endif -#endif -#if FLAT16 -# 1- move 9000/9020..9020+stp -> TOPSEG -#if ELKS - movb $TOPSEG/256, %ah - movw %ax, %es -#else - pushw $TOPSEG - popw %es -#endif -#if KEEP_BOOTSECTOR - xorw %si, %si -#else - movw $0x200, %si -#endif -#if SAVEREGS == 0 + pushw %es // TOPSEG pushw %es -#if ELKS -# if KEEP_BOOTSECTOR - movw $cont+0x200, %ax -# else - movw $cont, %ax -# endif - pushw %ax -#else -# if KEEP_BOOTSECTOR - pushw $cont+0x200 -# else - // pushw $cont - .byte 0x6A, cont -# endif -#endif - jmp jumpinto -#else -# if HARDCODED_SETUPSIZE -setup_word: -# if KEEP_BOOTSECTOR -# else - movw $SETUP*256, %cx -# endif -# else -# if KEEP_BOOTSECTOR - movw $0x100, %cx - addb SETUPSIZE, %ch -# else - xorw %cx, %cx - movb SETUPSIZE, %ch -# endif - movw %cx, %dx -# endif - pushw %cx // - pushw %es - pushw %di +# if SAVEREGS + xorw %di, %di // %ds:%si = 9000:0000 %es:%di = TOPSEG:0 + pushm $0x200+cont rep movsw lret -#endif cont: +# else + movw $-0x200, %di + call jumpinto +# endif # 2- move 1000..1000+sys -> TOPSEG+stp -#if ELKS - movw $0x1000, %ax - movw %ax, %ds -#else - pushw $0x1000 + pushm $0x1000 popw %ds -#endif - xorw %si, %si - subw %di, %cx + xorw %si, %si // %ds:%si = 1000:0 + subw %di, %cx // %cx = 64K - setupsz rep movsb # 3- unlz(TOPSEG+stp:end, 1000-stp:0) - pushw %es // -# if HARDCODED_SETUPSIZE setup_seg: -#if ELKS -# if KEEP_BOOTSECTOR -# if UPDATE_SYSSIZE - movw $0x1000-(SETUP*32)-32-32, %ax -# else - movw $0x1000-(SETUP*32)-32, %ax -# endif -# else -# if UPDATE_SYSSIZE - movw $0x1000-(SETUP*32)-32, %ax -# else - movw $0x1000-(SETUP*32), %ax -# endif -# endif - movw %ax, %es -#else -# if KEEP_BOOTSECTOR -# if UPDATE_SYSSIZE - pushw $0x1000-(SETUP*32)-32-32 -# else - pushw $0x1000-(SETUP*32)-32 -# endif -# else -# if UPDATE_SYSSIZE - pushw $0x1000-(SETUP*32)-32 -# else - pushw $0x1000-(SETUP*32) -# endif -# endif + pushm $0x1000-(SETUP*32)-32 popw %es -#endif +#else // FLAT16 +# 1- move 9020..9020+unpack -> 0700 and jump into + movw $0x700, %cx // Up to 3.5KB for unpacker (unlzma is << 1KB) + movw %cx, %es // Use 7000 .. 7E00, keep up to 23 elks setup sectors + pushw %es + xorw %di, %di // %ds:%si = 9000:0000 %es:%di = 0700:0000 + pushm $0x200+cont +# if SAVEREGS + rep + movsw + lret # else -# if UPDATE_SYSSIZE - incb %dh -# endif -#if ELKS - shrw $1, %dx - shrw $1, %dx - shrw $1, %dx -#else - shrw $3, %dx -#endif - movw %ds, %ax - subw %dx, %ax - movw %ax, %es + jmp jumpinto # endif -#else // FLAT16 -# 1- move 1000..1000+sys -> 9000-sys -# if HARDCODED_SYSSIZE +cont: +# 2- move 9020..9020+stp -> 9000-sys-stp + movw %ds, %dx +setup_byte: + movb $SETUP+1, %ch +setup_para: + subw $SETUP*32+32+0xF000, %dx packed_syssize: - movw $0x1000+0, %ax -# else - movw SYSSIZE, %ax - addw $0x1000, %ax -# endif + movw $0+0x1000, %ax + pushw %cx // bootsector+setup words + subw %ax, %dx + movw %dx, %es + pushw %es // 9000-sys-stp + xorw %si, %si + xorw %di, %di // %ds:%si = 9000:0 %es:%di = 9000-sys-stp:0 + rep + movsw +# 3- move 1000..1000+sys -> 9000-sys movw %ds, %dx mvsys: decw %ax @@ -219,136 +196,109 @@ movsw cmpw $0x1000, %ax jne mvsys -# 2- move 9000/9020..9020+stp -> 9000-sys-stp - -# if HARDCODED_SETUPSIZE -# if KEEP_BOOTSECTOR -setup_byte: - movb $SETUP+1, %ch -setup_para: - subw $SETUP*32+32, %dx -# else -setup_byte: - movb $SETUP, %ch -setup_para: - subw $SETUP*32, %dx -# endif -# else - movb %ss:SETUPSIZE, %ch -# if KEEP_BOOTSECTOR - incb $ch -# endif - movw %cx, %ax -#if ELKS - shrw $1, %ax - shrw $1, %ax - shrw $1, %ax -#else - shrw $3, %ax -#endif - subw %ax, %dx -# endif - pushw %cx // - movw %dx, %es - xorw %si, %si - xorw %di, %di - rep - movsw %cs:(%si),%es:(%di) - pushw %es -# 3- reloc itself in 0x7C00 - pushw $0x07C0 +# 4- unlz(9000-sys-stp:end, 1000-stp:0) +setup_seg: + pushm $0x1000-(SETUP*32)-32 popw %es - movw $cont, %si - movw %si, %di - movw $end-_start, %cx - pushw %es - pushw %di - rep - movsb %cs:(%si),%es:(%di) - lret -cont: -# 4- unlz(9000-sys-stp:end, 1000-stp:0) -# if HARDCODED_SETUPSIZE -setup_seg: -# if KEEP_BOOTSECTOR -# if UPDATE_SYSSIZE - pushw $0x1000-(SETUP*32)-32-32 -# else - pushw $0x1000-(SETUP*32)-32 -# endif -# else -# if UPDATE_SYSSIZE - pushw $0x1000-(SETUP*32)-32 -# else - pushw $0x1000-(SETUP*32) -# endif -# endif - popw %es -# else - negw %ax -# if UPDATE_SYSSIZE - addw $0x1000-32, %ax -# else - addw $0x1000, %ax -# endif - movw %ax, %es -# endif #endif // FLAT16 popw %ds // +#if FLAT16 && SAVEREGS == 0 + movw $end-_start, %si // %ds:%si = TOPSSEG:compressed +#else + movw $0x200+end-_start, %si // %ds:%si = 9000-sys-stp:compressed +#endif #if KEEP_BOOTSECTOR - movw $0x200+end-_start, %si +setup_keep: + xorw %di, %di #else - movw $end-_start, %si +# if UPDATE_SYSSIZE +setup_syssize: + movw $0x1F4, %di // %es:%di = 1000-setup-bootsector:SYSSIZE +# else + movw $0x200, %di +# endif #endif -#if UPDATE_SYSSIZE - movw $SYSSIZE, %di -#else - xorw %di, %di -#endif + pushw %di + pushw %es +#if DOUBLE_PACKED +double_packed: + pushm $0x4000 + popw %es pushw %di pushw %es call unpack popw %ds popw %si -# if KEEP_BOOTSECTOR -setup_keep: - xorw %di, %di -# else + popw %es + popw %di + pushw %di + pushw %es +#endif + call unpack +#if COPYTOHIGHMEM +# if FLAT16OUT + movw $0x9310+1, %ax // from 1000:FFFF +# else +# if 0 + movw %es, %ax + shrw $12, %ax + orw $0x9310, %ax +# else + movw $0x9310+7, %ax // from 7000:FFFF +# endif +# endif + pushw %ss + popw %es + movw $8, %cx +zero1: + pushw $0 // 2E..20 + loop zero1 +src: + pushw %cx // 1E, 16 + pushw %ax // 1A: dst %ax:%cx, 12: src %ax:%cx + pushw %cx + pushw $-1 // 18, 10: full 64K segment + subb $0x10, %al + jnc src + movb $8, %cl +zero2: + pushw $0 // 0E..00 + loop zero2 + movw %sp, %si +syslp: + movb $0x80, %ch + movb $0x87, %ah + int $0x15 +# if FLAT16OUT == 0 + decb %es:0x1C(%si) + decb %es:0x14(%si) + jne syslp // down to 1000:0000 +# endif + addw $0x30, %sp +#endif // COPYTOHIGHMEM + popw %ds + popw %si // %ds:%si = 1000-setup-bootsector:SYSSIZE / 0 +#if UPDATE_CODE32_START +update_code32_start: +// movb $1, 0x216 +#endif +#if FLAT16 == 0 || SAVEREGS + popw %cx // bootsector+setup words +#endif + popw %es // bootsector+setup segment movw %si, %di -# endif -# if SAVEREGS != 0 - popw %cx // -#if UPDATE_SYSSIZE -// not need with memtest movb $(512-SYSSIZE)/2, %cl +jumpinto: +#if FLAT16 && SAVEREGS == 0 +setup_word: + movw $SETUP*256+256, %cx #endif - popw %es // -# 5- move 1000-stp..1000 -> 9020 -# else - popw %es // -jumpinto: -# if HARDCODED_SETUPSIZE -setup_word: -# if KEEP_BOOTSECTOR - movw $SETUP*256+256, %cx -# else - movw $SETUP*256, %cx -# endif -# else -# if KEEP_BOOTSECTOR - movw $0x100, %cx - addb %ss:SETUPSIZE, %ch -# else - xorw %cx, %cx - movb %ss:SETUPSIZE, %ch -# endif - movw %cx, %dx -# endif -# endif +# 5- move 1000-stp..1000 -> 9000 rep movsw #if SAVEREGS + popw %es popw %ds - popal + popam iret #else lret @@ -356,9 +306,18 @@ unpack: #define NO_LZMA_HEADER +#define NO_LZSA2_HEADER +#define NO_LZSA1_HEADER +#define NO_LZ4_HEADER #if ELKS #define ONLY8086 1 #endif -#include "unlzma.S" +#if defined(FLAT16OUT) && FLAT16OUT == 0 +#undef FLAT16OUT +#endif +#if defined(FLAT16) && FLAT16 == 0 +#undef FLAT16 +#endif +#include "uncompress.S" end: diff -r 9fdfc7625dd7 -r 7f7bd3c9775e polkit-pam/receipt --- a/polkit-pam/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/polkit-pam/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,8 +8,8 @@ LICENSE="LGPL2" SOURCE="polkit" TARBALL="$SOURCE-$VERSION.tar.gz" -WEB_SITE="http://www.freedesktop.org/wiki/Software/PolicyKit" -WGET_URL="http://hal.freedesktop.org/releases/$TARBALL" +WEB_SITE="https://www.freedesktop.org/wiki/Software/PolicyKit" +WGET_URL="https://hal.freedesktop.org/releases/$TARBALL" PROVIDE="polkit" DEPENDS="glib libgio gobject-introspection dbus dbus-glib expat pam" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e unixODBC-dev/receipt --- a/unixODBC-dev/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/unixODBC-dev/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -6,7 +6,7 @@ SHORT_DESC="ODBC for unix - development files." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="LGPL2.1" -WEB_SITE="http://www.unixodbc.org/" +WEB_SITE="https://www.unixodbc.org/" DEPENDS="unixODBC" WANTED="unixODBC" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e unixODBC/receipt --- a/unixODBC/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/unixODBC/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -7,7 +7,7 @@ SHORT_DESC="ODBC for unix." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="LGPL2.1" -WEB_SITE="http://www.unixodbc.org/" +WEB_SITE="https://www.unixodbc.org/" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="${WEB_SITE}$TARBALL" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e vpnc-cert/receipt --- a/vpnc-cert/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/vpnc-cert/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -9,7 +9,7 @@ LICENSE="GPL2" TARBALL="$SOURCE-$VERSION.tar.gz" WEB_SITE="https://github.com/streambinder/vpnc" -WGET_URL="https://www.unix-ag.uni-kl.de/~massar/vpnc/$TARBALL" +WGET_URL="https://raw.githubusercontent.com/sailfishos/vpnc/master/$TARBALL" CONFIG_FILES="/etc/vpnc" TAGS="vpn tunnel" PROVIDE="vpnc" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e vpnc/receipt --- a/vpnc/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/vpnc/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,7 +8,7 @@ LICENSE="GPL2" TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="https://github.com/streambinder/vpnc" -WGET_URL="https://www.unix-ag.uni-kl.de/~massar/vpnc/$TARBALL" +WGET_URL="https://raw.githubusercontent.com/sailfishos/vpnc/master/$TARBALL" CONFIG_FILES="/etc/vpnc" TAGS="vpn tunnel" diff -r 9fdfc7625dd7 -r 7f7bd3c9775e zonecheck/receipt --- a/zonecheck/receipt Fri Jan 27 10:37:43 2023 +0100 +++ b/zonecheck/receipt Sun Feb 05 09:28:51 2023 +0000 @@ -8,7 +8,7 @@ LICENSE="GPL3" WEB_SITE="https://www.zonemaster.fr/" TARBALL="$PACKAGE-$VERSION.tgz" -WGET_URL="$WEB_SITE/download/$TARBALL" +WGET_URL="https://github.com/sdelafond/zonecheck/archive/refs/tags/upstream/$VERSION.tar.gz" CONFIG_FILES="/etc/zonecheck" DEPENDS="ruby"