tiny-slitaz view step5.php @ rev 18

step5.php: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jul 22 09:09:36 2016 +0200 (2016-07-22)
parents af73cc7ea672
children 038499e4d7db
line source
1 <?php
3 function show_size($file)
4 {
5 return shell_exec("du -h ".$_POST['tmp_dir'].
6 "$file | awk '{ printf \"%s\",$1 }'");
7 }
9 if (isset($_POST['toconfigure']) && $_POST['toconfigure'] == ""
10 && $output == "") {
11 shell_exec("sudo ./helper --mkrootfs ".$_POST['tmp_dir']);
12 ?>
14 <div class="box">
15 <h3 id="get">[Step 5/5] Get Tiny SliTaz files</h3>
17 <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" name="config">
19 <?php post_hidden(); ?>
21 <table>
22 <tr><td class="first">Bootable images:</td><td>
24 <?php
25 $title="Neither Windows nor emm386 supported. Needs a real mode DOS";
26 if ((filesize($_POST['tmp_dir']."rootfs.gz") +
27 filesize($_POST['tmp_dir']."fs/boot/bzImage")) <= 18*80*1024) {
28 $title .= ". Tip: can be split in several boot floppies too";
29 ?>
30 <input name="download" value="Floppy image" type="submit"
31 title="You can use dd or rawrite to create the 1.44M floppy disk" />
32 <?php } ?>
33 <input name="download" value="DOS/EXE" type="submit"
34 title="<?php echo $title; ?>" />
35 <?php if (file_exists("/boot/isolinux/isolinux.bin")) {
36 $title="Can be burnt on to a CD-ROM or written on to a USB Key / memory card";
37 if (file_exists("/usr/bin/iso2exe"))
38 $title .= ", or renamed with the .exe suffix and run with DOS or Windows";
39 ?>
40 <input name="download" value="ISO image" type="submit"
41 title="<?php echo $title; ?>" />
42 <?php } ?>
43 </td></tr>
46 <tr><td class="first">Files for bootloaders:</td><td>
48 <input name="download" value="Kernel (<?php echo show_size("fs/boot/bzImage");
49 ?>)" type="submit" />
50 <input name="download" value="Rootfs (<?php echo show_size("rootfs.gz");
51 ?>)" title="For the initrd= parameter" type="submit" />
52 </td></tr>
55 <tr><td class="first">Configuration info:</td><td>
57 <input name="download" value="Configuration files" type="submit" />
58 <input name="download" value="packages.conf (<?php
59 echo show_size("fs/etc/packages.conf"); ?>)" type="submit" />
60 </td></tr>
63 <?php if (show_size("fs/boot/System.map") != "") { ?>
64 <tr><td class="first">Debug info:</td><td>
66 <input name="download" value="System.map (<?php echo show_size("fs/boot/System.map");
67 ?>)" type="submit" />
68 <input name="download" value="linux.config (<?php echo show_size("fs/boot/config");
69 ?>)" type="submit" />
70 <br>
71 <input name="download" value="busybox.config (<?php echo show_size("fs/boot/config-busybox");
72 ?>)" type="submit" />
73 <input name="download" value="post_install.log (<?php echo show_size("post_install.log");
74 ?>)" type="submit" />
75 </td></tr>
77 <?php } ?>
79 </table>
80 </form>
81 </div>
83 <h2>Going further</h2>
85 <p>Tiny SliTaz should be smaller to have more functionality and/or needs less
86 RAM.<br>
87 The kernel can be <a href="http://elinux.org/Linux_Tiny">tuned/patched</a> or
88 you can use an earlier version.</p>
90 <p>You can test Tiny SliTaz without pre-historic hardware using qemu (needs the
91 <tt>ne.ko</tt> module):</p>
93 <pre>
94 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -fda slitaz.img
95 </pre>
97 <p>Or</p>
99 <pre>
100 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -kernel kernel -initrd rootfs.gz /dev/null
101 </pre>
103 <p>And the executable file <code>/etc/qemu-ifup</code>:</p>
105 <pre>
106 #!/bin/sh
108 tunctl -u $(id -un) -t $1
109 ifconfig $1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
110 </pre>
112 <?php
113 }
114 ?>