wok rev 16012

syslinux/iso2exe: access both local and isofs namespaces
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 04 21:00:29 2014 +0000 (2014-03-04)
parents ead8572c67e9
children 82c793b0a850
files syslinux/stuff/iso2exe/boot.c syslinux/stuff/iso2exe/init
line diff
     1.1 --- a/syslinux/stuff/iso2exe/boot.c	Tue Mar 04 20:34:28 2014 +0000
     1.2 +++ b/syslinux/stuff/iso2exe/boot.c	Tue Mar 04 21:00:29 2014 +0000
     1.3 @@ -15,7 +15,7 @@
     1.4  Examples for tazboot.cmd:\n\n\
     1.5    iso=\\isos\\slitaz-4.0.iso\n\
     1.6    kernel=boot/bzImage\n\
     1.7 -  initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz\n\
     1.8 +  initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz,\\slitaz\\extrafs.gz\n\
     1.9    rw root=/dev/null vga=normal autologin\n\n\
    1.10    kernel=\\slitaz\\vmlinuz\n\
    1.11    root=/dev/sda5 ro\n",iso,iso,iso);
    1.12 @@ -26,7 +26,7 @@
    1.13  {
    1.14  	char *init = "rdinit=/init.exe", *mode="menu";
    1.15  	char c, rootfs[16], cmdline[256];
    1.16 -	int fd, restart;
    1.17 +	int restart;
    1.18  	unsigned long magic;
    1.19  	
    1.20  	if (isoreset(*iso) || isoopen("boot")) return;
    1.21 @@ -75,6 +75,11 @@
    1.22  		while (*s && *s != '\r' && *s != '\n') s++;
    1.23  		*s = 0;
    1.24  	}
    1.25 +	if (*file == '\\') {
    1.26 +		static fd = -1;
    1.27 +		if (fd >= 0) close(fd);
    1.28 +		return open(file, O_RDONLY);
    1.29 +	}
    1.30  	if (iso) {
    1.31  		isoreset(iso);
    1.32  		return isoopen(file);
     2.1 --- a/syslinux/stuff/iso2exe/init	Tue Mar 04 20:34:28 2014 +0000
     2.2 +++ b/syslinux/stuff/iso2exe/init	Tue Mar 04 21:00:29 2014 +0000
     2.3 @@ -291,7 +291,7 @@
     2.4  miss many of the failures that are detected by Memtest86.\n
     2.5  " 12 70
     2.6  	[ $? -eq 0 ] || return
     2.7 -	cp /media/cdrom/boot/memtest /mnt
     2.8 +	cp /media/cdrom/boot/memtest /mnt/memtest.exe
     2.9  }
    2.10  
    2.11  fdmemtest()
    2.12 @@ -319,7 +319,8 @@
    2.13  from the Web using PXE and HTTP protocols.\n
    2.14  " 12 70
    2.15  	[ $? -eq 0 ] || return
    2.16 -	cp /media/cdrom/boot/?pxe /mnt
    2.17 +	pxe=$(ls /media/cdrom/boot/?pxe)
    2.18 +	cp $pxe /mnt/$(basename $pxe).exe
    2.19  }
    2.20  
    2.21  fdgpxe()
    2.22 @@ -536,12 +537,12 @@
    2.23  			"usbbootkey"	"USB boot key (read only)" \
    2.24  $(fddata		"fdbootstrap"	"Floppy bootstrap") \
    2.25  			"tazboot"	"Get tazboot.exe Linux loader" \
    2.26 -$(cdfile Xboot/memtest	"memtest"	"Get Memtest86") \
    2.27 +$(cdfile boot/memtest	"memtest"	"Get Memtest86") \
    2.28  $(cdfile boot/memtest	"fdmemtest"	"Create a Memtest86 boot floppy") \
    2.29 -$(cdfile Xboot/gpxe	"gpxe"		"Get SliTaz Web boot utility") \
    2.30 -$(cdfile boot/gpxe	"fdgpxe"	"Create a SliTaz Web boot floppy") \
    2.31 -$(cdfile Xboot/ipxe	"gpxe"		"Get SliTaz Web boot utility") \
    2.32 -$(cdfile boot/ipxe	"fdgpxe"	"Create a SliTaz Web boot floppy") \
    2.33 +$(cdfile boot/gpxe	"pxe"		"Get SliTaz Web boot utility") \
    2.34 +$(cdfile boot/gpxe	"fdpxe"		"Create a SliTaz Web boot floppy") \
    2.35 +$(cdfile boot/ipxe	"pxe"		"Get SliTaz Web boot utility") \
    2.36 +$(cdfile boot/ipxe	"fdpxe"		"Create a SliTaz Web boot floppy") \
    2.37  $(xfile reboot		"restart"	"Restart the computer") \
    2.38  $(xfile poweroff	"stop"		"Power off") \
    2.39  			"bootlog"	"Linux boot messages" \