Crosstool-ng
From Attie's Wiki
(Difference between revisions)
(Created page with "==Building== You will need to install some packages: <source lang="bash"> apt-get install gperf texinfo libtool automake </source> <source lang="bash"> ./configure make sudo ...") |
m (→Building) |
||
(14 intermediate revisions by one user not shown) | |||
Line 2: | Line 2: | ||
You will need to install some packages: | You will need to install some packages: | ||
<source lang="bash"> | <source lang="bash"> | ||
− | apt-get install gperf texinfo libtool automake | + | apt-get install gperf texinfo libtool automake bison flex gawk cvs zlib1g-dev |
</source> | </source> | ||
+ | |||
+ | Download from: http://crosstool-ng.org/download/crosstool-ng/ | ||
<source lang="bash"> | <source lang="bash"> | ||
− | ./configure | + | CT_INSTALL_DIR=../crosstool |
+ | ./configure --prefix=${CT_INSTALL_DIR} | ||
make | make | ||
− | + | make install | |
+ | </source> | ||
+ | |||
+ | ==Using== | ||
+ | To keep a cache of the downloaded sources, do the following | ||
+ | <source lang="bash"> | ||
+ | mkdir ~/src | ||
+ | </source> | ||
+ | |||
+ | Then configure and build the toolchain! | ||
+ | <source lang="bash"> | ||
+ | # pick a default config, or make your own from scratch! | ||
+ | cp ${CROSSTOOL_NG_SRC}/samples/${CHOSEN_SAMPLE}/crosstool.config .config | ||
+ | |||
+ | # review / change options | ||
+ | # PREFIX_DIR should be an absolute path (as of writing you can use $(pwd) to make it 'relative') | ||
+ | ${CT_INSTALL_DIR}ct-ng menuconfig | ||
+ | |||
+ | # build | ||
+ | ${CT_INSTALL_DIR}ct-ng build | ||
+ | </source> | ||
+ | |||
+ | If everything went smoothly... have a look in <code>~/x-tools/</code> (or elsewhere if you changed <code>PREFIX_DIR</code>) | ||
+ | <source lang="bash"> | ||
+ | $ ls -l /home/agrande/x-tools/ | ||
+ | total 4 | ||
+ | dr-x------ 8 agrande agrande 4096 2012-07-27 14:13 arm-bare_newlib_cortex_m3_nommu-eabi | ||
</source> | </source> |
Latest revision as of 18:24, 7 February 2013
[edit] Building
You will need to install some packages:
apt-get install gperf texinfo libtool automake bison flex gawk cvs zlib1g-dev
Download from: http://crosstool-ng.org/download/crosstool-ng/
CT_INSTALL_DIR=../crosstool ./configure --prefix=${CT_INSTALL_DIR} make make install
[edit] Using
To keep a cache of the downloaded sources, do the following
mkdir ~/src
Then configure and build the toolchain!
# pick a default config, or make your own from scratch! cp ${CROSSTOOL_NG_SRC}/samples/${CHOSEN_SAMPLE}/crosstool.config .config # review / change options # PREFIX_DIR should be an absolute path (as of writing you can use $(pwd) to make it 'relative') ${CT_INSTALL_DIR}ct-ng menuconfig # build ${CT_INSTALL_DIR}ct-ng build
If everything went smoothly... have a look in ~/x-tools/
(or elsewhere if you changed PREFIX_DIR
)
$ ls -l /home/agrande/x-tools/ total 4 dr-x------ 8 agrande agrande 4096 2012-07-27 14:13 arm-bare_newlib_cortex_m3_nommu-eabi