tiny-slitaz diff step5.php @ rev 7

Add suggested support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jan 05 17:39:36 2016 +0100 (2016-01-05)
parents 577e6e91216d
children af73cc7ea672
line diff
     1.1 --- a/step5.php	Wed Oct 07 23:37:02 2015 +0200
     1.2 +++ b/step5.php	Tue Jan 05 17:39:36 2016 +0100
     1.3 @@ -4,104 +4,108 @@
     1.4  {
     1.5  	return shell_exec("du -h ".$_POST['tmp_dir'].
     1.6  		"$file | awk '{ printf \"%s\",$1 }'");
     1.7 -	
     1.8  }
     1.9 - 
    1.10 +
    1.11  if (isset($_POST['toconfigure']) && $_POST['toconfigure'] == ""
    1.12      && $output == "") {
    1.13  	shell_exec("sudo ./helper --mkrootfs ".$_POST['tmp_dir']); 
    1.14  ?>
    1.15  
    1.16 -<a name="get"></a>
    1.17 -<h2>Get Tiny SliTaz files</h2>
    1.18 +<div class="box">
    1.19 +<h3 id="get">[Step 5/5] Get Tiny SliTaz files</h3>
    1.20  
    1.21  <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" name="config">
    1.22  
    1.23 -<?php	post_hidden(); ?>
    1.24 -<h3>Bootable images</h3>
    1.25 -<p>
    1.26 -<div align="center">
    1.27 -<input name="download" value="Floppy image" type="submit" />
    1.28 -&nbsp;
    1.29 -<input name="download" value="DOS/EXE" type="submit" />
    1.30 -<?php if (file_exists("/boot/isolinux/isolinux.bin")) { ?>
    1.31 -&nbsp;
    1.32 -<input name="download" value="ISO image" type="submit" />
    1.33 +	<?php	post_hidden(); ?>
    1.34 +
    1.35 +<table>
    1.36 +	<tr><td class="first">Bootable images:</td><td>
    1.37 +
    1.38 +<?php
    1.39 +      $title="Neither Windows nor emm386 support. Need a real mode DOS";
    1.40 +      if ((filesize($_POST['tmp_dir']."rootfs.gz") + 
    1.41 +	   filesize($_POST['tmp_dir']."fs/boot/bzImage")) <= 18*80*1024) {
    1.42 +	   $title .= ". Tip: can be splitted in several boot floppies too";
    1.43 +	    ?>
    1.44 +		<input name="download" value="Floppy image" type="submit"
    1.45 +		       title="You can use dd or rawrite to create the 1.44M floppy disk" />
    1.46  <?php } ?>
    1.47 -</div>
    1.48 -</p>
    1.49 +		<input name="download" value="DOS/EXE" type="submit"
    1.50 +		       title="<?php echo $title; ?>" />
    1.51 +<?php if (file_exists("/boot/isolinux/isolinux.bin")) {
    1.52 +	  $title="Can be burn on a CD-ROM or written on a USB Key / memory card";
    1.53 +	  if (file_exists("/usr/bin/iso2exe"))
    1.54 +	  	$title .= ", or renamed with the .exe suffix and run with DOS or Windows";
    1.55 +	   ?>
    1.56 +		<input name="download" value="ISO image" type="submit"
    1.57 +		       title="<?php echo $title; ?>" />
    1.58 +<?php } ?>
    1.59 +	</td></tr>
    1.60  
    1.61 -<h3>Files for bootloaders</h3>
    1.62 -<p>
    1.63 -<div align="center">
    1.64 -<input name="download" value="Kernel (<?php echo show_size("fs/boot/bzImage");
    1.65 - ?>)" type="submit" />
    1.66 -&nbsp;
    1.67 -<input name="download" value="Rootfs (<?php echo show_size("rootfs.gz");
    1.68 - ?>)" type="submit" />
    1.69 -</div>
    1.70 -</p>
    1.71  
    1.72 -<h3>Configuration info</h3>
    1.73 -<p>
    1.74 -<div align="center">
    1.75 -<input name="download" value="Configuration files" type="submit" />
    1.76 -&nbsp;
    1.77 -<input name="download" value="packages.conf (<?php 
    1.78 -echo show_size("fs/etc/packages.conf"); ?>)" type="submit" />
    1.79 -</div>
    1.80 -</p>
    1.81 +	<tr><td class="first">Files for bootloaders:</td><td>
    1.82 +
    1.83 +		<input name="download" value="Kernel (<?php echo show_size("fs/boot/bzImage");
    1.84 +					 ?>)" type="submit" />
    1.85 +		<input name="download" value="Rootfs (<?php echo show_size("rootfs.gz");
    1.86 +			 ?>)" title="For the initrd= parameter" type="submit" />
    1.87 +	</td></tr>
    1.88 +
    1.89 +
    1.90 +	<tr><td class="first">Configuration info:</td><td>
    1.91 +
    1.92 +		<input name="download" value="Configuration files" type="submit" />
    1.93 +		<input name="download" value="packages.conf (<?php 
    1.94 +					echo show_size("fs/etc/packages.conf"); ?>)" type="submit" />
    1.95 +	</td></tr>
    1.96 +
    1.97  
    1.98  <?php if (show_size("fs/boot/System.map") != "") { ?>
    1.99 -<h3>Debug info</h3>
   1.100 -<p>
   1.101 -<div align="center">
   1.102 -<input name="download" value="System.map (<?php echo show_size("fs/boot/System.map");
   1.103 - ?>)" type="submit" />
   1.104 -&nbsp;
   1.105 -<input name="download" value="linux.config (<?php echo show_size("fs/boot/config");
   1.106 - ?>)" type="submit" />
   1.107 -</div>
   1.108 -</p>
   1.109 -<p>
   1.110 -<div align="center">
   1.111 -<input name="download" value="busybox.config (<?php echo show_size("fs/boot/config-busybox");
   1.112 - ?>)" type="submit" />
   1.113 -&nbsp;
   1.114 -<input name="download" value="post_install.log (<?php echo show_size("post_install.log");
   1.115 - ?>)" type="submit" />
   1.116 -</div>
   1.117 -</p>
   1.118 +	<tr><td class="first">Debug info:</td><td>
   1.119 +
   1.120 +		<input name="download" value="System.map (<?php echo show_size("fs/boot/System.map");
   1.121 +					?>)" type="submit" />
   1.122 +		<input name="download" value="linux.config (<?php echo show_size("fs/boot/config");
   1.123 +					?>)" type="submit" />
   1.124 +		<br>
   1.125 +		<input name="download" value="busybox.config (<?php echo show_size("fs/boot/config-busybox");
   1.126 +					?>)" type="submit" />
   1.127 +		<input name="download" value="post_install.log (<?php echo show_size("post_install.log");
   1.128 +					?>)" type="submit" />
   1.129 +	</td></tr>
   1.130 +
   1.131  <?php } ?>
   1.132  
   1.133 +</table>
   1.134  </form>
   1.135 +</div>
   1.136  
   1.137  <h2>Going further</h2>
   1.138 -<p>
   1.139 -Tiny SliTaz should be smaller to have more functionality
   1.140 -and/or needs less RAM.<br />
   1.141 -The kernel can be <a href="http://elinux.org/Linux_Tiny">tuned/patched</a>
   1.142 -or you can use an earlier version.
   1.143 -</p>
   1.144 -<p>
   1.145 -You can test Tiny SliTaz without pre-historic hardware using qemu (need the ne module) :
   1.146 -</p>
   1.147 +
   1.148 +<p>Tiny SliTaz should be smaller to have more functionality and/or needs less
   1.149 +RAM.<br>
   1.150 +The kernel can be <a href="http://elinux.org/Linux_Tiny">tuned/patched</a> or
   1.151 +you can use an earlier version.</p>
   1.152 +
   1.153 +<p>You can test Tiny SliTaz without pre-historic hardware using qemu (need the
   1.154 +<tt>ne</tt> module):</p>
   1.155 +
   1.156  <pre>
   1.157  qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -fda slitaz.img
   1.158  </pre>
   1.159 -<p>
   1.160 -Or
   1.161 -</p>
   1.162 +
   1.163 +<p>Or</p>
   1.164 +
   1.165  <pre>
   1.166  qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -kernel kernel -initrd rootfs.gz /dev/null
   1.167  </pre>
   1.168 -<p>
   1.169 -And the executable file /etc/qemu-ifup:
   1.170 -</p>
   1.171 +
   1.172 +<p>And the executable file <code>/etc/qemu-ifup</code>:</p>
   1.173 +
   1.174  <pre>
   1.175  #!/bin/sh
   1.176  
   1.177 -tunctl -u $(id -un) -t $1                           
   1.178 +tunctl -u $(id -un) -t $1
   1.179  ifconfig $1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
   1.180  </pre>
   1.181