Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:devnotes:cook-flavor-from-scratch [2011/01/23 02:18] gokhlayeh [Cook toolchain] |
en:devnotes:cook-flavor-from-scratch [2011/02/22 22:59] (current) linea tiny edits |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | Welcome to this howto ! it's the base for a second scratchbook, which explain how too recompile entirely SliTaz from scratch including toolchain. All the job will be done using tazwok-experimental (actually in Alpha state). Even if the scripts have some major issue, the steps explained here should do the job without problems. Thanks to report any problem to the author (tazpkg info tazwok-experimental give you my mail). | + | Welcome to this howto! it's the base for a second scratchbook which explains how to recompile SliTaz entirely from scratch including the toolchain. All jobs will be done using tazwok-experimental (actually in Alpha state). Even if the scripts have some major issues, the steps explained here should do the job without too many problems. Please report any problems to the author (tazpkg info tazwok-experimental gives you my mail). |
- | Having some knowledge about how legacies SliTaz tools and basics commands works will help you to understand what's going on in this howto. Hoverwhere, simply copy/paste the given command lines will probably works. | + | Having some knowledge about how the legacy SliTaz tools and basic commands work will help you to understand what's going on in this howto. However, simply copying/pasting the given command lines will probably work. |
==== Explanation ==== | ==== Explanation ==== | ||
- | Tazwok now provide tools to cook the [[en:terms:W?&#wok|wok]] from scratch using a minimal chroot. You have to use a special version of the wok, called wok-experimental. It contains the needed patches, which should be applied ontop of the wok cooking. Explanations about how to obtain the wok experimental are here : [[en:devnotes:prepare-experimental|Prepare experimental wok]]. | + | Tazwok now provides tools to cook the [[en:terms:W?&#wok|wok]] from scratch using a minimal chroot. You have to use a special version of the wok called wok-experimental. It contains the needed patches which should be applied on top of the cooking wok. Explanations about how to obtain the wok experimental are here: [[en:devnotes:prepare-experimental|Prepare experimental wok]]. |
**Tools needed** | **Tools needed** | ||
- | * A functionnal cooking system (live or installed); you also can use the [[http://people.slitaz.org/~gokhlayeh/experimental/iso/slitaz-experimental-base.iso|slitaz-experimental-base]] ISO. | + | * A functional cooking system (live or installed), you also can use the [[http://people.slitaz.org/~gokhlayeh/experimental/iso/slitaz-experimental-base.iso|slitaz-experimental-base]] ISO. |
- | * tazwok-experimental-0.0.2, tazchroot-0.0.1 and libtaz-0.0.1. Note: installing tazwok-experimental remove tazwok legacy. | + | * tazwok-experimental-0.0.2, tazchroot-0.0.1 and libtaz-0.0.1. Note: installing tazwok-experimental removes tazwok legacy. |
* An internet connection to download sources. | * An internet connection to download sources. | ||
**Steps** | **Steps** | ||
- | * Make the chroot (in this how-to we use the packages of the new toolchain from the experimental repository; but this should works with cooking toolchain). | + | * Make the chroot (in this how-to we use the packages of the new toolchain from the experimental repository; but this should work with the cooking toolchain). |
- | * Cook a temporary toolchain : it's the cross-compile toolchain which will cook the "real" toolchain (the packaged one) without linking anything to the host system. | + | * Cook a temporary toolchain: it's a cross-compiled toolchain which will cook the "real" toolchain (the packaged one) without linking anything to the host system. |
* Cook the definitive toolchain. | * Cook the definitive toolchain. | ||
- | * Cook some other package of one of SliTaz flavors. | + | * Cook some of the other packages of one of the SliTaz flavors. |
* Create the iso. | * Create the iso. | ||
* Burn, boot & enjoy :). | * Burn, boot & enjoy :). | ||
Line 27: | Line 27: | ||
==== Install the tools ==== | ==== Install the tools ==== | ||
- | <note tip>Note: all following commands should be executed as root. You don't have to add the experimental repository if you wish to use the cooking toolchain.</note> | + | <note tip>Note: all the following commands should be executed as root. You don't have to add the experimental repository if you wish to use the cooking toolchain.</note> |
Add the cooking-experimental repository as undigest: | Add the cooking-experimental repository as undigest: | ||
Line 34: | Line 34: | ||
</code> | </code> | ||
- | Give it priority over main repository: | + | Give it priority over the main repository: |
<code> | <code> | ||
echo experimental > /var/lib/tazpkg/priority | echo experimental > /var/lib/tazpkg/priority | ||
</code> | </code> | ||
- | Install the cook tools: | + | Install the cooking tools: |
<code> | <code> | ||
tazpkg get-install tazwok-experimental | tazpkg get-install tazwok-experimental | ||
Line 47: | Line 47: | ||
==== Cook toolchain ==== | ==== Cook toolchain ==== | ||
- | <note tip>Following command-lines works for a wok at: /home/slitaz/experimental/wok. If you putted the wok elsewhere, you can use the option --SLITAZ_DIR=adress; where address is equivalent to /home/slitaz. This option must be used each time --SLITAZ_VERSION is used. You can also define SLITAZ_VERSION & SLITAZ_DIR globally using /etc/slitaz/slitaz.conf.</note> | + | <note tip>The following command-lines work for a wok at: /home/slitaz/experimental/wok. If you put the wok elsewhere, you can use the option --SLITAZ_DIR=address; where the address is equivalent to /home/slitaz. This option must be used each time --SLITAZ_VERSION is used. You can also define SLITAZ_VERSION & SLITAZ_DIR globally using /etc/slitaz/slitaz.conf.</note> |
Configure the //chroot//: | Configure the //chroot//: | ||
Line 54: | Line 54: | ||
</code> | </code> | ||
- | If you have at least 1GB RAM free you can put the minimal chroot in RAM speed-up cooking process: | + | If you have at least 1GB RAM free you can put the minimal chroot in RAM speeding-up the cooking process: |
<code> | <code> | ||
sed 's~chroot_dir=.*~chroot_dir=/tmp/chroot-experimental~' -i /home/slitaz/experimental/tazchroot.conf | sed 's~chroot_dir=.*~chroot_dir=/tmp/chroot-experimental~' -i /home/slitaz/experimental/tazchroot.conf | ||
Line 64: | Line 64: | ||
</code> | </code> | ||
- | At the end of this operation, the chroot should be removed. If you had modified it's adress before, you have to do this manually : | + | At the end of this operation the chroot should be removed. If you have modified its address before, you have to do this manually: |
<code> | <code> | ||
rm -r /tmp/chroot-experimental | rm -r /tmp/chroot-experimental | ||
</code> | </code> | ||
- | Toolchain package are now ready to be used. They actually are in the packages-incoming repository. If all was cooked fine it's possible to push them to the classical packages directory using : | + | Toolchain packages are now ready to be used. They're actually are in the packages-incoming repository. If all was cooked fine it's possible to push them to the classical packages directory using: |
<code> | <code> | ||
tazwok check-incoming --SLITAZ_VERSION=experimental | tazwok check-incoming --SLITAZ_VERSION=experimental | ||
Line 85: | Line 85: | ||
</code> | </code> | ||
- | Recook toolchain packages except core (linux-api-headers/glibc/binutils/gcc) over itself to consolidate it; in fact it's not really needed with actual configuration but it's generally good to do to solve loop dependencies. It warrants consistency of the toolchain before and after an update of non-core toolchain packages. Note that core-toolchain should never be updated this way, but by re-using cook-toolchain script. | + | Recook the toolchain packages except core (linux-api-headers/glibc/binutils/gcc) over themselves to consolidate it; in fact it's not really needed with an actual configuration but it's generally good to do to solve loop dependencies. It warrants consistency of the toolchain before and after an update of non-core toolchain packages. Note that core-toolchain should never be updated in this way - but by reusing the cook-toolchain script: |
<code> | <code> | ||
tazwok chroot --SLITAZ_VERSION=experimental | tazwok chroot --SLITAZ_VERSION=experimental | ||
Line 101: | Line 101: | ||
==== Cook packages of a flavor ==== | ==== Cook packages of a flavor ==== | ||
- | First you need datas about cooking flavors: | + | First you need data about cooking flavors: |
<code> | <code> | ||
cd /home/slitaz/experimental/flavors | cd /home/slitaz/experimental/flavors | ||
Line 107: | Line 107: | ||
</code> | </code> | ||
- | Create chroot and enter into it: | + | Generate the cooklist for a given flavor. Note: for the next step, use the chosen flavor name instead of FLAVOR in the command line: |
- | <code> | + | |
- | tazwok chroot --SLITAZ_VERSION=experimental | + | |
- | </code> | + | |
- | + | ||
- | Generate the cooklist for a given flavor. Note: for next, use the choosen flavor name instead of FLAVOR in the command line. | + | |
<code> | <code> | ||
tazwok gen-cooklist --list=/home/slitaz/experimental/flavors/FLAVOR/packages.list > /tmp/FLAVOR.list | tazwok gen-cooklist --list=/home/slitaz/experimental/flavors/FLAVOR/packages.list > /tmp/FLAVOR.list | ||
Line 126: | Line 121: | ||
- | The cooklist is now ready, to create the packages: | + | The cooklist is now ready to create the packages: |
<code> | <code> | ||
tazwok cook-list /tmp/FLAVOR.list | tazwok cook-list /tmp/FLAVOR.list | ||
Line 136: | Line 131: | ||
</code> | </code> | ||
- | <note tip>You can repeat theses steps each time you wich to add new packages in your repository.</note> | + | <note tip>You can repeat these steps each time you wish to add new packages to your repository.</note> |
Still in chroot for the next step. | Still in chroot for the next step. | ||
Line 142: | Line 137: | ||
==== Create the ISO ==== | ==== Create the ISO ==== | ||
- | Actually tazlito use /home/slitaz/flavors. Create a symbolic link: | + | Actually tazlito uses /home/slitaz/flavors. Create a symbolic link: |
<code> | <code> | ||
ln -s /home/slitaz/experimental/flavors /home/slitaz | ln -s /home/slitaz/experimental/flavors /home/slitaz | ||
Line 154: | Line 149: | ||
</code> | </code> | ||
- | Configure you're ISO to use you're local repository: | + | Configure your ISO to use your local repository: |
<code> | <code> | ||
mkdir -p rootfs/var/lib/tazpkg | mkdir -p rootfs/var/lib/tazpkg | ||
Line 181: | Line 176: | ||
</code> | </code> | ||
- | Save ISO in your home: | + | Save ISO in your home dir: |
<code> | <code> | ||
mv /home/slitaz/distro/slitaz-FLAVOR.iso /home/slitaz/distro/slitaz-FLAVOR.md5 /home/slitaz/experimental/iso | mv /home/slitaz/distro/slitaz-FLAVOR.iso /home/slitaz/distro/slitaz-FLAVOR.md5 /home/slitaz/experimental/iso |