wok-current rev 19428

syslinux/isohybrid: random uuid in gpt
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 01 10:31:58 2016 +0200 (2016-10-01)
parents 15ddac901768
children 5ba4b4fd03bc
files syslinux-extra/receipt syslinux-modules/receipt syslinux/stuff/iso2exe/bootiso.S syslinux/stuff/tools/isohybrid.sh
line diff
     1.1 --- a/syslinux-extra/receipt	Sat Oct 01 09:40:12 2016 +0300
     1.2 +++ b/syslinux-extra/receipt	Sat Oct 01 10:31:58 2016 +0200
     1.3 @@ -20,9 +20,9 @@
     1.4      cp -a $src/mbr/mbr.bin $fs/usr/share/boot
     1.5      cp -a $src/mbr/gptmbr.bin $fs/usr/share/boot
     1.6      lzma e $src/core/pxelinux.0 $fs/usr/share/boot/pxelinux.0.lzma 2> /dev/null
     1.7 -    #lzma e $src/com32/menu/vesamenu.c32 $fs/usr/share/boot/vesamenu.c32.lzma
     1.8 -    #lzma e $src/com32/modules/mboot.c32 $fs/usr/share/boot/mboot.c32.lzma
     1.9 -    cp $src/com32/modules/sdi.c32 $fs/usr/share/boot/
    1.10 +    #lzma e $src/com32/menu/vesamenu.c32 $fs/usr/share/boot/vesamenu.c32
    1.11 +    #lzma e $src/com32/modules/mboot.c32 $fs/usr/share/boot/mboot.c32
    1.12 +    lzma e $src/com32/modules/sdi.c32 $fs/usr/share/boot/sdi.c32
    1.13      cp -a $src/linux/syslinux-nomtools $fs/bin/syslinux
    1.14      cp -a $src/extlinux/extlinux $fs/bin
    1.15      cp -a $src/isohybrid.sh $fs/usr/bin/isohybrid
     2.1 --- a/syslinux-modules/receipt	Sat Oct 01 09:40:12 2016 +0300
     2.2 +++ b/syslinux-modules/receipt	Sat Oct 01 10:31:58 2016 +0200
     2.3 @@ -18,7 +18,7 @@
     2.4  	case "$i" in
     2.5  	*/reboot.c32|*/ifmem.c32|*/vesamenu.c32) continue;;
     2.6  	esac
     2.7 -	lzma e $i $fs/usr/share/boot/$(basename $i).lzma 2> /dev/null
     2.8 +	lzma e $i $fs/usr/share/boot/$(basename $i) 2> /dev/null
     2.9      done
    2.10      for i in $src/modules/*.com ; do
    2.11  	case "$i" in
     3.1 --- a/syslinux/stuff/iso2exe/bootiso.S	Sat Oct 01 09:40:12 2016 +0300
     3.2 +++ b/syslinux/stuff/iso2exe/bootiso.S	Sat Oct 01 10:31:58 2016 +0200
     3.3 @@ -123,6 +123,7 @@
     3.4  
     3.5  exestart:
     3.6  	cld
     3.7 +	movw	$EXEADRS(puts), %bp	
     3.8  	movw	129, %ax
     3.9  	cmpb	$0x2F, %al
    3.10  	je	ishelp
    3.11 @@ -137,8 +138,7 @@
    3.12  	movw	$0x1000+EXESTR(noDOS3), %ax
    3.13  	jc	tst386
    3.14  abort:
    3.15 -jputs:
    3.16 -	jmp	puts
    3.17 +	jmp	%bp
    3.18  
    3.19  tst386:
    3.20  	pushfw				// save flags
    3.21 @@ -166,7 +166,7 @@
    3.22  	inc	%ax
    3.23  	//movb	$EXESTR(realmodemsg), %al
    3.24  realmode:
    3.25 -	call	jputs
    3.26 +	call	%bp
    3.27  is86:
    3.28  	movw	comstart-end_header(%di), %si		// .com address
    3.29  	pushw	%di
    3.30 @@ -175,6 +175,20 @@
    3.31  	movsw
    3.32  	ret
    3.33  
    3.34 +CallVPCI:
    3.35 +	int	$0x67
    3.36 +	testb	%ah, %ah
    3.37 +	xchgw	%ax, %cx
    3.38 +	pusw	%si
    3.39 +ScanVCPI:
    3.40 +	popw	%si
    3.41 +ChkVCPI:
    3.42 +NoVCPI:
    3.43 +	movb	$EXESTR(ERRvcpi), %al
    3.44 +	jne	abort
    3.45 +	lodsb
    3.46 +	shlw	$8, %ax
    3.47 +	jne	CallVCPI
    3.48  VersionVCPI:
    3.49  	xchgw	%ax, %si		// movb	$EXESTR(vm86modemsg), %al
    3.50  	cmpb	$0x40, %cl		// EMM386 / VCPI 4.0 mini
    3.51 @@ -189,19 +203,8 @@
    3.52  	lodsw
    3.53  	popw	%ds
    3.54  	jne	NoVCPI
    3.55 -	xorw	$0x5858, %ax		// XX(X0)
    3.56 -	movw	$EXEADRS(CmdVCPI), %si
    3.57 -ChkVCPI:
    3.58 -NoVCPI:
    3.59 -	movb	$EXESTR(ERRvcpi), %al
    3.60 -	jne	abort
    3.61 -	lodsb
    3.62 -	shlw	$8, %ax
    3.63 -	je	VersionVCPI
    3.64 -	int	$0x67
    3.65 -	testb	%ah, %ah
    3.66 -	xchgw	%ax, %cx
    3.67 -	jmp	ChkVCPI
    3.68 +	xorb	$0x58, %al		// X(XX0)
    3.69 +	call	ScanVCPI
    3.70  CmdVCPI:
    3.71  	.byte	0x40			// status
    3.72  	.byte	0xDE			// vcpi present ?
     4.1 --- a/syslinux/stuff/tools/isohybrid.sh	Sat Oct 01 09:40:12 2016 +0300
     4.2 +++ b/syslinux/stuff/tools/isohybrid.sh	Sat Oct 01 10:31:58 2016 +0200
     4.3 @@ -202,12 +202,10 @@
     4.4  		store32 $((446+16+12)) $efi_len
     4.5  		uudecode <<EOT | unlzma | ddq bs=512 seek=1 of=$iso conv=notrunc
     4.6  begin-base64 644 -
     4.7 -XQAAgAD//////////wAikYVN1N2VY3JXMnUMJn1RCdQOHHdkT27O1I77zn8t
     4.8 -AiDDPDQv3ovn0t2ksyOkm/KVCwPcaMYXgukPNUeg8Tbavo+kXx/HVFkHHHB+
     4.9 -c4gUdeTmJ31kL/btVwMG38di4lFL7bpUU61H7P0wJfcUrv0LYsPoW28D5f8s
    4.10 -kaLvWB73gnnsIUYI9VNL4S9txwz2cCL67LZYGGAqMBdtdnp8Jv9qm36wvqJZ
    4.11 -Bne0qEprzeTBrUFK74YLSrVbxK/fa6rz5pQxkLvyOVz4VfRMsVEA1G9IjF//
    4.12 -BXwoAA==
    4.13 +XQAAgAD//////////wAikYVN1N2VY3JXMnUMJn1RCdQOHN33EegtIBhrUQ7Q
    4.14 +JNaW37NYVuUAmqtISPiCdgAxPRlBS0xDlmAPPOCSZXmEFz9jEkXSzmsGn6+o
    4.15 +7SMAKMfvpMa3U1bJv/napT+/NFttJSJSx0xJA3em3KJcZsO66vaYeJC5tE+3
    4.16 +T0p9AJtSH6X8SMic3vU3hYWwHsYnsmeoGmsy4EJba9Wf/0liMQA=
    4.17  ====
    4.18  EOT
    4.19  		lastlba=$((($cylinders * $heads * $sectors) -1))
    4.20 @@ -223,6 +221,10 @@
    4.21  		store32 $((0x210)) $(crc32 0x200 $(read32 0 $((0x20C))))
    4.22  		store32sw $((0x1008)) $(($efi_ofs/4))
    4.23  		store32sw $((0x1054)) $(($efi_len/4))
    4.24 +		for i in 238 410 490 ; do
    4.25 +			ddq if=/dev/urandom count=16 bs=1 conv=notrunc \
    4.26 +			    of=$iso seek=$((0x$i))
    4.27 +		done
    4.28  	fi
    4.29  }
    4.30