wok rev 24159

Up ventoy (1.0.62)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 20 10:05:11 2021 +0000 (2021-12-20)
parents 072e91636362
children 4f8f9f8879e3
files linld/receipt linld/stuff/src/_BEG.ASM ventoy/receipt ventoy/stuff/TazVentoyPlugson.sh
line diff
     1.1 --- a/linld/receipt	Sat Dec 11 19:18:13 2021 +0000
     1.2 +++ b/linld/receipt	Mon Dec 20 10:05:11 2021 +0000
     1.3 @@ -36,12 +36,13 @@
     1.4  EOT
     1.5  	SDL_VIDEODRIVER=dummy dosbox MAKE.BAT -exit -c "mount D $src" \
     1.6  		2>&1 | grep -v 'ALSA lib'
     1.7 +	dos2unix */*.[LM]*
     1.8  	grep '^Fatal[ :]' */LNK.LOG */CPP.LOG && return 1
     1.9 -	grep '*Fatal*' */*.LST && return 1
    1.10 +	grep '\*Fatal\*' */*.LST && return 1
    1.11  	grep '^Error[ :]' */LNK.LOG */CPP.LOG && return 1
    1.12 -	grep '*Error*' */*.LST && return 1
    1.13 +	grep '\*Error\*' */*.LST && return 1
    1.14  	grep '^Warning[ :]' */LNK.LOG */CPP.LOG
    1.15 -	grep '*Warning*' */*.LST
    1.16 +	grep '\*Warning\*' */*.LST
    1.17  	cp LINLD$SUFFIX/LINLD.COM linld.com
    1.18  	objdump -D -b binary -mi386 -Maddr16,data16 --adjust-vma=0x100 \
    1.19  		linld.com > linld.lst
     2.1 --- a/linld/stuff/src/_BEG.ASM	Sat Dec 11 19:18:13 2021 +0000
     2.2 +++ b/linld/stuff/src/_BEG.ASM	Mon Dec 20 10:05:11 2021 +0000
     2.3 @@ -139,18 +139,16 @@
     2.4  ;***************************************************************
     2.5  
     2.6  ; Check for oldies
     2.7 -		ifdef	NO386
     2.8  		ifdef	CPUTYPE
     2.9 -		mov	ax,100h
    2.10 -		mov	cl,32		; 186+ masks with 31
    2.11 -		shr	ax,cl
    2.12 -		endif
    2.13 +		mov	ax,bx
    2.14 +		mov	cl,32+7		; 186+ masks with 31
    2.15 +		shr	ah,cl
    2.16  		endif
    2.17  		push	bx		; < 286 : flags[12..15] are forced 1
    2.18  		popf			; = 286 : flags[12..15] are forced 0, cld, cli
    2.19  		pushf			; > 286 : only flags[15] is forced 0
    2.20  		pop	dx
    2.21 -		add	dh,bh		; 160:NS=386+, 0F0:NC=286, 1E0:NP=86/186
    2.22 +		add	dh,bh		; 160:NS=386+, 0F0:NC=286, 1E0:PO=86/186
    2.23  		ifndef	NO386
    2.24  		mov	bx,offset msg_badcpu
    2.25                  js	godie   	;it is not a 386+, die
    2.26 @@ -167,11 +165,11 @@
    2.27                  p386
    2.28  		ifdef	VCPI
    2.29                  mov     edx,cs
    2.30 -                shl     edx,4		; edx for prepare_vcpi (edx[31-20]=0)
    2.31 +                shl     edx,4		; edx for prepare_vcpi (edx[31-20]=0) [1]
    2.32  		else
    2.33   		 ifndef	LARGE_ZIMAGE
    2.34                  mov     edx,cs
    2.35 -                shl     edx,4		; edx for memcpy32 (edx[31-20]=0)
    2.36 +                shl     edx,4		; edx for memcpy32 (edx[31-20]=0) [1]
    2.37  		 endif
    2.38  		endif
    2.39  		ifndef	LARGE_ZIMAGE
    2.40 @@ -197,7 +195,7 @@
    2.41  		call	near die
    2.42  		else
    2.43  jmp_endcpu86:
    2.44 -		jmp	endcpu86	;386+ rm will fake 186
    2.45 +		jmp	endcpu86	;386+ rm will fake 186+
    2.46  		endif
    2.47  
    2.48  
    2.49 @@ -209,10 +207,8 @@
    2.50  		ifdef	VCPI
    2.51  ; Check whether it is safe to call 67h
    2.52  		xor	eax,eax
    2.53 -		push	ds
    2.54 -                mov     ds,ax
    2.55 -                cmp     [dword 67h*4],eax
    2.56 -		pop	ds
    2.57 +                mov     es,ax
    2.58 +                cmp     [dword es:67h*4],eax
    2.59                  je      no_vcpi
    2.60                  mov     ah,0DEh		; check for vcpi present
    2.61                  int     67h
    2.62 @@ -251,27 +247,27 @@
    2.63  		pushfd
    2.64  		pop	dx
    2.65  		pop	dx
    2.66 -		xor	al,dl		; clear C
    2.67 +		xor	al,dl		; clear C; 00=P5+=PE+Z 20=486=PO 24=386=PE
    2.68  		ifdef	CPUTYPE
    2.69  		 ifndef	VCPI
    2.70   		  ifdef	LARGE_ZIMAGE
    2.71  		cdq			; 386 and 486 are not 64 bits
    2.72  		  endif
    2.73  		 endif
    2.74 -		cmp	al,20h
    2.75  		mov	ax,0400h
    2.76 -		je	is486
    2.77 +		jpo	is486
    2.78  		mov	ah,3
    2.79  is486:
    2.80 -		jae	set_cputype
    2.81 +		jne	set_cputype	; edx[31-20]=0 see [1]; edx.26=lm=0
    2.82 +		xchg	ax,si		; si=0300h
    2.83 +basicCPUID:
    2.84  		xor	eax,eax
    2.85  		inc	ax
    2.86  		cpuid			; Basic cpuid (late 486 or Pentium)
    2.87 -		xor	eax,eax
    2.88 -		inc	ax
    2.89 -		cpuid			; again cause of Nasty EMM386s
    2.90 +		inc	si
    2.91 +		jpo	basicCPUID	; again cause of Nasty EMM386s	
    2.92  		push	eax
    2.93 -		shr	edx,1+26	; test bit 26 (sse2), clear bit 29 (tm/lm confusion)
    2.94 +		shr	edx,1+26	; test bit 26 (sse2), clear bit 29 (avoid tm/lm confusion)
    2.95  		jnc	baseInfo
    2.96  		else
    2.97  		jne	@@no_cpuid	; CPUID feature bit changed ?
    2.98 @@ -280,21 +276,21 @@
    2.99  		cpuid			; Extended cpuid (Pentium 4)
   2.100  		ifdef	CPUTYPE
   2.101  baseInfo:
   2.102 -		pop	ax		; base IDs
   2.103 -		and	ax,0FF0h	; keep FamilyID & ModelID
   2.104 -		pop	cx		; extended IDs
   2.105 -		mov	bx,cx
   2.106 -		shr	bx,4		; extended FamilyID in bl
   2.107 -		shr	al,4		; set base ModelID
   2.108 -		cmp	ah,0Fh
   2.109 +		pop	ax		; base FamilyID[11-8] & base ModelID[7-4]
   2.110 +		pop	bx		; extended FamilyID[11-4] & extended ModelID[3-0]
   2.111 +		mov	cx,0F04h
   2.112 +		and	ah,ch
   2.113 +		and	bh,ch
   2.114 +		ror	bx,cl		; extended FamilyID in bl, extended ModelID in bh[7-4]
   2.115 +		shr	al,cl		; set base ModelID
   2.116 +		cmp	ah,ch
   2.117  		jz	SetModelID
   2.118  		cmp	ah,06h
   2.119  		jnz	ModelIDset
   2.120 -		db	3Dh		; cmp ax,0DC00h
   2.121 +		db	3Dh		; cmp ax,0E302h
   2.122  SetModelID:
   2.123  		add	ah,bl		; use extended FamilyID
   2.124 -		shl	cl,4
   2.125 -		or	al,cl		; use extended ModelID
   2.126 +		or	al,bh		; use extended ModelID
   2.127  ModelIDset:
   2.128  set_cputype:
   2.129  		endif
     3.1 --- a/ventoy/receipt	Sat Dec 11 19:18:13 2021 +0000
     3.2 +++ b/ventoy/receipt	Mon Dec 20 10:05:11 2021 +0000
     3.3 @@ -1,7 +1,7 @@
     3.4  # SliTaz package receipt.
     3.5  
     3.6  PACKAGE="ventoy"
     3.7 -VERSION="1.0.61"
     3.8 +VERSION="1.0.62"
     3.9  CATEGORY="misc"
    3.10  SHORT_DESC="A tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files."
    3.11  MAINTAINER="pascal.bellard@slitaz.org"
    3.12 @@ -12,7 +12,7 @@
    3.13  EXTRA_SOURCE_FILES="$PACKAGE-bin-$VERSION.tar.gz"
    3.14  HOST_ARCH="i486"
    3.15  
    3.16 -DEPENDS="slitaz-tools"
    3.17 +DEPENDS="slitaz-tools exfat-utils"
    3.18  SUGGESTED="tazweb"
    3.19  
    3.20  current_version()
    3.21 @@ -24,8 +24,10 @@
    3.22  # Rules to configure and make the package.
    3.23  compile_rules()
    3.24  {
    3.25 -	sed -i 's|^build_func |#&|;s|#\(build_func .*i386\)|\1|;s|-l pthread|& -l rt|' LinuxGUI/build.sh
    3.26 +	sed -i 's|^build_func |#&|;s|#\(build_func .*i386\)|\1|;s|-l pthread|& -l rt|' \
    3.27 +		LinuxGUI/build.sh Plugson/build.sh
    3.28  	cd LinuxGUI && sh build.sh
    3.29 +	cd ../Plugson && sh build.sh
    3.30  	[ -s $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES ] ||
    3.31  		wget --no-check-certificate -O $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES \
    3.32  		"https://github.com/ventoy/Ventoy/releases/download/v$VERSION/ventoy-$VERSION-linux.tar.gz"
    3.33 @@ -47,9 +49,16 @@
    3.34  	rm -rf $fs/usr/share/ventoy/tool/x86_64 
    3.35  	ln -s i386 $fs/usr/share/ventoy/tool/x86_64
    3.36  	rm -rf $fs/usr/share/ventoy/tool/mips64el
    3.37 +	sed 's|uname -m|echo i386|' -i $fs/usr/share/ventoy/*.sh
    3.38  	sed '/= VentoyWeb.sh =/,/just execute/d' -i $fs/usr/share/ventoy/README
    3.39  	cp $src/INSTALL/tool/i386/V2DServer $fs/usr/share/ventoy/tool/i386/
    3.40  	chmod +x $fs/usr/share/ventoy/tool/i386/V2DServer
    3.41 -	cp $stuff/TazVentoy.sh $fs/usr/share/ventoy/
    3.42 +	cp $src/INSTALL/tool/i386/Plugson $fs/usr/share/ventoy/tool/i386/
    3.43 +	chmod +x $fs/usr/share/ventoy/tool/i386/Plugson
    3.44 +	unxz $fs/usr/share/ventoy/tool/i386/vtoycli.xz
    3.45 +	chmod +x $fs/usr/share/ventoy/tool/i386/vtoycli
    3.46 +	rm -f $fs/usr/share/ventoy/tool/i386/*xz*
    3.47 +	cp $stuff/TazVentoy*.sh $fs/usr/share/ventoy/
    3.48  	ln -s /tmp/ventoy.log $fs/usr/share/ventoy/log.txt
    3.49 +	ln -s /tmp/ventoyPlugson.log $fs/usr/share/ventoy/VentoyPlugson.log
    3.50  }
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/ventoy/stuff/TazVentoyPlugson.sh	Mon Dec 20 10:05:11 2021 +0000
     4.3 @@ -0,0 +1,30 @@
     4.4 +#!/bin/sh
     4.5 +
     4.6 +case "$1" in
     4.7 +-*) echo "Usage: $0 [device] [ip] [port]" && exit 1
     4.8 +esac
     4.9 +
    4.10 +[ $(id -u) -ne 0 ] && exec tazbox su $0 $@
    4.11 +
    4.12 +cd $(dirname $0)
    4.13 +dev="${1:-$(blkid | sed '/Ventoy/!d;s|:.*||;q')}"
    4.14 +DISK=${dev%[0-9]*}; DISK=${DISK%p}
    4.15 +HOST="${2:-127.0.0.1}:${3:-24681}"
    4.16 +fstype="$(blkid $dev | sed 's|.*TYPE="||;s|".*||')"
    4.17 +mkdir /tmp/mnt$$
    4.18 +mount ${dev/1/2} /tmp/mnt$$
    4.19 +version="$(sed '/VERSION=/!d;s|.*="||;s|"||' /tmp/mnt$$/grub/grub.cfg)"
    4.20 +[ -e /EFI/BOOT/grubx64_real.efi ] && secureboot=1 || secureboot=0
    4.21 +umount /tmp/mnt$$
    4.22 +blkid $DISK | grep -q 'PTTYPE="gpt"' && partstyle=1 || partstyle=0
    4.23 +echo PATH=$(dirname $0)/tool/i386:$PATH Plugson ${HOST/:/ } $(dirname $0) "$DISK" $version "$fstype" $partstyle $secureboot > VentoyPlugson.log
    4.24 +mount $dev /tmp/mnt$$
    4.25 +cd /tmp/mnt$$
    4.26 +mkdir ventoy 2> /dev/null || true
    4.27 +
    4.28 +PATH=$(dirname $0)/tool/i386:$PATH Plugson ${HOST/:/ } $(dirname $0) "$DISK" $version "$fstype" $partstyle $secureboot &
    4.29 +sleep 1
    4.30 +
    4.31 +tazweb --notoolbar http://$HOST/ || browser http://$HOST/
    4.32 +kill %1
    4.33 +while !umount /tmp/mnt$$ 2> /dev/null; do sleep 1; done && rmdir /tmp/mnt$$