1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/docs/overview.txt Tue Apr 10 15:04:33 2007 +0000
1.3 @@ -0,0 +1,108 @@
1.4 +File.........: overview.txt
1.5 +Content......: Overview of how ct-ng works.
1.6 +Copyrigth....: (C) 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
1.7 +License......: see COPYING in the root of this package
1.8 +________________
1.9 + /
1.10 +Introduction /
1.11 +_____________/
1.12 +
1.13 +crosstool-NG aims at building toolchains. Toolchains are an essential component
1.14 +in a software development project. It will compile, assemble and link the code
1.15 +that is being developped. Some pieces of the toolchain will eventually end up
1.16 +in the resulting binary/ies: static libraries are but an example.
1.17 +
1.18 +So, a toolchain is a very sensitive piece of software, as any bug in one of the
1.19 +components, or a poorly configured component, can lead to execution problems,
1.20 +ranging from poor performance, to applications ending unexpectedly, to
1.21 +mis-behaving software (which more than often is hard to detect), to hardware
1.22 +damage, or even to human risks (which is more than regretable).
1.23 +
1.24 +Toolchains are made of different piece of software, each being quite complex
1.25 +and requiring specially crafted options to build and work seamlessly. This
1.26 +is usually not that easy, even in the not-so-trivial case of native toolchains.
1.27 +The work reaches a higher degree of complexity when it comes to cross-
1.28 +compilation, where it can becomes quite a nightmare...
1.29 +
1.30 +Some cross-toolchain exits on the internet, and can be used for general
1.31 +development, but they have a number of limitations:
1.32 + - they can be general purpose, in that they are configured for the majority:
1.33 + no optimisation for your specific target,
1.34 + - they can be prepared for a specific target and thus are not easy to use,
1.35 + nor optimised for, or even supporting your target,
1.36 + - they often are using ageing components (compiler, C library, etc...) not
1.37 + supporting special features of your shiny new processor;
1.38 +On the other side, these toolchain offer some advantages:
1.39 + - they are ready to use and quite easy to install and setup,
1.40 + - they are proven if used by a wide community.
1.41 +
1.42 +But once you want to get all the juice out of your specific hardware, you will
1.43 +want to build your own toolchain. This is where crosstool-ng comes into play.
1.44 +
1.45 +There are also a number of tools that builds toolchains for specific needs,
1.46 +which is not really scalable. Examples are:
1.47 + - buildroot (buildroot.uclibc.org) whose main puprpose is to build root file
1.48 + systems, hence the name. But once you have your toolchain with buildroot,
1.49 + part of it is installed in the root-to-be, so if you want to build a whole
1.50 + new root, you either have to save the existing one as a template and
1.51 + restore it later, or restart again from scratch. This is not convenient,
1.52 + - ptxdist (www.pengutronix.de/software/ptxdist), whose purpose is very
1.53 + similar to buildroot,
1.54 + - other projects (openembeded.org for example), which is again used to
1.55 + build root file systems.
1.56 +
1.57 +crosstool-NG is really targetted at building toolchains, and only toolchains.
1.58 +It is then up to you to use it the way you want.
1.59 +
1.60 +___________
1.61 + /
1.62 +History /
1.63 +________/
1.64 +
1.65 +crosstool was first 'conceived' by Dan Kegel, which offered it to the community,
1.66 +as a set of scripts, a repository of patches, and some pre-configured, general
1.67 +purpose setup files to be used to configure crosstool. This is available at
1.68 +www.kegel.com/crosstool, and the subversion repository is hosted on google at
1.69 +http://code.google.com/p/crosstool/.
1.70 +
1.71 +At the time of writing, crosstool only supports building with one C library,
1.72 +namely glibc, and one C compiler, gcc; it is cripled with historical support
1.73 +for legacy components, and is some kind of a mess to upgrade.
1.74 +
1.75 +I once managed to add support for uClibc-based toolchains, but it did not make
1.76 +into mainline, mostly because I don't have time to port the patch forward to
1.77 +the new versions, due in part to the big effort it was taking.
1.78 +
1.79 +So I decided to clean up crosstool in the state it was, re-order the things
1.80 +in place, and add appropriate support for what I needed, that is uClibc
1.81 +support.
1.82 +
1.83 +The only option left to me was rewrite crosstool from scratch. I decided to go
1.84 +this way, and name the new implementation ct-ng, standing for crosstool Next
1.85 +Generation, as many other comunity projects do, and as a wink at the TV series
1.86 +"Star Trek: The Next Generation". ;-)
1.87 +
1.88 +_____________
1.89 + /
1.90 +Operation /
1.91 +__________/
1.92 +
1.93 +ct-ng is configured by a configurator presenting a menu-stuctured set of
1.94 +options. These options let you specify the way you want your toolchain built,
1.95 +where you want it installed, what architecture and specific processor it
1.96 +will support, the version of the components you want to use, etc... The
1.97 +value for those options are then stored in a configuration file.
1.98 +
1.99 +You then simply run make. It will use this configuration file to retrieve,
1.100 +extract and patch the components, build, install and test your newly built
1.101 +toolchain.
1.102 +
1.103 +You are then free to add the toolchain /bin directory in your PATH to use
1.104 +it at will.
1.105 +
1.106 +_____________
1.107 + /
1.108 +Internals /
1.109 +__________/
1.110 +
1.111 +<To be completed>