tiny-slitaz view step5.php @ rev 26

Take care of busybox config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Sep 07 11:54:26 2019 +0200 (2019-09-07)
parents b58beb683c22
children cb1743f12df8
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 <?php if (show_size("fs/boot/memtest") != "") { ?>
53 <input name="download" value="Memtest (<?php echo show_size("fs/boot/memtest");
54 ?>)" type="submit" />
55 <?php } ?>
56 <?php if (show_size("fs/boot/gpxe") != "") { ?>
57 <input name="download" value="GPXE (<?php echo show_size("fs/boot/gpxe");
58 ?>)" type="submit" />
59 <?php } ?>
60 <?php if (show_size("fs/boot/ipxe") != "") { ?>
61 <input name="download" value="IPXE (<?php echo show_size("fs/boot/ipxe");
62 ?>)" type="submit" />
63 <?php } ?>
64 </td></tr>
67 <tr><td class="first">Configuration info:</td><td>
69 <input name="download" value="Configuration files" type="submit" />
70 <input name="download" value="packages.conf (<?php
71 echo show_size("fs/etc/packages.conf"); ?>)" type="submit" />
72 </td></tr>
75 <?php if (show_size("fs/boot/System.map") != "") { ?>
76 <tr><td class="first">Debug info:</td><td>
78 <input name="download" value="System.map (<?php echo show_size("fs/boot/System.map");
79 ?>)" type="submit" />
80 <input name="download" value="linux.config (<?php echo show_size("fs/boot/config");
81 ?>)" type="submit" />
82 <br>
83 <input name="download" value="busybox.config (<?php echo show_size("fs/boot/config-busybox");
84 ?>)" type="submit" />
85 <input name="download" value="post_install.log (<?php echo show_size("post_install.log");
86 ?>)" type="submit" />
87 </td></tr>
89 <?php } ?>
91 </table>
92 </form>
93 </div>
95 <h2>Going further</h2>
97 <p>Tiny SliTaz should be smaller to have more functionality and/or needs less
98 RAM.<br>
99 The kernel can be <a href="http://elinux.org/Linux_Tiny">tuned/patched</a> or
100 you can use an earlier version.</p>
102 <p>You can test Tiny SliTaz without pre-historic hardware using qemu (needs the
103 <tt>ne.ko</tt> module):</p>
105 <pre>
106 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -fda slitaz.img
107 </pre>
109 <p>Or</p>
111 <pre>
112 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -kernel kernel -initrd rootfs.gz /dev/null
113 </pre>
115 <p>And the executable file <code>/etc/qemu-ifup</code>:</p>
117 <pre>
118 #!/bin/sh
120 tunctl -u $(id -un) -t $1
121 ifconfig $1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
122 </pre>
124 <?php
125 }
126 ?>