wok rev 20056

syslinux: fixes from syslinux git
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 08 15:02:42 2017 +0200 (2017-09-08)
parents 12ba294405e5
children 4ff589aa999e
files syslinux/receipt syslinux/stuff/extra/fixes-4.07.u
line diff
     1.1 --- a/syslinux/receipt	Fri Sep 08 11:06:48 2017 +0200
     1.2 +++ b/syslinux/receipt	Fri Sep 08 15:02:42 2017 +0200
     1.3 @@ -21,11 +21,9 @@
     1.4  compile_rules()
     1.5  {
     1.6  	rm -f $src/core/isolinux.bin
     1.7 -	patch -p 0 < $stuff/extra/loadhigh.u
     1.8 -	patch -p 0 < $stuff/extra/iso9660.u
     1.9 -	patch -p 0 < $stuff/extra/readconfig.u
    1.10 -	patch -p 0 < $stuff/extra/keytab-lilo.u
    1.11 -	patch -p 0 < $stuff/extra/lzop-1.03-gcc6.u
    1.12 +	for i in loadhigh iso9660 readconfig keytab-lilo lzop-1.03-gcc6 fixes-4.07 ; do
    1.13 +		patch -p 0 < $stuff/extra/$i.u
    1.14 +	done
    1.15  	cp $stuff/tools/isohybrid.sh .
    1.16  	cp $stuff/extra/md5sum.c com32/modules
    1.17  	grep -q md5sum.c32 com32/modules/Makefile ||
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/syslinux/stuff/extra/fixes-4.07.u	Fri Sep 08 15:02:42 2017 +0200
     2.3 @@ -0,0 +1,63 @@
     2.4 +--- mbr/isohdpfx.S
     2.5 ++++ mbr/isohdpfx.S
     2.6 +@@ -167,20 +167,22 @@
     2.7 + 	   read_sector_cbios: movb $0x42, %ah ;  jmp read_common */
     2.8 + 	movl	$0xeb42b4+((read_common-read_sector_cbios-4) << 24), \
     2.9 + 		(read_sector_cbios)
    2.10 +-	jmp	1f
    2.11 ++	jmp	2f
    2.12 + 1:
    2.13 ++	xor	%cx, %cx	/* Clear EBIOS flag. */
    2.14 ++2:
    2.15 + 	popw	%dx
    2.16 + 	pushw	%cx		/* EBIOS flag */
    2.17 + 
    2.18 + 	/* Get (C)HS geometry */
    2.19 + 	movb	$0x08, %ah
    2.20 + 	int	$0x13
    2.21 +-	andw	$0x3f, %cx	/* Sector count */
    2.22 + 	popw	%bx		/* EBIOS flag */
    2.23 +-	pushw	%cx		/* -16: Save sectors on the stack */
    2.24 + 	movzbw	%dh, %ax	/* dh = max head */
    2.25 + 	incw	%ax		/* From 0-based max to count */
    2.26 +-	pushw	%ax		/* -18: Save heads on the stack */
    2.27 ++	pushw	%ax		/* -16: Save heads on the stack */
    2.28 ++	andw	$0x3f, %cx	/* Sector count */
    2.29 ++	pushw	%cx		/* -18: Save sectors on the stack */
    2.30 + 	mulw	%cx		/* Heads*sectors -> sectors per cylinder */
    2.31 + 
    2.32 + 	pushw	%bx		/* -20: EBIOS flag */
    2.33 +--- extlinux/main.c
    2.34 ++++ extlinux/main.c
    2.35 +@@ -1236,9 +1236,7 @@
    2.36 +     if (devfd < 0)
    2.37 + 	return 1;
    2.38 + 
    2.39 +-    if (opt.reset_adv)
    2.40 +-	syslinux_reset_adv(syslinux_adv);
    2.41 +-    else if (ext_read_adv(path, devfd, &filename) < 0) {
    2.42 ++    if (ext_read_adv(path, devfd, &filename) < 0) {
    2.43 + 	close(devfd);
    2.44 + 	return 1;
    2.45 +     }
    2.46 +--- core/isolinux.asm
    2.47 ++++ core/isolinux.asm
    2.48 +@@ -426,14 +426,17 @@
    2.49 + .ok:
    2.50 + 		xor bx,bx
    2.51 + 		push bp
    2.52 ++		push eax
    2.53 + 		call getlinsec
    2.54 ++		pop eax
    2.55 + 		pop cx
    2.56 +-		mov dx,cx
    2.57 ++		movzx edx,cx
    2.58 + 		pop bp
    2.59 + 		pop bx
    2.60 + 
    2.61 + 		shl cx,SECTOR_SHIFT - 4
    2.62 + 		add bx,cx
    2.63 ++		add eax,edx
    2.64 + 		sub bp,dx
    2.65 + 		jnz .more
    2.66 +