wok rev 23810

syslinux/iso2exe: use isoboot
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 25 10:10:30 2020 +0000 (2020-05-25)
parents 24235f64ae6c
children e93fa0cecd8a
files linld/receipt linld/stuff/src/!COMPILE.BAT linld/stuff/src/HEADER.ASM linld/stuff/src/HEADER.CMD linld/stuff/src/_END.ASM lxappearance-dev/receipt lxappearance/receipt lxdm/receipt lxrandr/receipt lxtask/receipt syslinux/receipt syslinux/stuff/iso2exe/init syslinux/stuff/iso2exe/iso2exe.c syslinux/stuff/iso2exe/iso2exe.sh syslinux/stuff/iso2exe/taziso
line diff
     1.1 --- a/linld/receipt	Sun May 24 16:43:25 2020 +0000
     1.2 +++ b/linld/receipt	Mon May 25 10:10:30 2020 +0000
     1.3 @@ -46,6 +46,7 @@
     1.4  	grep '^Warning[ :]' */LNK.LOG */CPP.LOG
     1.5  	grep '*Warning*' */*.LST
     1.6  	cp LINLD$SUFFIX/LINLD.COM linld.com
     1.7 +	cp LINLD$SUFFIX/HEADER.COM header.com
     1.8  	cp TAZBOOT/TAZBOOT.COM tazboot.com
     1.9  	dd count=$((0x$(sed '/ FOLD/!d;s|.*:||;s| .*||;q' LINLD$SUFFIX/ISOBOOT.MAP) - 0x100)) \
    1.10  		if=LINLD$SUFFIX/ISOBOOT.COM bs=1 > isoboot.com
     2.1 --- a/linld/stuff/src/!COMPILE.BAT	Sun May 24 16:43:25 2020 +0000
     2.2 +++ b/linld/stuff/src/!COMPILE.BAT	Mon May 25 10:10:30 2020 +0000
     2.3 @@ -15,3 +15,4 @@
     2.4  tasm /la /m /dISOHOOK /dMOVE_SETUP /dUSE_ARGSTR /dNO386 /dLARGE_IMAGES /dLONG_FILENAME *.asm > asm.log
     2.5  tlink /m /s /t @link.cmd > lnk.log
     2.6  tlink /m /s /t @link2.cmd > lnk2.log
     2.7 +tlink /m /s /t @header.cmd > header.log
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/linld/stuff/src/HEADER.ASM	Mon May 25 10:10:30 2020 +0000
     3.3 @@ -0,0 +1,76 @@
     3.4 +;***************************************************************
     3.5 +;****** This file is distributed under GPL
     3.6 +;***************************************************************
     3.7 +                ideal
     3.8 +		%PAGESIZE 1000
     3.9 +                %crefref
    3.10 +                %noincl
    3.11 +                %nomacs
    3.12 +                p8086
    3.13 +
    3.14 +        group   DGROUP  _TEXT
    3.15 +        assume  cs:DGROUP,ds:DGROUP
    3.16 +
    3.17 +        segment _TEXT byte public use16 'CODE'
    3.18 +
    3.19 +                org     100h
    3.20 +        global  _text_start:byte
    3.21 +        label   _text_start byte
    3.22 +
    3.23 +		mov	di,80h
    3.24 +		cmp	[byte di],1
    3.25 +		ja	notfound
    3.26 +	ifdef	WITH_LONG_FILENAME
    3.27 +		mov	si,offset tazboot_cmd
    3.28 +		mov	ax,716Ch
    3.29 +		xor	bx,bx			; R/O
    3.30 +		xor	cx,cx			; attributes
    3.31 +		cwd				; action = open
    3.32 +		stc
    3.33 +                int	21h
    3.34 +                jnc	found
    3.35 +		mov	dx,si
    3.36 +	else
    3.37 +		mov	dx,offset tazboot_cmd
    3.38 +	endif
    3.39 +                mov	ax,3d00h		; read-only+compatibility
    3.40 +		;mov	cl,0			; attribute mask
    3.41 +		int	21h
    3.42 +		jc	notfound
    3.43 +found:
    3.44 +		xchg	ax,bx
    3.45 +		mov	ah,3Eh
    3.46 +		int	21h
    3.47 +		mov	cx,endcmd-begcmd+1
    3.48 +		mov	si,offset default_arg
    3.49 +		rep
    3.50 +		  movsb
    3.51 +notfound:
    3.52 +		mov	di,9000h
    3.53 +		mov	si,offset tomove
    3.54 +		mov	ch,1
    3.55 +		jmp	move
    3.56 +tomove:
    3.57 +		cld
    3.58 +		mov	di,100h
    3.59 +		mov	si,offset endcmd
    3.60 +		mov	ch,40h
    3.61 +move:
    3.62 +		push	di
    3.63 +		rep
    3.64 +		  movsw
    3.65 +		ret
    3.66 +
    3.67 +default_arg	db	endcmd-begcmd
    3.68 +begcmd		db	" @"
    3.69 +tazboot_cmd	db	"tazboot.cmd",0
    3.70 +endcmd:
    3.71 +
    3.72 +;***************************************************************
    3.73 +
    3.74 +        ends    _TEXT
    3.75 +
    3.76 +
    3.77 +        end     _text_start
    3.78 +
    3.79 +;###### END OF FILE ############################################
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/linld/stuff/src/HEADER.CMD	Mon May 25 10:10:30 2020 +0000
     4.3 @@ -0,0 +1,1 @@
     4.4 +header.obj, header
     5.1 --- a/linld/stuff/src/_END.ASM	Sun May 24 16:43:25 2020 +0000
     5.2 +++ b/linld/stuff/src/_END.ASM	Mon May 25 10:10:30 2020 +0000
     5.3 @@ -17,7 +17,7 @@
     5.4          label   _data_end byte
     5.5          ends    _DATA
     5.6  
     5.7 -        segment _BSS byte public use16 'BSS'
     5.8 +        segment _BSS word public use16 'BSS'
     5.9  STACK_SIZE = 1024
    5.10  
    5.11          global  _version_string:byte
     6.1 --- a/lxappearance-dev/receipt	Sun May 24 16:43:25 2020 +0000
     6.2 +++ b/lxappearance-dev/receipt	Mon May 25 10:10:30 2020 +0000
     6.3 @@ -7,7 +7,7 @@
     6.4  MAINTAINER="pankso@slitaz.org"
     6.5  LICENSE="GPL2"
     6.6  WANTED="lxappearance"
     6.7 -WEB_SITE="https://lxde.org/"
     6.8 +WEB_SITE="https://wiki.lxde.org/en/LXAppearance"
     6.9  TAGS="LXDE"
    6.10  HOST_ARCH="i486 arm"
    6.11  
     7.1 --- a/lxappearance/receipt	Sun May 24 16:43:25 2020 +0000
     7.2 +++ b/lxappearance/receipt	Mon May 25 10:10:30 2020 +0000
     7.3 @@ -6,7 +6,7 @@
     7.4  SHORT_DESC="LXDE GTK+ theme switcher"
     7.5  MAINTAINER="pankso@slitaz.org"
     7.6  LICENSE="GPL2"
     7.7 -WEB_SITE="http://lxde.sourceforge.net/"
     7.8 +WEB_SITE="https://wiki.lxde.org/en/LXAppearance"
     7.9  TARBALL="$PACKAGE-$VERSION.tar.xz"
    7.10  WGET_URL="$SF_MIRROR/lxde/$TARBALL"
    7.11  TAGS="LXDE"
     8.1 --- a/lxdm/receipt	Sun May 24 16:43:25 2020 +0000
     8.2 +++ b/lxdm/receipt	Mon May 25 10:10:30 2020 +0000
     8.3 @@ -7,7 +7,7 @@
     8.4  MAINTAINER="pankso@slitaz.org"
     8.5  LICENSE="GPL3"
     8.6  TARBALL="$PACKAGE-$VERSION.tar.xz"
     8.7 -WEB_SITE="https://lxde.org/"
     8.8 +WEB_SITE="https://wiki.lxde.org/en/LXDM"
     8.9  WGET_URL="$SF_MIRROR/lxde/$TARBALL"
    8.10  TAGS="LXDE"
    8.11  
     9.1 --- a/lxrandr/receipt	Sun May 24 16:43:25 2020 +0000
     9.2 +++ b/lxrandr/receipt	Mon May 25 10:10:30 2020 +0000
     9.3 @@ -7,7 +7,7 @@
     9.4  SHORT_DESC="LXDE monitor configuration tool."
     9.5  MAINTAINER="gokhlayeh@slitaz.org"
     9.6  LICENSE="GPL2"
     9.7 -WEB_SITE="https://lxde.org"
     9.8 +WEB_SITE="https://wiki.lxde.org/en/LXRandR"
     9.9  
    9.10  TARBALL="$PACKAGE-$VERSION.tar.xz"
    9.11  WGET_URL="$SF_MIRROR/lxde/$TARBALL"
    10.1 --- a/lxtask/receipt	Sun May 24 16:43:25 2020 +0000
    10.2 +++ b/lxtask/receipt	Mon May 25 10:10:30 2020 +0000
    10.3 @@ -7,7 +7,7 @@
    10.4  SHORT_DESC="LXDE task manager."
    10.5  MAINTAINER="pankso@slitaz.org"
    10.6  LICENSE="GPL2"
    10.7 -WEB_SITE="https://lxde.org"
    10.8 +WEB_SITE="https://wiki.lxde.org/en/LXTask"
    10.9  
   10.10  TARBALL="$PACKAGE-$VERSION.tar.xz"
   10.11  WGET_URL="$SF_MIRROR/lxde/$TARBALL"
    11.1 --- a/syslinux/receipt	Sun May 24 16:43:25 2020 +0000
    11.2 +++ b/syslinux/receipt	Mon May 25 10:10:30 2020 +0000
    11.3 @@ -43,7 +43,8 @@
    11.4  			$i > kbd/$(basename $i .map.gz)
    11.5  	done
    11.6  	cp -a $stuff/iso2exe .
    11.7 -	cp $LINLD/*/tazboot.com iso2exe/boot.com
    11.8 +	cp $LINLD/*/isoboot.com iso2exe/boot.com
    11.9 +	cp $LINLD/*/header.com iso2exe/header.com
   11.10  	make -C iso2exe
   11.11  }
   11.12  
    12.1 --- a/syslinux/stuff/iso2exe/init	Sun May 24 16:43:25 2020 +0000
    12.2 +++ b/syslinux/stuff/iso2exe/init	Mon May 25 10:10:30 2020 +0000
    12.3 @@ -126,16 +126,15 @@
    12.4  gettazboot()
    12.5  {
    12.6  	echo -e "\nCreating $(basename $1) ..."
    12.7 -	X=$(($(get 20 /mnt/$ISO) - 0xC0))
    12.8 -	[ $X -lt 30000 ] && X=$((0x7FF0))
    12.9 -	O=$(($(get 64 /mnt/$ISO) - 0xC0))
   12.10 -	L=$(($X - $(get 24 /mnt/$ISO) - $O))
   12.11 -	S=$((32+$L))
   12.12 +	S=$((32+HEADERSZ))
   12.13  	P=$((($S+511)/512))
   12.14  	E=$((4096-(32*$P)))
   12.15 -	words2bin 0x5A4D $(($S%512)) $P 0 2 $E -1 $((${2:-0}-16)) \
   12.16 +	words2bin 0x5A4D $(($S%512)) $P 0 2 $E -1 -16 \
   12.17  			-2 0 256 -16 28 0x6C53 0x5469 0x7A61 > $1
   12.18 -	ddq bs=1 count=$(echo $L) skip=$(echo $O) if=/mnt/$ISO >> $1
   12.19 +	uudecode - >> $1 << EOT
   12.20 +HEADERCODE
   12.21 +EOT
   12.22 +	ddq if=/mnt/slitaz/boot/linld.com >> $1
   12.23  }
   12.24  
   12.25  checkmagic()
   12.26 @@ -437,18 +436,15 @@
   12.27  	$DIALOG --clear --title " SliTaz bootloader for DOS " \
   12.28  		--yes-label "Install" --yesno \
   12.29  "\nThe file TAZBOOT.EXE will be created in the top directory. It supports
   12.30 -any linux kernel, multiple initramfs, a kernel command line and
   12.31 -an ISO image file loopback (retrieves files from an ISO file).\n\n
   12.32 -Usage: tazboot.exe [[@commands]|[kernel=<bzimage>]
   12.33 -[initrd=<rootfs>[,<rootfs2>...]] [bootfrom=<isofile>] cmdline args ...]\n\n
   12.34 -Defaults: tazboot @tazboot.cmd or tazboot kernel=bzImage auto\n\n\
   12.35 +any linux kernel, multiple initramfs, and a kernel command line.\n\n
   12.36 +Usage: tazboot.exe [[@commands]|[image=<bzimage>]
   12.37 +[initrd=<rootfs>[,<rootfs2>...]] cmdline args ...]\n\n
   12.38 +Defaults: tazboot @tazboot.cmd or tazboot image=bzImage auto\n\n\
   12.39  Examples for tazboot.cmd:\n\n\
   12.40 -  bootfrom=\\isos\\slitaz-4.0.iso\n\
   12.41    kernel=boot/bzImage\n\
   12.42    initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz\n\
   12.43    autologin\n\n\
   12.44 -  kernel=\\slitaz\\vmlinuz root=/dev/sda5 ro\n\n
   12.45 -Unlike GRUB4DOS, it doesn't require unfragmented ISO image files.\n" 24 78
   12.46 +  image=\\slitaz\\vmlinuz root=/dev/sda5 ro\n" 24 78
   12.47  	[ $? -eq 0 ] || return
   12.48  	gettazboot /mnt/tazboot.exe
   12.49  }
   12.50 @@ -745,6 +741,8 @@
   12.51  
   12.52  if [ "$1" = "--build" ]; then	#install-begin
   12.53  	cp $0 $0.tmp
   12.54 +	uuencode -m - < header.com | sed -e '/^HEADERCODE$/r/dev/stdin' \
   12.55 +	  -e "s|HEADERSZ|$(stat -c %s header.com)|" -e '/^HEADERCODE$/d' -i $0.tmp
   12.56  	uuencode -m - < ifmem.bin | sed -e 's|^[ \t]*||;s|[ \t]*###.*||' \
   12.57  	  -e 's| *;;|;;|;s|\t\t*|\t|g' \
   12.58  	  -e '/^ifmemcode$/r/dev/stdin' -e '/^ifmemcode$/d' -i $0.tmp
   12.59 @@ -1221,7 +1219,7 @@
   12.60  $(xfile tazlito		"flavor"	"Get flavor file") \
   12.61  $(fddata		"fdbootstrap"	"Create a floppy bootstrap") \
   12.62  $(cdfile isolinux.cfg	"floppyset"	"Boot floppy set") \
   12.63 -			"tazboot"	"Get tazboot.exe Linux loader" \
   12.64 +$(cdfile linld.com	"tazboot"	"Get tazboot.exe Linux loader") \
   12.65  $(cdexe boot/bzImage	"bzimage"	"Get linux DOS/EXE file") \
   12.66  $(cdexe "memtest*"	"memtest"	"Get Memtest86 DOS/EXE file") \
   12.67  $(cdfilef "memtest*"	"fdmemtest"	"Create a Memtest86 boot floppy") \
    13.1 --- a/syslinux/stuff/iso2exe/iso2exe.c	Sun May 24 16:43:25 2020 +0000
    13.2 +++ b/syslinux/stuff/iso2exe/iso2exe.c	Mon May 25 10:10:30 2020 +0000
    13.3 @@ -497,7 +497,7 @@
    13.4  	SYSLINUX_MBR,		/*  1 */
    13.5  	FLAVOR_INFO,		/*  2 */
    13.6  	FLOPPY_BOOT,		/*  3 */
    13.7 -	TAZBOOT_COM,		/*  4 */
    13.8 +	ISOBOOT_COM,		/*  4 */
    13.9  	ROOTFS_GZ,		/*  5 */
   13.10  	DOSSTUB,		/*  6 */
   13.11  	BOOT_MD5,		/*  7 */
   13.12 @@ -530,7 +530,7 @@
   13.13  	case FLOPPY_BOOT:	/* floppy.boot */
   13.14  		file_size = BYTE(buffer+26)*512;
   13.15  		file_offset = WORD(buffer+64) - 0xC0 - file_size; break;
   13.16 -	case TAZBOOT_COM:	/* tazboot.com */
   13.17 +	case ISOBOOT_COM:	/* isoboot.com */
   13.18  		file_offset = WORD(buffer+64) - 0xC0;
   13.19  		file_size = stub - WORD(buffer+24) - file_offset; break;
   13.20  	case ROOTFS_GZ:		/* rootfs.gz */
    14.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh	Sun May 24 16:43:25 2020 +0000
    14.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh	Mon May 25 10:10:30 2020 +0000
    14.3 @@ -170,7 +170,7 @@
    14.4  	floppy.boot)	SIZE=$(($(get 26 "$ISO" 1)*512))
    14.5  			OFFSET=$(($(get 64 "$ISO") - 0xC0 - $SIZE));;
    14.6  	rootfs.gz)	SIZE=$(get 24 "$ISO"); OFFSET=$(($stub - $SIZE));;
    14.7 -	tazboot.com)	OFFSET=$(($(get 64 "$ISO") - 0xC0))
    14.8 +	isoboot.com)	OFFSET=$(($(get 64 "$ISO") - 0xC0))
    14.9  			SIZE=$(($stub - $(get 24 "$ISO") - $OFFSET));;
   14.10  	dosstub)	[ "$dosstub" ] && OFFSET=$stub && SIZE=$((0x7FF0 - $OFFSET));;
   14.11  	boot.md5)	[ $(get 0 "$ISO") -eq 23117 ] &&
   14.12 @@ -242,7 +242,7 @@
   14.13  list()
   14.14  {
   14.15  	HEAP=0
   14.16 -	for f in win32.exe syslinux.mbr flavor.info floppy.boot tazboot.com \
   14.17 +	for f in win32.exe syslinux.mbr flavor.info floppy.boot isoboot.com \
   14.18  		 rootfs.gz dosstub boot.md5 fs.iso custom.magic custom.append \
   14.19  		 custom.initrd; do
   14.20  		fileofs $f
   14.21 @@ -423,7 +423,7 @@
   14.22  SYSLINUX_MBR	syslinux.mbr
   14.23  FLAVOR_INFO	flavor.info
   14.24  FLOPPY_BOOT	floppy.boot
   14.25 -TAZBOOT_COM	tazboot.com
   14.26 +ISOBOOT_COM	isoboot.com
   14.27  ROOTFS_GZ	rootfs.gz
   14.28  DOSSTUB		dosstub
   14.29  BOOT_MD5	boot.md5
    15.1 --- a/syslinux/stuff/iso2exe/taziso	Sun May 24 16:43:25 2020 +0000
    15.2 +++ b/syslinux/stuff/iso2exe/taziso	Mon May 25 10:10:30 2020 +0000
    15.3 @@ -32,16 +32,15 @@
    15.4  gettazboot()
    15.5  {
    15.6  	echo -e "\nCreating $(basename $1) ..."
    15.7 -	X=$(($(get 20 /mnt/$ISO) - 0xC0))
    15.8 -	[ $X -lt 30000 ] && X=$((0x7FF0))
    15.9 -	O=$(($(get 64 "$ISO") - 0xC0))
   15.10 -	L=$(($X - $(get 24 "$ISO") - $O))
   15.11 -	S=$((32+$L))
   15.12 +	S=$((32+HEADERSZ))
   15.13  	P=$((($S+511)/512))
   15.14  	E=$((4096-(32*$P)))
   15.15 -	words2bin 0x5A4D $(($S%512)) $P 0 2 $E -1 $((${2:-0}-16)) \
   15.16 +	words2bin 0x5A4D $(($S%512)) $P 0 2 $E -1 -16 \
   15.17  			-2 0 256 -16 28 0x6C53 0x5469 0x7A61 > $1
   15.18 -	ddq bs=1 count=$(echo $L) skip=$(echo $O) if="$ISO" >> $1
   15.19 +	uudecode - >> $1 << EOT
   15.20 +HEADERCODE
   15.21 +EOT
   15.22 +	ddq if=/mnt/slitaz/boot/linld.com >> $1
   15.23  }
   15.24  
   15.25  uncpio()
   15.26 @@ -576,18 +575,15 @@
   15.27  		$DIALOG --clear --title " SliTaz bootloader for DOS " \
   15.28  			--yes-label "Install" --yesno \
   15.29  "\nThe file TAZBOOT.EXE will be created in the top directory. It supports
   15.30 -any linux kernel, multiple initramfs, a kernel command line and
   15.31 -an ISO image file loopback (retrieves files from an ISO file).\n\n
   15.32 -Usage: tazboot.exe [[@commands]|[kernel=<bzimage>]
   15.33 -[initrd=<rootfs>[,<rootfs2>...]] [bootfrom=<isofile>] cmdline args ...]\n\n
   15.34 -Defaults: tazboot @tazboot.cmd or tazboot kernel=bzImage auto\n\n\
   15.35 +any linux kernel, multiple initramfs and a kernel command line.\n\n
   15.36 +Usage: tazboot.exe [[@commands]|[image=<bzimage>]
   15.37 +[initrd=<rootfs>[,<rootfs2>...]] cmdline args ...]\n\n
   15.38 +Defaults: tazboot @tazboot.cmd or tazboot image=bzImage auto\n\n\
   15.39  Examples for tazboot.cmd:\n\n\
   15.40 -  bootfrom=\\isos\\slitaz-4.0.iso\n\
   15.41 -  kernel=boot/bzImage\n\
   15.42 +  image=boot/bzImage\n\
   15.43    initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz\n\
   15.44    autologin\n\n\
   15.45 -  kernel=\\slitaz\\vmlinuz root=/dev/sda5 ro\n\n
   15.46 -Unlike GRUB4DOS, it doesn't require unfragmented ISO image files.\n" 0 0
   15.47 +  image=\\slitaz\\vmlinuz root=/dev/sda5 ro\n" 0 0
   15.48  		[ $? -eq 0 ] || return
   15.49  	fi
   15.50  	gettazboot tazboot.exe
   15.51 @@ -825,11 +821,6 @@
   15.52  	[ $(get 32769 "$ISO" 4) -eq 808469571 ] && menuitem "$@"
   15.53  }
   15.54  
   15.55 -hastazboot()
   15.56 -{
   15.57 -	[ $(get 0 "$ISO") -eq 23117 ] && menuitem "$@"
   15.58 -}
   15.59 -
   15.60  burnable()
   15.61  {
   15.62  	[ "$(sed '/Can wr.*1$/!d' /proc/sys/dev/cdrom/info 2> /dev/null)" ] &&
   15.63 @@ -1128,6 +1119,8 @@
   15.64  }
   15.65  
   15.66  if [ "$1" = "--build" ]; then	#install-begin
   15.67 +	uuencode -m - < header.com | sed -e '/^HEADERCODE$/r/dev/stdin' \
   15.68 +	  -e "s|HEADERSZ|$(stat -c %s header.com)|" -e '/^HEADERCODE$/d' -i $0
   15.69  	uuencode -m - < ifmem.bin | sed -e '/^ifmemcode$/r/dev/stdin' \
   15.70  	  -e '/^ifmemcode$/d' -i $0
   15.71  	uuencode -m - < bootloader.bin | sed -e '/^bootloader$/r/dev/stdin' \
   15.72 @@ -1382,7 +1375,7 @@
   15.73  $(hasflavinfo		"showfavinfo"	"Show flavor extra info") \
   15.74  $(hasflavor		"flavor"	"Get flavor file") \
   15.75  $(cdfile isolinux.cfg	"floppyset"	"Boot floppy set") \
   15.76 -$(hastazboot		"tazboot"	"Get tazboot.exe Linux loader") \
   15.77 +$(cdfile linld.com	"tazboot"	"Get tazboot.exe Linux loader") \
   15.78  $(cdexe boot/bzImage	"bzimage"	"Get linux DOS/EXE file") \
   15.79  $(cdexe 'memtest*'	"memtest"	"Get Memtest86 DOS/EXE file") \
   15.80  $(cdfilef 'memtest*'	"fdmemtest"	"Create a Memtest86 boot floppy") \