wok-current rev 15480

memtest: default setup size = 4
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 10 11:19:32 2013 +0000 (2013-11-10)
parents da9d337802a6
children 30ad8b058156
files memtest/stuff/bootloader.S memtest/stuff/pack
line diff
     1.1 --- a/memtest/stuff/bootloader.S	Sun Nov 10 10:36:42 2013 +0000
     1.2 +++ b/memtest/stuff/bootloader.S	Sun Nov 10 11:19:32 2013 +0000
     1.3 @@ -66,9 +66,6 @@
     1.4  	decw	%si
     1.5  	rep
     1.6  	  movsb
     1.7 -# if defined(HELP) || defined(CHECK_REALMODE)
     1.8 -	pushw	%cx		// dos exit (int $0x20)
     1.9 -# endif
    1.10  # ifdef HELP
    1.11  # define PUTS
    1.12  	movw	$EXEADRS(helpmsg), %si
    1.13 @@ -206,7 +203,7 @@
    1.14  	lodsb
    1.15  	orb	%al, %al
    1.16  	jne	putslp	
    1.17 -	ret
    1.18 +	int	$0x20			// dos exit
    1.19  #endif
    1.20  #ifdef EXE_SUPPORT
    1.21  movesys:
     2.1 --- a/memtest/stuff/pack	Sun Nov 10 10:36:42 2013 +0000
     2.2 +++ b/memtest/stuff/pack	Sun Nov 10 11:19:32 2013 +0000
     2.3 @@ -37,10 +37,11 @@
     2.4  	uudecode | gunzip >$2
     2.5  	dd if=$1 bs=1 skip=497 seek=497 count=15 of=$2 conv=notrunc
     2.6  	setup="$(echo $(od -j 497 -N 1 -dAn $1))"
     2.7 +	[ $setup -eq 0 ] && setup=4
     2.8  	syssize="$(echo $(od -j 500 -N 2 -dAn $1))"
     2.9 +	[ $syssize -eq 0 ] && syssize=$((($(stat -c %s $1) + 15 - 512*($setup + 1))/16))
    2.10  	store $syssize $2 XXXO
    2.11  	store $setup $2 XXXS 1
    2.12 -	[ $syssize -eq 0 ] && syssize=$((($(stat -c %s $1) + 15 - 512*($setup + 1))/16))
    2.13  	dd if=$1 bs=512 count=$setup skip=1 | compress >>$2
    2.14  	dd if=$1 bs=16 count=$syssize skip=$((32*(1+$setup))) | compress >>$2
    2.15  	size=$(stat -c %s $2)
    2.16 @@ -49,14 +50,13 @@
    2.17  	store 4 $2 497 1
    2.18  	store $((($size+511)/512)) $2 4
    2.19  	store $((($size+15)/16)) $2 14
    2.20 -	echo -en "$3" | dd conv=notrunc bs=1 seek=YYY of=$2 count=ZZZ
    2.21 +	echo -e "$3" | dd conv=notrunc bs=1 seek=YYY of=$2 count=ZZZ
    2.22  }
    2.23  
    2.24  HELP="$(unix2dos <<EOT
    2.25  Memtest86+ is an endless advanced memory diagnostic tool released under the
    2.26  terms of the Gnu Public License (GPL).
    2.27  
    2.28 -
    2.29  EOT
    2.30  )"
    2.31  main $1 ${2:-$1.packed} "${3:-$HELP}" 2>/dev/null <<EOT