Using Crosstool for Building linux-sh toolchain.
Abstract
This document wishs to give the reader a roadmap for using crosstool informations for building the toolchain for Renesas sh4 microprocessors. This document is supplied AS IS, without any warrenty for the direct or indirect damages caused by using the informations found inside it. Any change is appreciated if it get a patch for any eventual mistake included in this document
Getting the stuff for work
I'll try to give a step by step procedure for getting all the stuff.
-
Connect to the web site
http://www.kegel.com/crosstool/
-
Click on Download Hyperlink
-
Download
http://kegel.com/crosstool/crosstool-0.27.tar.gz and store it in /tmp dir
Build the directory tree
-
Choose your root source directory and you installation direcotry; we say it: your-root-dir; your-target-dir
-
$export CT_ROOTDIR=your-root-dir
-
$export CT_TARGETDIR=your-target-dir
-
-
Set the source directory and the target directory for compilation of the sources
-
$cd $CT_ROOT
-
$cp /tmp/crosstool-0.27.tar.gz ./
-
$tar -zxf crosstool-0.27.tar.gz
-
$cd crosstool-0.27
-
Modify the script for compiling for sh4
-
Edit file demo.sh
-
Leave unchanged the first 3 lines
-
find the section SH-4
-
leave uncommented only the line: eval cat sh4.dat gcc-3.3.2-glibc-2.3.2.dat sh all.sh --notest
-
comment all the remaining stuff.
Execution of demo.sh
-
Execute the script demo.sh
-
make the demo.sh file executable
-
$./demo.sh
-
-
wait for the building process
Result bins and libs
To use the new toolchain you can access the directory result/sh4-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2. This is the base directory of the entire toolchain and glibc. Good work