tiny-slitaz view step5.php @ rev 2
Auto-update files.list.lzma (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Aug 21 18:15:37 2012 +0200 (2012-08-21) |
parents | |
children | 577e6e91216d |
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 <?php if (file_exists("/boot/isolinux/isolinux.bin")) { ?>
26
27 <input name="download" value="ISO image" type="submit" />
28 <?php } ?>
29 </div>
30 </p>
32 <h3>Files for bootloaders</h3>
33 <p>
34 <div align="center">
35 <input name="download" value="Kernel (<?php echo show_size("fs/boot/bzImage");
36 ?>)" type="submit" />
37
38 <input name="download" value="Rootfs (<?php echo show_size("rootfs.gz");
39 ?>)" type="submit" />
40 </div>
41 </p>
43 <h3>Configuration info</h3>
44 <p>
45 <div align="center">
46 <input name="download" value="Configuration files" type="submit" />
47
48 <input name="download" value="packages.conf (<?php
49 echo show_size("fs/etc/packages.conf"); ?>)" type="submit" />
50 </div>
51 </p>
53 <?php if (show_size("fs/boot/System.map") != "") { ?>
54 <h3>Debug info</h3>
55 <p>
56 <div align="center">
57 <input name="download" value="System.map (<?php echo show_size("fs/boot/System.map");
58 ?>)" type="submit" />
59
60 <input name="download" value="linux.config (<?php echo show_size("fs/boot/config");
61 ?>)" type="submit" />
62 </div>
63 </p>
64 <p>
65 <div align="center">
66 <input name="download" value="busybox.config (<?php echo show_size("fs/boot/config-busybox");
67 ?>)" type="submit" />
68
69 <input name="download" value="post_install.log (<?php echo show_size("post_install.log");
70 ?>)" type="submit" />
71 </div>
72 </p>
73 <?php } ?>
75 </form>
77 <h2>Going further</h2>
78 <p>
79 Tiny SliTaz should be smaller to have more functionality
80 and/or needs less RAM.<br />
81 The kernel can be <a href="http://elinux.org/Linux_Tiny">tuned/patched</a>
82 or you can use an earlier version.
83 </p>
84 <p>
85 You can test Tiny SliTaz without pre-historic hardware using qemu:
86 </p>
87 <pre>
88 qemu -cpu 486 -m 8 -net nic,model=ne2k_isa -net tap -fda slitaz.img
89 </pre>
90 <p>
91 Or
92 </p>
93 <pre>
94 qemu -cpu 486 -m 8 -net nic,model=ne2k_isa -net tap -snapshot \
95 -kernel kernel -initrd rootfs.gz /dev/zero
96 </pre>
97 <p>
98 And the executable file /etc/qemu-ifup:
99 </p>
100 <pre>
101 #!/bin/sh
103 if [ -x /usr/sbin/openvpn ]; then
104 openvpn --mktun --dev $1 --user `id -un`
105 else
106 tunctl -u `id -un` -t $1
107 fi
108 ifconfig $1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
109 </pre>
110 <p>
111 You can also update the file /etc/resolv.conf on the Tiny SliTaz guest with your
112 nameserver(s) and enable the ip routing on your desktop:
113 </p>
114 <pre>
115 # echo 1 > /proc/sys/net/ipv4/ip_forward
116 # yes y | tazpkg get-install iptables
117 # iptables -t nat -A POSTROUTING -j MASQUERADE
118 </pre>
120 <?php
121 }
122 ?>