tiny-slitaz view step5.php @ rev 5

refresh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Oct 07 23:37:02 2015 +0200 (2015-10-07)
parents 55f97ee147e8
children ac214416e736
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 }'");
8 }
10 if (isset($_POST['toconfigure']) && $_POST['toconfigure'] == ""
11 && $output == "") {
12 shell_exec("sudo ./helper --mkrootfs ".$_POST['tmp_dir']);
13 ?>
15 <a name="get"></a>
16 <h2>Get Tiny SliTaz files</h2>
18 <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" name="config">
20 <?php post_hidden(); ?>
21 <h3>Bootable images</h3>
22 <p>
23 <div align="center">
24 <input name="download" value="Floppy image" type="submit" />
25 &nbsp;
26 <input name="download" value="DOS/EXE" type="submit" />
27 <?php if (file_exists("/boot/isolinux/isolinux.bin")) { ?>
28 &nbsp;
29 <input name="download" value="ISO image" type="submit" />
30 <?php } ?>
31 </div>
32 </p>
34 <h3>Files for bootloaders</h3>
35 <p>
36 <div align="center">
37 <input name="download" value="Kernel (<?php echo show_size("fs/boot/bzImage");
38 ?>)" type="submit" />
39 &nbsp;
40 <input name="download" value="Rootfs (<?php echo show_size("rootfs.gz");
41 ?>)" type="submit" />
42 </div>
43 </p>
45 <h3>Configuration info</h3>
46 <p>
47 <div align="center">
48 <input name="download" value="Configuration files" type="submit" />
49 &nbsp;
50 <input name="download" value="packages.conf (<?php
51 echo show_size("fs/etc/packages.conf"); ?>)" type="submit" />
52 </div>
53 </p>
55 <?php if (show_size("fs/boot/System.map") != "") { ?>
56 <h3>Debug info</h3>
57 <p>
58 <div align="center">
59 <input name="download" value="System.map (<?php echo show_size("fs/boot/System.map");
60 ?>)" type="submit" />
61 &nbsp;
62 <input name="download" value="linux.config (<?php echo show_size("fs/boot/config");
63 ?>)" type="submit" />
64 </div>
65 </p>
66 <p>
67 <div align="center">
68 <input name="download" value="busybox.config (<?php echo show_size("fs/boot/config-busybox");
69 ?>)" type="submit" />
70 &nbsp;
71 <input name="download" value="post_install.log (<?php echo show_size("post_install.log");
72 ?>)" type="submit" />
73 </div>
74 </p>
75 <?php } ?>
77 </form>
79 <h2>Going further</h2>
80 <p>
81 Tiny SliTaz should be smaller to have more functionality
82 and/or needs less RAM.<br />
83 The kernel can be <a href="http://elinux.org/Linux_Tiny">tuned/patched</a>
84 or you can use an earlier version.
85 </p>
86 <p>
87 You can test Tiny SliTaz without pre-historic hardware using qemu (need the ne module) :
88 </p>
89 <pre>
90 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -fda slitaz.img
91 </pre>
92 <p>
93 Or
94 </p>
95 <pre>
96 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -kernel kernel -initrd rootfs.gz /dev/null
97 </pre>
98 <p>
99 And the executable file /etc/qemu-ifup:
100 </p>
101 <pre>
102 #!/bin/sh
104 tunctl -u $(id -un) -t $1
105 ifconfig $1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
106 </pre>
108 <?php
109 }
110 ?>