wok rev 19870

linld: fix progname
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 30 15:54:03 2017 +0200 (2017-03-30)
parents d3e38f335527
children 7144509c7473
files fail2ban/stuff/etc/init.d/fail2ban linld/receipt linld/stuff/src/CRTL.ASM linld/stuff/upx.sh syslinux/stuff/iso2exe/Makefile syslinux/stuff/iso2exe/bootiso.S syslinux/stuff/iso2exe/iso2exe.sh syslinux/stuff/iso2exe/upx.sh
line diff
     1.1 --- a/fail2ban/stuff/etc/init.d/fail2ban	Thu Mar 30 06:57:56 2017 +0100
     1.2 +++ b/fail2ban/stuff/etc/init.d/fail2ban	Thu Mar 30 15:54:03 2017 +0200
     1.3 @@ -21,7 +21,7 @@
     1.4      fi
     1.5      action 'Starting %s: %s...' "$DESC" $NAME
     1.6      rm -f $SOCKET
     1.7 -    $DAEMON start >/dev/null
     1.8 +    $DAEMON -x start >/dev/null
     1.9      status
    1.10      ;;
    1.11    stop)
     2.1 --- a/linld/receipt	Thu Mar 30 06:57:56 2017 +0100
     2.2 +++ b/linld/receipt	Thu Mar 30 15:54:03 2017 +0200
     2.3 @@ -37,8 +37,8 @@
     2.4  	cp TAZBOOT/TAZBOOT.COM tazboot.com
     2.5  	objdump -D -b binary -mi386 -Maddr16,data16 --adjust-vma=0x100 \
     2.6  		linld.com > linld.lst
     2.7 -	sh $stuff/upx.sh linld.com
     2.8 -	sh $stuff/upx.sh tazboot.com
     2.9 +	upx -5 --8086 linld.com
    2.10 +	upx -5 --8086 tazboot.com
    2.11  	cc -o tobzimage.o -Wa,-algms=tobzimage.lst -c $stuff/tobzimage.S
    2.12  	objcopy -O binary tobzimage.o tobzimage.bin
    2.13  	cp $stuff/tobzimage .
     3.1 --- a/linld/stuff/src/CRTL.ASM	Thu Mar 30 06:57:56 2017 +0100
     3.2 +++ b/linld/stuff/src/CRTL.ASM	Thu Mar 30 15:54:03 2017 +0200
     3.3 @@ -1343,35 +1343,33 @@
     3.4  		mov	ah,30h
     3.5  		int	21h
     3.6  		cmp	al,3
     3.7 +		mov	ax,0
     3.8  		jb	@@skip
     3.9  		xor	di,di
    3.10  		mov	es,[cs:2Ch]
    3.11  		mov	cx,-1
    3.12  		mov	ax,di
    3.13 -@@loop1:
    3.14 +@@loop:
    3.15  		repne
    3.16  		  scasb
    3.17  		scasb
    3.18 -		jne	@@loop1
    3.19 -		lea	si,[di+2]
    3.20 -		mov	bx, si
    3.21 -		call	strlen
    3.22 -		xchg	ax,cx
    3.23 -		inc	cx
    3.24 -		call	malloc_or_die
    3.25 -		xchg	ax,di
    3.26 -		push	ds
    3.27 +		jne	@@loop
    3.28 +		inc	di
    3.29 +		inc	di
    3.30 +		mov	si,di			; progname @es:di
    3.31 +		repne
    3.32 +		  scasb
    3.33 +		mov	cx,di
    3.34 +		sub	cx,si
    3.35 +		call	malloc_or_die		; keep cx
    3.36 +		mov	di,ax
    3.37  		push	ds
    3.38  		push	es
    3.39  		pop	ds
    3.40  		pop	es
    3.41 -		push	di
    3.42 -@@loop2:
    3.43 -		lodsb
    3.44 -		stosb
    3.45 -		or	al,al
    3.46 -		jnz	@@loop2
    3.47 -		pop	ax
    3.48 +		rep
    3.49 +		  movsb
    3.50 +		push	es
    3.51  		pop	ds
    3.52  @@skip:
    3.53  		pop	es di si
     4.1 --- a/linld/stuff/upx.sh	Thu Mar 30 06:57:56 2017 +0100
     4.2 +++ b/linld/stuff/upx.sh	Thu Mar 30 15:54:03 2017 +0200
     4.3 @@ -4,7 +4,7 @@
     4.4  o=$(($(stat -c %s $1) - 15))
     4.5  if dd bs=1 skip=$o if=$1 count=15 2> /dev/null | hd | \
     4.6     grep -iq     "2c e8 3c 01 77 f9 c1 04  08 29 34 ad e2 f1 c3"; then
     4.7 -	echo "0  3C E8 75 FB 89 F7 AD 86  E0 29 F8 AB |" | hexdump -R | \
     4.8 +	echo "0  3C E8 75 FB 37 91 D3 04  91 |" | hexdump -R | \
     4.9  	dd bs=1 seek=$o of=$1 conv=notrunc 2> /dev/null
    4.10  else
    4.11  	upx -d $1 > /dev/null 2>&1
     5.1 --- a/syslinux/stuff/iso2exe/Makefile	Thu Mar 30 06:57:56 2017 +0100
     5.2 +++ b/syslinux/stuff/iso2exe/Makefile	Thu Mar 30 15:54:03 2017 +0200
     5.3 @@ -30,7 +30,7 @@
     5.4  	./iso2exe.sh --array ../mbr/isohdpfx.bin > $@
     5.5  
     5.6  iso2exe.com: iso2exe.c iso2exe.h
     5.7 -	$(BCC) $(BCCFLAGS) -o $@ iso2exe.c && ./upx.sh $@
     5.8 +	$(BCC) $(BCCFLAGS) -o $@ iso2exe.c && upx -5 --8086 $@
     5.9  
    5.10  iso2exe.exe: iso2exe.c iso2exe.h isohybrid.res
    5.11  	i586-pc-mingw32-gcc -Os -s -o $@ iso2exe.c isohybrid.res -lws2_32
     6.1 --- a/syslinux/stuff/iso2exe/bootiso.S	Thu Mar 30 06:57:56 2017 +0100
     6.2 +++ b/syslinux/stuff/iso2exe/bootiso.S	Thu Mar 30 15:54:03 2017 +0200
     6.3 @@ -177,7 +177,7 @@
     6.4  	ret
     6.5  	.org	0x7E00
     6.6  
     6.7 -	.org	0x7F85
     6.8 +	.org	0x7F83
     6.9  ////////////////////////////// DOS EXE code ///////////////////////////////////
    6.10  
    6.11  exestart:
    6.12 @@ -203,24 +203,24 @@
    6.13  tst386:
    6.14  	pushw	%sp
    6.15  	popw	%ax
    6.16 -	subw	%sp, %ax
    6.17 +	xorw	%sp, %ax		// clear C
    6.18 +	movb	$EXESTR(vm86modemsg), %al
    6.19  	jnz	is86			// 86/186 not a 286+
    6.20  	.arch	i486
    6.21  is386:
    6.22 -	smsww	%ax			// not privileged
    6.23 -	andb	$1, %al
    6.24 -	movb	$EXESTR(vm86modemsg), %al
    6.25 +	smsww	%bx			// not privileged
    6.26 +	andb	$1, %bl			// clear C
    6.27  	jne	isvm86
    6.28 -	movl	%cr0, %eax		// privileged
    6.29 -	incl	%eax
    6.30 +	movl	%cr0, %ebx		// privileged
    6.31 +	incl	%ebx
    6.32  	.arch	i8086
    6.33  	movb	$EXESTR(rmPaging), %al
    6.34  	js	abort
    6.35 -	inc	%ax
    6.36 +is86:
    6.37 +	incw	%ax
    6.38  	//movb	$EXESTR(realmodemsg), %al
    6.39  isvm86:
    6.40  	call	goputs
    6.41 -is86:
    6.42  	movw	comstart-end_header(%di), %si		// .com address
    6.43  	pushw	%di
    6.44  	movb	$0x7C/2, %ch		// 31K-31.5K, > com length
    6.45 @@ -230,6 +230,7 @@
    6.46  
    6.47  vm86modemsg:
    6.48  // --------------- Must be in 7F40 7FFF range ------------------------
    6.49 +	.ascii	"V"			// V86 mode
    6.50  	.ascii	"86"			// 86 mode
    6.51  	.byte	EXESTR(mode)
    6.52  rmPaging:
     7.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh	Thu Mar 30 06:57:56 2017 +0100
     7.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh	Thu Mar 30 15:54:03 2017 +0200
     7.3 @@ -49,7 +49,7 @@
     7.4  	TMP=/tmp/bootiso$$
     7.5  	$0 --get bootiso.bin > $TMP 2> /dev/null 
     7.6  	OFS=$(($(get 20 $TMP) - 0xC0))
     7.7 -	printf "Adding DOS/EXE stub at %04X (%d bytes) ...\n" $OFS $((0x8000 - $OFS))
     7.8 +	printf "Adding DOS/EXE stub at %04X (%d bytes) ...\n" $OFS $((0x7FF0 - $OFS))
     7.9  	ddq if=$TMP bs=1 skip=$OFS of=$1 seek=$OFS conv=notrunc
    7.10  	rm -f $TMP
    7.11  }
    7.12 @@ -172,7 +172,7 @@
    7.13  	rootfs.gz)	SIZE=$(get 24 "$ISO"); OFFSET=$(($stub - $SIZE));;
    7.14  	tazboot.com)	OFFSET=$(($(get 64 "$ISO") - 0xC0))
    7.15  			SIZE=$(($stub - $(get 24 "$ISO") - $OFFSET));;
    7.16 -	dosstub)	OFFSET=$stub; SIZE=$((0x8000 - $OFFSET));;
    7.17 +	dosstub)	OFFSET=$stub; SIZE=$((0x7FF0 - $OFFSET));;
    7.18  	boot.md5)	OFFSET=$((0x7FF0)); SIZE=16;;
    7.19  	fs.iso)		OFFSET=$((0x8000))
    7.20  			SIZE=$((2048*$c - $OFFSET));;
     8.1 --- a/syslinux/stuff/iso2exe/upx.sh	Thu Mar 30 06:57:56 2017 +0100
     8.2 +++ b/syslinux/stuff/iso2exe/upx.sh	Thu Mar 30 15:54:03 2017 +0200
     8.3 @@ -4,7 +4,7 @@
     8.4  o=$(($(stat -c %s $1) - 15))
     8.5  if dd bs=1 skip=$o if=$1 count=15 2> /dev/null | hd | \
     8.6     grep -iq     "2c e8 3c 01 77 f9 c1 04  08 29 34 ad e2 f1 c3"; then
     8.7 -	echo "0  3C E8 75 FB 89 F7 AD 86  E0 29 F8 AB |" | hexdump -R | \
     8.8 +	echo "0  3C E8 75 FB 37 91 D3 04  91 |" | hexdump -R | \
     8.9  	dd bs=1 seek=$o of=$1 conv=notrunc 2> /dev/null
    8.10  else
    8.11  	upx -d $1 > /dev/null 2>&1