slitaz-doc-wiki-data rev 60

Update pages folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun May 22 18:19:57 2011 +0000 (2011-05-22)
parents e10f370403eb
children 72ae3f275ee1
files pages/en/cookbook/cross.txt pages/en/cookbook/start.txt pages/en/cookbook/toolchain.txt pages/en/guides/bootguide.txt pages/en/guides/lowramcd.txt pages/en/guides/pxe.txt pages/en/guides/uncommoninst.txt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pages/en/cookbook/cross.txt	Sun May 22 18:19:57 2011 +0000
     1.3 @@ -0,0 +1,54 @@
     1.4 +====== Cross compilation ======
     1.5 +\\
     1.6 +
     1.7 +After SliTaz got new build tools for 4.0, we had to rebuild all packages and used this opportunity to cross compile as much as possible in the wok. There are many reasons: lots of user requests about Slitaz on ARM, prepare for the future and cross compile by default on our main build host aka Tank. Tank is a i686 machine and SliTaz targets i486 which is a more generic architecture and works on almost all X86 systems, so we enable cross compilation from a i686 build system for a i486 host system. This way we take advantage of Tank's power while we produce i486 binaries. If you look at the packages build log on Tank you will see:
     1.8 +
     1.9 +<code>
    1.10 +checking build system type... i686-slitaz-linux-gnu
    1.11 +checking host system type... i486-slitaz-linux-gnu
    1.12 +checking whether we are cross compiling... yes
    1.13 +</code>
    1.14 +
    1.15 +===--build, --host and --target===
    1.16 +
    1.17 +Build and host. These options are for cross-compiling. If you specify both options and BUILD_SYSTEM is different from HOST_SYSTEM, configure will prepare to cross-compile from BUILD_SYSTEM to be used on HOST_SYSTEM.
    1.18 +
    1.19 +To make it work we have 2 variables in cook.conf: BUILD_SYSTEM and HOST_SYSTEM. The build system is auto-detected by uname -m but can be changed to the native i486-slitaz-linux machine type tools. The host system is set with the ARCH variable also used in CFLAGS. In CFLAGS we have the GCC compiler options and by default we use -march=$ARCH but it must be changed for some architectures as explained below.
    1.20 +
    1.21 +The --target option is only used for building cross-compilers.
    1.22 +
    1.23 +===Current state and packages===
    1.24 +
    1.25 +While all main packages cross compile well, we still have some receipts to improve. But it may take some time, so for now we use a native i486 build for packages that don't compile. Instead of $CONFIGURE_ARGS we use: --build=$HOST_SYSTEM --host=$HOST_SYSTEM so it doesn't cross compile but builds with the native i486 toolchain, this doesn't screw anything since it is the default architecture, but we can't cross compile these packages for another arch like ARM.
    1.26 +
    1.27 +===Cross compiler and toolchain===
    1.28 +
    1.29 +If we want to be able to cook packages from a X86 machine for another architecture like ARM we need a cross compilation toolchain. A basic cross toolchain is: binutils and gcc. We need to make packages for cross compilers and use the --target option in configure. They are a first try which gives 2 example/test packages: cross-arm-binutils and cross-arm-gcc which provide a basic C compiler. After installation you can check the machine name with:
    1.30 +
    1.31 +<code>
    1.32 +$ arm-slitaz-linux-gcc -dumpmachine
    1.33 +</code>
    1.34 +
    1.35 +<note>
    1.36 +Actually the packages were committed to let others try them and make them work properly since we are still in a building stage. Also if you do change 
    1.37 +the receipt keep the CFLAGS unset since this should not be set when building a cross compiler.
    1.38 +</note>
    1.39 +
    1.40 +===ARM Note===
    1.41 +
    1.42 +cook.conf
    1.43 +<code>
    1.44 +ARCH="arm"
    1.45 +CFLAGS="-O2"
    1.46 +</code>
    1.47 +
    1.48 +===X86_64 Notes===
    1.49 +Notes about building natively on X86_64 and cross compiling for X86_64 machine.
    1.50 +
    1.51 +
    1.52 +cook.conf
    1.53 +<code>
    1.54 +ARCH="X86_64"
    1.55 +CFLAGS="-O2 -march=generic"
    1.56 +</code>
    1.57 +
     2.1 --- a/pages/en/cookbook/start.txt	Sun May 22 18:09:13 2011 +0000
     2.2 +++ b/pages/en/cookbook/start.txt	Sun May 22 18:19:57 2011 +0000
     2.3 @@ -7,7 +7,7 @@
     2.4  ==== Table of contents ====
     2.5  
     2.6      * [[en:cookbook:receipt|Receipts]]  - Receipts (recipes) for creating (cooking) SliTaz packages.
     2.7 -    * [[en:cookbook:wok|Wok]]  - Creating SliTaz packages from source using Tazwok. (Uses a receipt.)
     2.8 +    * [[en:cookbook:wok|Wok]]  - Creating SliTaz packages from source using Tazwok. (Uses a receipt).
     2.9      * [[en:cookbook:buildbot|Build Bot]] - Automated cooking, testing and reporting of Wok packages.
    2.10      * [[en:cookbook:buildhost|Build Host]]  - The SliTaz host.
    2.11      * [[en:cookbook:slitaztools|SliTaz Tools]]  - The Toolbox.
    2.12 @@ -16,6 +16,7 @@
    2.13      * [[en:cookbook:bootscripts|Boot Scripts]]  - The start-up and shut-down scripts.
    2.14      * [[en:cookbook:rootcd|Root cdrom (rootcd)]]  - Descriptions of files contained on the cdrom.
    2.15      * [[en:cookbook:toolchain|Toolchain]] - The SliTaz toolchain used to build the entire system.
    2.16 +    * [[en:cookbook:cross|Cross Compilation]] - Technical notes about cross compilation on SliTaz (i486, ARM, X86_64).
    2.17  ---- 
    2.18  \\
    2.19  ^  Page Review Section  ^^ 
     3.1 --- a/pages/en/cookbook/toolchain.txt	Sun May 22 18:09:13 2011 +0000
     3.2 +++ b/pages/en/cookbook/toolchain.txt	Sun May 22 18:19:57 2011 +0000
     3.3 @@ -1,11 +1,12 @@
     3.4  ====== Toolchain ======
     3.5  
     3.6  
     3.7 +
     3.8  The Toolchain is the set of packages used to build the entire system. It consists of Binutils, GCC, Linux API headers and the GNU libc aka Glibc. SliTaz has an annual development cycle, so the toolchain gets a huge update once a year just after a stable release. When the toolchain changes we must rebuild all packages to ensure quality and consistency. 
     3.9  
    3.10  On SliTaz you have 2 ways to rebuild a toolchain from scratch: Cookutils and Tazwok. Tazwok is historically the first packages builder for SliTaz and over time has evolved into a powerful tool that can rebuild the full system from scratch. More info: http://doc.slitaz.org/en:devnotes:new-tazwok-illustrated
    3.11  
    3.12 -Cookutils are the new tools, written from scratch as before and for SliTaz 4.0. The build tools needed an huge improvement since they were first written when SliTaz had 400-500 packages, when Cookutils was started SliTaz had 2960 packages, so the way to handle all these packages is even more complex than at the beginning of the project. Also the Cookutils have been written with simplicity and speed in mind and are used on the official SliTaz build host aka Tank. 
    3.13 +Cookutils are the new tools, written from scratch as before and for SliTaz 4.0. The build tools needed a huge improvement since they were first written when SliTaz had 400-500 packages, when Cookutils was started SliTaz had 2960 packages, so the way to handle all these packages is even more complex than at the beginning of the project. Also the Cookutils have been written with simplicity and speed in mind and are used on the official SliTaz build host aka Tank. 
    3.14  
    3.15  To rebuild the official toolchain with Cookutils you must use the package slitaz-toolchain. This package is used to install the toolchain in a development environment and builds the Toolchain in the correct order with 2 passes for binutils and GCC. You will find some info in the slitaz-toolchain receipt itself and after building we keep a note in /usr/share/doc/slitaz/toolchain.txt 
    3.16  
     4.1 --- a/pages/en/guides/bootguide.txt	Sun May 22 18:09:13 2011 +0000
     4.2 +++ b/pages/en/guides/bootguide.txt	Sun May 22 18:19:57 2011 +0000
     4.3 @@ -1,45 +1,62 @@
     4.4 +==== From BIOS to /etc/init.d/rcS ====
     4.5  <code>
     4.6 -              CPU
     4.7 -               |
     4.8 -               V
     4.9 -   ----------BIOS--------
    4.10 -  /             |         \
    4.11 -  V             |         |
    4.12 -Hard Disk       V         V
    4.13 -CD-ROM  <--- Floppy ---> PXE
    4.14 -USB             |         |
    4.15 - V        (set) V        /
    4.16 -  \             /       /
    4.17 -    Boot Sector        /
    4.18 -          \           /
    4.19 -           V         V
    4.20 -          - Boot loader -
    4.21 -         /               \
    4.22 -Frugal or Uncommon:  Installed: load
    4.23 -     Kernel+rootfs   Kernel only
    4.24 -        |                |
    4.25 -        V                |
    4.26 -    Run /init            V 
    4.27 -        |            Mount root
    4.28 -        V            filesystem  
    4.29 -    Create tmpfs         |
    4.30 -      /    |    \        |
    4.31 -     V     |     V       |
    4.32 -  Loram:   | Uncommon:   V
    4.33 -Mount aufs | run script  |
    4.34 -& squashfs | or driver + |
    4.35 -    |      | mount root  |
    4.36 -     \     |     /       |
    4.37 -      V    V    V        |
    4.38 - Switch to new root     /
    4.39 -         \             /
    4.40 -          \           /
    4.41 -           \         /
    4.42 -            V        V    
    4.43 -          Run /sbin/init
    4.44 -                 |
    4.45 -                 V
    4.46 -          Run /etc/init.d/rcS
    4.47 +                      CPU
    4.48 +                       |
    4.49 +                       V
    4.50 +   +------------------BIOS----------------+
    4.51 +   |             |            |           |
    4.52 +   V             V            V           V
    4.53 + Floppy      Hard Disk    Versatile      PXE (4)
    4.54 + set (3)    DVD/CD-ROM <- Floppy (2) -->  or
    4.55 +   |          USB key                  WEB boot
    4.56 +   V             V                        |
    4.57 +   +-------------+         +--------------+
    4.58 +          |                V              |
    4.59 +          V         PXE forwarder (5)     V
    4.60 +     Boot Sector           |              |
    4.61 +          |                V              |
    4.62 +          +-------------------------------+
    4.63 +                           |
    4.64 +                           V
    4.65 +             +------- Boot loader --------+
    4.66 +             |                            |
    4.67 +             V                            V
    4.68 +     Frugal/Uncommon(1):              Installed:
    4.69 +    load Kernel+initramfs          load Kernel only
    4.70 +             |                            |
    4.71 +             V                            V
    4.72 ++--------Run /init -------------+         |
    4.73 +|            |                  |     Mount root
    4.74 +|            V                  |     filesystem  
    4.75 +|      Create tmpfs             |         |
    4.76 +|     |            |            |         |
    4.77 +|     V            V            V         V
    4.78 +|  Loram(7):     Frugal:    Uncommon(1):  | 
    4.79 +| Mount aufs    populate    run script    |
    4.80 +| & squashfs     tmpfs    load modules(s) |
    4.81 +|     |            |        mount root    |
    4.82 +|     |            |            |         |
    4.83 +V     +------------+------------+         |
    4.84 +|                        |                |
    4.85 ++------+                 V                V
    4.86 +       |         Switch to new root       |
    4.87 +       |                 |                |
    4.88 +       |                 +----------------+
    4.89 + Tiny SliTaz(6):              |
    4.90 +       |                      V
    4.91 +       |               Run /sbin/init
    4.92 +       |                      |
    4.93 +       +----------------------+
    4.94 +                   |
    4.95 +                   V
    4.96 +          Run /etc/init.d/rcS       
    4.97 +           from /etc/inittab
    4.98 +</code>
    4.99  
   4.100 -(*) Uncommon is LVM, RAID, crypto, loop or subdir mount with preinit rootfs
   4.101 -</code>
   4.102 \ No newline at end of file
   4.103 +  - Uncommon is LVM, RAID, crypto, loop or subdir mount with preinit rootfs, see http://doc.slitaz.org/en:guides:uncommoninst
   4.104 +  - Versatile boot floppy - http://mirror.slitaz.org/boot/floppy-grub4dos
   4.105 +  - Boot floppy set - http://mirror.slitaz.org/floppies/
   4.106 +  - LAN PXE or WEB boot, see http://doc.slitaz.org/en:guides:pxe
   4.107 +  - gpxe.pxe, see http://doc.slitaz.org/en:guides:pxe#advanced-web-booting-configuration
   4.108 +  - Tiny slitaz, see http://tiny.slitaz.org/
   4.109 +  - Lowram CD, see http://doc.slitaz.org/en:guides:lowramcd
   4.110 \ No newline at end of file
     5.1 --- a/pages/en/guides/lowramcd.txt	Sun May 22 18:09:13 2011 +0000
     5.2 +++ b/pages/en/guides/lowramcd.txt	Sun May 22 18:19:57 2011 +0000
     5.3 @@ -127,7 +127,7 @@
     5.4  Meta flavors are supported; you can loramize a slitaz-3in1.iso !
     5.5  
     5.6  ===== And what to do with only 8MB RAM? =====
     5.7 -Try Tiny Slitaz : http://pizza.slitaz.org/tiny/ !
     5.8 +Try Tiny Slitaz : http://tiny.slitaz.org/ !
     5.9  ---- 
    5.10  \\
    5.11  ^  Page Review Section  ^^ 
     6.1 --- a/pages/en/guides/pxe.txt	Sun May 22 18:09:13 2011 +0000
     6.2 +++ b/pages/en/guides/pxe.txt	Sun May 22 18:19:57 2011 +0000
     6.3 @@ -78,7 +78,7 @@
     6.4  You can modify the URL thus:
     6.5  <file>
     6.6  title Slitaz Web
     6.7 -  kernel /boot/gpxe ip=192.168.0.12/24 gw=192.168.0.1 dns=192.168.0.1 url=ip=192.168.0.12/24 gw=192.168.0.1
     6.8 +  kernel /boot/gpxe ip=192.168.0.12/24 gw=192.168.0.1 dns=192.168.0.1 ip=192.168.0.12/24 gw=192.168.0.1
     6.9    dns=192.168.0.1 url=http://mirror.slitaz.org/pxe/pxelinux.0
    6.10  </file>
    6.11  
     7.1 --- a/pages/en/guides/uncommoninst.txt	Sun May 22 18:09:13 2011 +0000
     7.2 +++ b/pages/en/guides/uncommoninst.txt	Sun May 22 18:19:57 2011 +0000
     7.3 @@ -4,6 +4,7 @@
     7.4  
     7.5  The following configurations are using the SliTaz 4.0 boot loader **grub4dos-linux**.
     7.6  
     7.7 +Most kernel command line arguments are processed by [[http://hg.slitaz.org/wok/file/tip/busybox/stuff/init|/init]].
     7.8  ===== Frugal install =====
     7.9  
    7.10  You don't need a special partition, the system runs in RAM like a Live CD...