wok diff linld/stuff/src/TAZBOOT.CPP @ rev 21801

linld/iso2exe: remove non slitaz dos boot
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 10 18:47:30 2019 +0200 (7 months ago)
parents 04ffefac5707
children e93e6b4d565f
line diff
     1.1 --- a/linld/stuff/src/TAZBOOT.CPP	Thu Aug 01 15:16:29 2019 +0200
     1.2 +++ b/linld/stuff/src/TAZBOOT.CPP	Sat Aug 10 18:47:30 2019 +0200
     1.3 @@ -67,7 +67,7 @@
     1.4  {
     1.5  	const char *init = " rdinit=/init.exe", *mode="menu";
     1.6  	char c;
     1.7 -	static char rootfs[16], fallback[16], isknoppix, noauto;
     1.8 +	static char rootfs[16], fallback[16], noauto;
     1.9  	unsigned long magic;
    1.10  	struct isostate *x=&isostate;
    1.11  	
    1.12 @@ -76,20 +76,12 @@
    1.13  	base_himem = memtop() /2;
    1.14  	//if (base_himem >= _64m) base_himem = _64m;
    1.15  	if (* ((char *) &base_himem +3) >= 4) ((short *)&base_himem)[1] = _64m/_64k;
    1.16 -	isoopen("boot") != -1 ||
    1.17 -	isoopen("live") != -1 ||	// debian
    1.18 -	isoopen("casper") != -1;	// ubuntu
    1.19 +	isoopen("boot");
    1.20  	if (iso[1] && !strcmp(mode = iso[1], "text"))
    1.21  		init = "";
    1.22 -	do {
    1.23 -		if ((isoopen(mode) != -1 && ++noauto != 0) ||	// custom
    1.24 -		    isoopen("bzImage") != -1		|| 	// SliTaz
    1.25 -		    isoopen("vmlinuz") != -1		||	// misc
    1.26 -		    (isoopen("linux") != -1 && ++isknoppix != 0)) {
    1.27 -			magic = kver2ul(isokernel());
    1.28 -			break;
    1.29 -		}
    1.30 -	} while (isoopen("isolinux") != -1);		// Knoppix
    1.31 +	if (isoopen(mode) == -1 || ++noauto == 0)	// custom
    1.32 +		isoopen("bzImage");			// SliTaz
    1.33 +	magic = kver2ul(isokernel());
    1.34  	for (c = 0, x->curdirsize = 0xFFFF; isoreaddir() != -1;) {
    1.35  		if (strstr(x->filename, ".gz"))
    1.36  			strcpy(fallback, x->filename);
    1.37 @@ -99,7 +91,7 @@
    1.38  		strcpy(rootfs, x->filename);
    1.39  	}
    1.40  
    1.41 -	strcatb(buf_cmdline,"rw root=/dev/null autologin bootfrom=");
    1.42 +	strcatb(buf_cmdline,"autologin bootfrom=");
    1.43  	strcat(buf_cmdline,*iso);
    1.44  	if (magic < 0x20630)
    1.45  		init = ""; // Does not support multiple initramfs
    1.46 @@ -116,15 +108,10 @@
    1.47  		}
    1.48  	}
    1.49  	else if (magic != 0) {
    1.50 -		char *initrdfilename = fallback;
    1.51  		static const unsigned long initrddesc = 18L;
    1.52  
    1.53 -		if (rootfs[0]) {
    1.54 -			initrdfilename = rootfs;
    1.55 -			if (rootfs[6] != '.' && isoopen("rootfs.gz") != -1)
    1.56 -				addinitrd();	// for loram
    1.57 -		}
    1.58 -		if (isoopen(initrdfilename) != -1) {
    1.59 +		if (isoopen("rootfs.gz") != -1 ||
    1.60 +		    isoopen(rootfs[0] ? rootfs : fallback) != -1) {
    1.61  			addinitrd();
    1.62  		}
    1.63  		if (*init && isolseek(&initrddesc) != 0) {
    1.64 @@ -141,13 +128,6 @@
    1.65  		strcat(buf_cmdline,(char *)ultoa(magic));
    1.66  	}
    1.67  	load_initrds();
    1.68 -	if (isknoppix) {
    1.69 -		char *s = *iso;
    1.70 -		if (s[1] == ':')
    1.71 -			s += 2;
    1.72 -		for (; *s; s++)
    1.73 -			if (*s == '\\') *s = '/';
    1.74 -	}
    1.75  	close(x->fd);
    1.76  	boot_kernel();
    1.77  }