A Quick introduction on Toolchain

What is a Toolchain?

Its a set of tools linked together by specific stages which can be used to run on a specific machine.
It contains tools for compiling, debugging , binary file manipulation and analysis.
There are pre-built toolchain available in internet. We can build our own using automated tool chain build tools or from scratch.

What are the types of Toolchain available?

Tool chains are run on 3 machine types
Build – The machine where the tool chain is first built.
Host – The machine where the tool chain is used to generate the target binary.
Target – The machine where the target binary is run.

Based on the above below are the Toolchain types
Native – The build, host and target are the same architecture. E.G:- The GCC compiler coming with RedHat x86 version
Cross Compiled – The build and host are same architecture, but the target is different. E.G:- Using x86 GCC creating a cross compiled GCC which generates binary to run on an ARM processor.
Cross Native – The host and target are of the same architecture. E.G;- Using x86 GCC create a cross native arm GCC, which can be used in an ARM Linux OS to generate binary which runs on ARM processor.
Canadian Build – The architecture for all the build, host and target differs. E.G:- Using X86 GCC create an ARM GCC which generates binary to run on a PPC machine. In this case build and target can be same architecture.

What are the Toolchain components?
The main components are
Binutils – as,ld,readelf etc
Compiler – gcc,g++ etc
C library – glibc, uclibc etc
Debugger – gdb
Kernel – headers

What are the stages in building a Toolchain?
1. Download sources for the components
2. Set the environment variables for the Toolchain build. e.g:- setting the build, host, target architecture and intermediate installation directories.
3. Build first the binutils
4. Build the bootstrap gcc with options –with-gnu-as –with-gnu-ld to instruct the compiler to use binutils assembler and linker than native assembler and linker.
5. Build glibc
6. Build gcc again with newly build glibc with options –with-gnu-as –with-gnu-ld to instruct the compiler to use binutils assembler and linker than native
7. Build gcc again with newly build glibc with options –with-gnu-as –with-gnu-ld to instruct the compiler to use binutils assembler and linker than native. This is to compare the binaries and make sure you are getting the same output and no compiler bug.
8. Use the Toolchain to build your application.
9. Run your application on the target machine.

What are the options for building a Toolchain?
Option 1: Build your own
Option 2: Prebuilt Toolchain. e.g:- CodeSourcery, Linoro(ARM) etc
Option 3: Automated Toolchain build systems. e.g:- Buildroot, Open ADK, crosstool-NG

Note:- The option 2 and 3 helps in quick development as the dependencies between the Toolchain components will be taken care by the maintainers of the Toolchain build systems.

Internet of Things vs Internet of Everything

Internet of things deals with physical objects. Late in the 1990, most of the objects connected to the internet were immovable objects. E.g:- Desktop. In the recent years more number of devices got connected to the network which includes movable devices. E.g:- Mobile phones. The requirement of the data stored, speed and transmitted increased in millionth times. Internet of things is the technology which is planned to bring all the physical objects to the network. Analogy all the physical objects to be made smart devices. Every device will be identified with a unique ID and remotely managed through devices like mobile applications etc.

Internet of everything deals with people, process, things and data. The things here is the Internet of things. the entire system is viewed and managed smartly and remotely. This requires integration of people, process, things and data together. This can be applied to any Industry.

Emulator vs Virtualization

Emulator does emulate a real hardware. This could be board or CPU or any hardware device. There is a cost associated with the performance when an emulator is used as emulator runs on a user space as a program. Qemu is one of the most used emulator to emulate a board or CPU.

Virtualization virtualise the real hardware. The real hardware is virtually shared by the guest operating system. Multiple types of virtualization possible. VMWare ESX is one of the popular virtualization software. With Intel hardware support the virtualization software can perform very similar to a single system and can make use of the system resources to its maximum.

Emulator vs Simulator

A simulator models an application while an emulator replicates the usage of an original system.

A simulator mimics the act of something. e.g:- flight simulator.

An emulator does the same thing as the real system does. The result is the same as the output of the real system. e.g:- Virtual PC.

Page 2 of 177
1 2 3 4 177