/tools and /cross-tools

From CLFS-HINTS

Jump to: navigation, search

Contents

Introduction

The tools and the cross-tools are needed to build the system from a clean environment. Below is an explanation of the tools and the cross-tools.

Cross-Tools

After retrieving the source tarballs, retrieving patches, and establishing the environment, the next part of the CLFS system build is the cross-tools. Since different architectures have different instruction sets and different data orders, we need to build a set of sanitized tools that will run on the target architecture. The cross-tools are used to build the tools that will run on the target architecture.

For example, on the Intel/AMD architectures, the data is fed in before the instruction (4 add) where on the Motorola architecture, the order is instruction, then data (add 4). Similarly, we can build a 64 bit host on a 32 bit architecture, or a 32 bit system on a pure 64 bit host.

The cross-tools are built so that they will run on the host system, but the will compile the target architecture machine code.

Tools

The tools are built from the cross-tools, and they are built to run on the target system. They are sanitized so that they can be taken to the new system with out any dependence on the host system. The tools are taken into the clean environment, either the booted temporary system, or into the chroot "jail." From here, we can start to build the final system. Once the final system is built, the tools can be removed and or saved for another build.

An Analogy for the Tools and Cross-Tools

Pretend, for a moment, that we wish to build the International Space Station (ISS). The problem we have is the tools we use on earth (host system) will not work in space (target system). We need a special set of tools that will work in the space environment. The cross-tools are built to work in earth's environment, but they build the space tools. Thus, we use the earth tools to build the space tools. When the space tools are complete, we take them into space, the different architecture, and start building the ISS, the new system.


Return to Main Page

Personal tools