docs/ct-ng.1.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Wed Aug 15 22:06:22 2012 +0200 (2012-08-15)
changeset 3034 11c23aa9c9f9
parent 2621 00853d565edf
child 3224 4e9c41579ebd
permissions -rw-r--r--
samples: add rule to dump current .config into a defconfig

... and one to restore it, of course.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
yann@197
     1
." crosstool-NG man page
yann@182
     2
." Copyright 2007 Yann E. MORIN
yann@182
     3
." Licensed under the Creative Commons BY-SA, v2.5
yann@182
     4
."
yann@182
     5
." Beautifying URLs
yann@182
     6
.mso www.tmac
yann@182
     7
."
yann@197
     8
.TH crosstool-NG 1 "@@CT_DATE@@" "version @@CT_VERSION@@" "User Commands"
yann@182
     9
."
yann@182
    10
."
yann@182
    11
.SH NAME
yann@2621
    12
@@CT_PROG_NAME@@, crosstool-NG \- Build cross-toolchains
yann@182
    13
."
yann@182
    14
."
yann@182
    15
.SH SYNOPSIS
yann@2621
    16
.B @@CT_PROG_NAME@@ ACTION
yann@182
    17
."
yann@182
    18
."
yann@182
    19
.SH DESCRIPTION
yann@182
    20
Building a cross-toolchain can be a real pain.
yann@182
    21
.PP
yann@197
    22
.B crosstool-NG
yann@182
    23
makes it easy to build cross-toolchains, and allows you to take all the juice
yann@306
    24
out of your target by configuring the different components of the toolchain
yann@182
    25
accordingly to the targeted processor.
yann@182
    26
."
yann@182
    27
."
yann@182
    28
.SH ACTIONS
yann@182
    29
Here are the most commonly used actions. For other actions, please see
yann@2227
    30
.I "@@CT_DOCDIR@@/0 - Table of content.txt"
yann@182
    31
.TP
yann@182
    32
.B help
yann@182
    33
Prints a little help text.
yann@182
    34
."
yann@182
    35
.TP
yann@182
    36
.B menuconfig
yann@182
    37
Configures
yann@197
    38
.B crosstool-NG
yann@182
    39
using a configurator menu very similar to that of the Linux kernel.
yann@182
    40
."
yann@182
    41
.TP
yann@182
    42
.B oldconfig
yann@182
    43
Apply options found in an existing
yann@182
    44
.I .config
yann@182
    45
file, and ask for newer options if there are any.
yann@182
    46
."
yann@182
    47
.TP
yann@182
    48
.B saveconfig
yann@182
    49
Save the current
yann@197
    50
.B crosstool-NG
yann@182
    51
configuration, and associated components' config files, into a sample. Samples
yann@335
    52
are saved in their own sub-directory, named after the target's tuple, in the
yann@182
    53
.I samples
yann@182
    54
sub-directory of the current directory.
yann@182
    55
If that was not clear:
yann@182
    56
.I `pwd`/samples/${CT_TARGET}/
yann@182
    57
yann@182
    58
Samples can be later recalled by calling
yann@2621
    59
.B @@CT_PROG_NAME@@
yann@335
    60
with the target tuple they represent.
yann@182
    61
."
yann@182
    62
.TP
yann@3034
    63
.B defconfig
yann@3034
    64
Save the current configuration to a mini-defconfig file, that contains only
yann@3034
    65
the strictly required symbols to reproduce the configuraiton. defconfig files
yann@3034
    66
are much smaller than a complete .config, so it is easy to send by mail. As
yann@3034
    67
only non-default symbols are present in a defconfig, it easy to spot the
yann@3034
    68
meaningfull values. Also, it is easy to use defconfig files with newer
yann@3034
    69
versions of
yann@3034
    70
.BR crosstool-NG .
yann@3034
    71
By default the mini-defconfig is saved to a file named
yann@3034
    72
.IR defconfig ,
yann@3034
    73
unless the variable
yann@3034
    74
.B $DEFCONFIG
yann@3034
    75
is set, in which case the mini-defconfig will be saved to the file referenced
yann@3034
    76
by
yann@3034
    77
.BR $DEFCONFIG .
yann@3034
    78
yann@3034
    79
Note: only the
yann@3034
    80
.I .config
yann@3034
    81
file for
yann@3034
    82
.B crosstool-NG
yann@3034
    83
is saved. Config files for the components are
yann@3034
    84
.B not
yann@3034
    85
saved. Use
yann@3034
    86
.B saveconfig
yann@3034
    87
for that
yann@3034
    88
."
yann@3034
    89
.TP
yann@3034
    90
.B olddefconfig
yann@3034
    91
Configure
yann@3034
    92
.B crosstool-NG
yann@3034
    93
using a mini-defconfig file (previously saved with
yann@3034
    94
.B defconfig
yann@3034
    95
or manually edited). The default mini-defconfig is rad from the file
yann@3034
    96
.IR defconfig ,
yann@3034
    97
unless the vraiable
yann@3034
    98
.B $DEFCONFIG
yann@3034
    99
is set, inwhich case the mini-defconfig will be read from the file referenced
yann@3034
   100
by
yann@3034
   101
.B $DEFCONFIG
yann@3034
   102
."
yann@3034
   103
.TP
yann@182
   104
.B build
yann@197
   105
Builds the configured toolchain.
yann@182
   106
."
yann@182
   107
.TP
yann@182
   108
.B clean
yann@182
   109
Remove files generated by
yann@197
   110
.B crosstool-NG
yann@182
   111
for itself (these are mostly the configurators' binaries).
yann@182
   112
."
yann@182
   113
.TP
yann@182
   114
.B distclean
yann@182
   115
Same as
yann@182
   116
.B clean
yann@182
   117
, but also removes the toolchain build directory, the downloaded files and the
yann@182
   118
.I .config
yann@182
   119
configuration file. The generated toolchain is left untouched, as well as
yann@182
   120
samples which are not removed.
yann@182
   121
."
yann@182
   122
.TP
yann@182
   123
.B regtest
yann@182
   124
Calls the
yann@197
   125
.B crosstool-NG
yann@182
   126
regression test suite. All samples are build, and the regression test suite is
yann@182
   127
run against every one of them.
yann@182
   128
."
yann@182
   129
.TP
yann@182
   130
.B updatetools
yann@182
   131
Updates the
yann@182
   132
.I config.guess
yann@182
   133
and
yann@182
   134
.I config.sub
yann@182
   135
scripts. These scripts are used by
yann@197
   136
.B crosstool-NG
yann@182
   137
to canonicalise the machines' name (host, build and target machines).
yann@182
   138
.TP
yann@182
   139
.B tarball
yann@182
   140
Builds a tarball of the generated toolchain, also saving the scripts from
yann@197
   141
.B crosstool-NG
yann@182
   142
that are needed to rebuild the target, and also saving the tarballs of the
antony@2564
   143
components that were used.
yann@182
   144
."
yann@182
   145
.SH ENVIRONMENT
yann@182
   146
.TP
yann@182
   147
.B STOP, START
yann@182
   148
Respectively stops and restarts the build just before this step. To restart a
yann@182
   149
step, a previous build should have run at least to that step, or further.
yann@182
   150
antony@2564
   151
The list of steps is viewable with the action
yann@620
   152
.BR list-steps .
yann@182
   153
."
yann@182
   154
.SH EXIT VALUE
yann@182
   155
The
yann@2621
   156
.B @@CT_PROG_NAME@@
yann@182
   157
frontend is in fact a
yann@182
   158
.BR make (1)
yann@182
   159
script. See the man page for
yann@182
   160
.BR make (1)
yann@182
   161
to have the meaning of the exit values.
yann@182
   162
."
yann@182
   163
.SH BUGS
yann@182
   164
As of today (@@CT_DATE@@), building tarballs is broken. It is difficult to
yann@182
   165
foresee how every parts of
yann@197
   166
.B crosstool-NG
yann@182
   167
are going to be installed. Each parts is needed to build a tarball, as it
yann@182
   168
contains all that is needed to rebuild the toolchain from scratch: toolchain
yann@182
   169
components' sources,
yann@197
   170
.B crosstool-NG
yann@182
   171
configuration, but also all
yann@197
   172
.B crosstool-NG
yann@182
   173
scripts.
yann@182
   174
."
yann@182
   175
.SH SECURITY
yann@182
   176
.B Don't run as root!
yann@182
   177
Great care has been taken to avoid mistakes, but bug-free programs don't
yann@182
   178
exist. During normal operation,
yann@197
   179
.B crosstool-NG
yann@182
   180
removes entire directories. If you run as root, and there is a bug or you
yann@182
   181
mis-configured
yann@197
   182
.BR crosstool-NG ,
yann@182
   183
entire important directories could be removed (eg.
yann@182
   184
.IR /usr ),
yann@182
   185
although
yann@197
   186
.B crosstool-NG
yann@335
   187
will refuse to install toolchains in some well known critical directories.
yann@182
   188
."
yann@182
   189
.SH AUTHORS
yann@182
   190
Please consult the file
yann@182
   191
.I @@CT_DOCDIR@@/CREDITS
yann@182
   192
for a list of contributors.
yann@182
   193
."
yann@182
   194
.SH SEE ALSO
yann@227
   195
You can find more in-depth documentation in
yann@2227
   196
.IR "@@CT_DOCDIR@@/0 - Table of content.txt" .
yann@227
   197
yann@182
   198
Please have a look at the
yann@182
   199
.URL "http://www.kegel.com/crosstool" "original crosstool" " by Daniel KEGEL"