wok diff syslinux/stuff/iso2exe/bootiso.S @ rev 17492

syslinux/iso2exe: check ISO md5
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 03 21:41:48 2015 +0100 (2015-01-03)
parents 9a40226bee2e
children 26654c1a7ca7
line diff
     1.1 --- a/syslinux/stuff/iso2exe/bootiso.S	Thu Dec 18 22:19:24 2014 +0100
     1.2 +++ b/syslinux/stuff/iso2exe/bootiso.S	Sat Jan 03 21:41:48 2015 +0100
     1.3 @@ -90,9 +90,7 @@
     1.4  dxfound:
     1.5  	movw	%dx, 10(%bp)
     1.6  	call	checkboot
     1.7 -noboot:
     1.8  	.ascii	"No isolinux mbr."
     1.9 -noboot_end:
    1.10  
    1.11  	.org	0x0080
    1.12  ////////////////////////////// EXE/PE header //////////////////////////////////
    1.13 @@ -109,13 +107,12 @@
    1.14  	iret
    1.15  
    1.16  error:
    1.17 -	movw	$noboot_end-noboot, %cx
    1.18 -putsloop:
    1.19  	lodsb
    1.20  	movw	$7, %bx
    1.21  	movb	$0xE, %ah
    1.22  	int	$0x10
    1.23 -	loop	putsloop
    1.24 +	cmp	$'.', %al
    1.25 +	jne	error
    1.26  halt:
    1.27  	hlt
    1.28  	jmp	halt
    1.29 @@ -128,10 +125,13 @@
    1.30  	cld
    1.31  	movw	$0x100, %si
    1.32  	movw	-127(%si), %ax
    1.33 +	cmpb	$0x2F, %al
    1.34 +	je	ishelp
    1.35 +	cmpw	$0x2F20, %ax
    1.36 +ishelp:
    1.37 +	movw	$0x3000+EXESTR(help), %ax
    1.38  	cwd				// clear dx
    1.39  	pushw	%dx			// dos exit()
    1.40 -	cmpw	$0x2F20, %ax
    1.41 -	movw	$0x3000+EXESTR(help), %ax
    1.42  	je	abort
    1.43  	int	$0x21			// get DOS version
    1.44  	cmpb	$3, %al
    1.45 @@ -197,9 +197,9 @@
    1.46  	movw	$0x0100, %di
    1.47  	movw	comstart-end_header(%di), %si		// .com address
    1.48  	pushw	%di
    1.49 -	movb	$0x7D, %ch
    1.50 +	movb	$0x7C/2, %ch	// 31K-31.5K, > com length
    1.51  	rep
    1.52 -	movsb
    1.53 +	movsw
    1.54  moveret:
    1.55  	ret
    1.56  
    1.57 @@ -213,12 +213,13 @@
    1.58  	movw	%dx, %ds		// %dx = 0
    1.59  	movw	0x67*4+2, %ds
    1.60  	movw	$10, %si
    1.61 -	lodsl
    1.62 +	lodsw
    1.63  	xorw	$0x4D45, %ax		// EM(MX) or EM(MQ)
    1.64 -	lodsl
    1.65 +	lodsw
    1.66 +	lodsw
    1.67  	popw	%ds
    1.68  	jne	NoVCPI
    1.69 -	xorl	$0x30585858, %eax	// XXX0
    1.70 +	xorw	$0x5858, %ax		// XX(X0)
    1.71  	movw	$EXEADRS(CmdVCPI), %si
    1.72  ChkVCPI:
    1.73  NoVCPI:
    1.74 @@ -237,11 +238,10 @@
    1.75  	.byte	0x46			// version
    1.76  	.byte	0
    1.77  
    1.78 -// -------------------------------------------------------------------
    1.79 -
    1.80 -help:
    1.81 -	.ascii	"SliTaz GNU/L"		// SliTaz GNU/Linux boot loader
    1.82 -	.byte	EXESTR(iloader)
    1.83 +// --------------- Must be in 7F40 7FFF range ------------------------
    1.84 +//noloader:
    1.85 +//	.ascii	"No isol"		// No isolinux boot loader
    1.86 +//	.byte	EXESTR(iloader)
    1.87  no386:
    1.88  	.ascii	"No 386"		// No 386+
    1.89  	.byte	EXESTR(plus)
    1.90 @@ -258,20 +258,12 @@
    1.91  	.ascii	"Invalid: paging + "	// Invalid: paging + real mode.
    1.92  realmodemsg:
    1.93  	.ascii	"real"			// real mode.
    1.94 -// --------------- Must be in 00C0 013F range ------------------------
    1.95 +// --------------- Must be in 7FC0 7FFF range ------------------------
    1.96  mode:
    1.97  	.ascii	" mod"
    1.98  eeol:
    1.99  	.ascii  "e"
   1.100  	.byte	EXESTR(eol)
   1.101 -//noloader:
   1.102 -//	.ascii	"No isol"		// No isolinux boot loader
   1.103 -iloader:
   1.104 -	.ascii	"inux boot loader"
   1.105 -eol:
   1.106 -	.ascii	"."
   1.107 -eol2:
   1.108 -	.asciz	"\r\n"
   1.109  noDOS3:
   1.110  	.ascii	"No DOS 3"		// No DOS 3.0+
   1.111  dot0:
   1.112 @@ -279,6 +271,14 @@
   1.113  plus:
   1.114  	.ascii	"+"
   1.115  	.byte	EXESTR(eol2)
   1.116 +help:
   1.117 +	.ascii	"SliTaz GNU/L"		// SliTaz GNU/Linux boot loader
   1.118 +iloader:
   1.119 +	.ascii	"inux boot loader"
   1.120 +eol:
   1.121 +	.ascii	"."
   1.122 +eol2:
   1.123 +	.asciz	"\r\n"
   1.124  
   1.125  	.org	0x8000
   1.126  ////////////////////////// ISO9660 header /////////////////////////////////////