wok rev 24023

syslinux/taziso: 5in1 support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 15 20:49:46 2021 +0000 (2021-03-15)
parents 217c02cbbe8d
children fb3600dec0d4
files linld/stuff/src/_BEG.ASM linld/stuff/src/pipehole.awk syslinux/stuff/iso2exe/taziso
line diff
     1.1 --- a/linld/stuff/src/_BEG.ASM	Sun Mar 14 19:55:20 2021 +0000
     1.2 +++ b/linld/stuff/src/_BEG.ASM	Mon Mar 15 20:49:46 2021 +0000
     1.3 @@ -32,13 +32,10 @@
     1.4  img_initrd	image_himem	?
     1.5  	endm
     1.6  
     1.7 -	macro	alloc_misc
     1.8 +	macro	alloc_cmdnum
     1.9  		global	_cmdnum:word
    1.10  label   _cmdnum	word
    1.11  		dd	CMDNUMCNT	dup(?)
    1.12 -
    1.13 -		global	_himem_buf:dword
    1.14 -_himem_buf	dd	?
    1.15  	endm
    1.16  
    1.17                  p8086
    1.18 @@ -102,7 +99,7 @@
    1.19  		alloc_image
    1.20  		endif
    1.21  
    1.22 -		alloc_misc
    1.23 +		alloc_cmdnum
    1.24  
    1.25  		endif
    1.26  
    1.27 @@ -263,15 +260,17 @@
    1.28  
    1.29  ;***************************************************************
    1.30  
    1.31 +		org	$-4				; _himem_buf
    1.32 +
    1.33  		ifdef	BSS_OVERLAP_BOOT
    1.34  		mov	al,0
    1.35  		mov	di,100h
    1.36  		mov	cx,offset clean-100h
    1.37  
    1.38 -		org	$-(CMDNUMCNT*4)-4
    1.39 +		org	$-(CMDNUMCNT*4)			; alloc_cmdnum
    1.40  
    1.41  		ifdef	room_for_image
    1.42 -		org	$-2-2-(2*size image_himem)
    1.43 +		org	$-2-2-(2*size image_himem)	; alloc_image
    1.44  		endif
    1.45  
    1.46  		ifdef	room_for_isostate
    1.47 @@ -283,7 +282,13 @@
    1.48  		alloc_image
    1.49  		endif
    1.50  
    1.51 -		alloc_misc
    1.52 +		alloc_cmdnum
    1.53 +		endif
    1.54 +
    1.55 +		global	_himem_buf:dword
    1.56 +_himem_buf	dd	?
    1.57 +
    1.58 +		ifdef	BSS_OVERLAP_BOOT
    1.59  clean:
    1.60  		rep
    1.61  		  stosb
     2.1 --- a/linld/stuff/src/pipehole.awk	Sun Mar 14 19:55:20 2021 +0000
     2.2 +++ b/linld/stuff/src/pipehole.awk	Mon Mar 15 20:49:46 2021 +0000
     2.3 @@ -9,7 +9,6 @@
     2.4  	if (file == "" && /debug	S/) { file=$3; gsub(/\"/,"",file) }
     2.5  	if (/debug	S/) print "	%PAGESIZE 1000"
     2.6  	 if (file == "linld.cpp") {
     2.7 -#print "			linld=" islinld " ;" $0
     2.8  	if (/\[si/ || /si,/ || /,si/) sub(/si/,"di")
     2.9  	else if (/\[di/ || /di,/ || /,di/) sub(/di/,"si")
    2.10  	if (/add	di,2/) $0="	scasw	; " $0
    2.11 @@ -260,7 +259,6 @@
    2.12  	if (/ptr \[.i\+6\],ax/) next
    2.13  	if (/ptr \[.i\+6\],eax/) next
    2.14  	if (/x,word ptr \[.i\+32\]/) next
    2.15 -#print "			iso=" isiso " ;" $0
    2.16  	if (/add	word ptr \[.i\],ax/) sub(/ax/,"cx")
    2.17  	if (/ax,word ptr \[si\+22\]/) sub(/mov	ax,/,"les	ax,d")
    2.18  	if (/ax,word ptr \[si\+24\]/) next
    2.19 @@ -269,8 +267,11 @@
    2.20  	if (/p = buf2k \+ 32 \+ x->curpos/) isiso=21
    2.21  	sub(/-257/,"-257	; clear C")
    2.22  	if (isiso == 21) { # ISO9660.LST
    2.23 -		if (/si,ax/) $0="	sub	si,cx"
    2.24 -		sub(/ax,/,"si,")
    2.25 +		if (/ax,/) next
    2.26 +		if (/si,ax/) {
    2.27 +			print "	add	ax,32"
    2.28 +			$0="	xchg	ax,si"
    2.29 +		}
    2.30  		if (/# else/) isiso=0
    2.31  	}
    2.32  	if (/cx,si/) {
     3.1 --- a/syslinux/stuff/iso2exe/taziso	Sun Mar 14 19:55:20 2021 +0000
     3.2 +++ b/syslinux/stuff/iso2exe/taziso	Mon Mar 15 20:49:46 2021 +0000
     3.3 @@ -253,7 +253,7 @@
     3.4  	fi
     3.5  	dotwait "Install root filesystem in /slitaz.."
     3.6  	if [ "$1" ]; then
     3.7 -		ls_r $media/boot/rootfs*gz | \
     3.8 +		ls_r $media/boot/rootfs*gz* | \
     3.9  		xargs cat > $mnt/slitaz/boot/rootfs.gz
    3.10  		tazusbinitfs $mnt/slitaz/boot/rootfs.gz $useposixovl
    3.11  		initrd=rootfs.gz
    3.12 @@ -270,7 +270,7 @@
    3.13                                  losetup -d /dev/loop7                          
    3.14                          done                                                   
    3.15                  else
    3.16 -			for i in $(ls_r $media/boot/rootfs*gz); do
    3.17 +			for i in $(ls_r $media/boot/rootfs*gz*); do
    3.18  				${uncpio:-uncpio} $i $mnt/slitaz
    3.19  			done
    3.20  		fi
    3.21 @@ -298,11 +298,11 @@
    3.22  		[ $(get 0 $i 2> /dev/null || echo 0) -eq 23117 ] &&
    3.23  		mv $i $i.exe
    3.24  	done
    3.25 -	bzimage=$(cd $mnt/slitaz/boot ; ls bzimage*)
    3.26 +	bzimage=$(cd $mnt/slitaz/boot ; ls bzImage* | sed q)
    3.27  	cp /etc/keymap.conf /etc/locale.conf $mnt/slitaz/etc 2> /dev/null
    3.28  	gettazboot $mnt/slitaz/boot/tazboot.exe	# autoappend 64 suffix
    3.29  	unix2dos > $mnt/slitaz/boot/tazboot.cmd <<EOT
    3.30 -image=/slitaz/boot/bzimage
    3.31 +image=/slitaz/boot/$bzimage
    3.32  initrd=/slitaz/boot/$initrd
    3.33  root=/dev/null $extraargs autologin
    3.34  EOT
    3.35 @@ -455,8 +455,8 @@
    3.36  start SliTaz Live with the 'SliTaz RAM boot' menu.\n" 19 70
    3.37  	[ $? -eq 0 ] || return
    3.38  	doinstall
    3.39 -	[ $0 = /init.exe ] || return
    3.40 -	[ -x $mnt/slitaz/sbin/init ] || return
    3.41 +	[ $0 = /init.exe ] || return 0
    3.42 +	[ -x $mnt/slitaz/sbin/init ] || return 0
    3.43  	umount -d $media/cdrom
    3.44  	umount_proc
    3.45  	exec chroot $mnt/slitaz /sbin/init
    3.46 @@ -619,7 +619,7 @@
    3.47  	if [ "$1" ]; then
    3.48  		doinstall tazusblike
    3.49  	else
    3.50 -		_installtaz && bootinstalled /boot/bzimage
    3.51 +		_installtaz && bootinstalled /boot/bzImage
    3.52  	fi
    3.53  	umount $mnt
    3.54  	rm -rf $mnt