[OPENRISC]OR1K:Community portal(CentOS6.6)
今度はこちらで進めてみる。
http://opencores.org/or1k/Main_Page
ここから「OpenRISC Community Portal Wiki」へ。
http://opencores.org/or1k/OR1K:Community_Portal
■Toolchain
cd /home/bob/openrisc
○binutils
wget http://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2
tar xjvf binutils-2.25.tar.bz2
○gcc
git clone http://github.com/openrisc/or1k-gcc
データがダウンロードされない。
https://github.com/openrisc/or1k-gcc
ここから「Download ZIP」ボタンでzipファイルを入手する。
同じく/home/bob/openriscでzip解凍。
展開すると、フォルダ名はor1k-gcc-or1k/であり、
http://opencores.org/or1k/OpenRISC_GNU_tool_chain
ここの「gcc stage 1」の説明では、「../or1k-gcc/configure」となってるので、フォルダ名が異なってる。
○newlib
wget ftp://sourceware.org/pub/newlib/newlib-2.2.0.20150225.tar.gz
tar xzvf newlib-2.2.0.20150225.tar.gz
/etc/bashrcへ以下追加。
export PREFIX=/opt/or1k-elf
export PATH=$PATH:$PREFIX/bin
○binutilsインストール
cd /home/bob/openrisc
mkdir build-binutils
cd build-binutils/
../binutils-2.25/configure --target=or1k-elf --prefix=$PREFIX --enable-shared --disable-itcl --disable-tk --disable-tcl --disable-winsup --disable-gdbtk --disable-libgui --disable-rda --disable-sid --disable-sim --with-sysroot
make
make install
cd ..
○gcc stage1インストール
mkdir build-gcc-stage1
cd build-gcc-stage1
../or1k-gcc/configure --target=or1k-elf --prefix=$PREFIX --enable-languages=c --disable-shared --disable-libssp「Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.」なんて言われてる。:
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
errorで指定されたバージョンを入手する。
wget ftp://ftp.gmplib.org/pub/gmp-4.2/gmp-4.2.tar.bz2
tar jxvf gmp-4.2.tar.bz2
cd gmp-4.2
./configure
make
make install
make check
これでgmpバージョンを確認しても、4.2ではなく、元から入ってた4.3.xのまま。
yum list installed | grep gmp
○gcc(再度gitトライ)
githubのウェブサイトから取ってきたzipは展開するとフォルダ名が違う。
GMPやMPFR、MPCのバージョン指定らしきメッセージでconfigureがerrorになってしまったので、
どうしたもんかと新しいフォルダで「git clone https://github.com/openrisc/or1k-gcc」を実行すると、
今度は空データでなく、一式ダウンロード出来た。
もしかして、git実行の場所に古いゴミデータがあったからさっきはemptyと出たのか??
とにかく、データ一式取れたようなので、そのデータを、元の作業場所へ移して、gcc stage1インストールの再トライ。
○gcc stage1インストール(再度トライ)
同じエラー出た。
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
[OPENRISC]Getting Started with OpenRISC(1)
ここを参考にやってみる。
suでrootへログイン
apt-get install libmpc-dev libgmp3-dev libmpfr-dev lzop libsdl1.2-dev xterm automake libtool
gitが無いので、gitをインストール。
apt-get install git
cd /home/bob
mkdir openrisc
cd openrisc/
git clone https://github.com/kevinmehall/openrisc-tools-build.git toolchain
cd toolchain
git submodule update --initCloning into 'binutils'...
fatal: unable to connect to openrisc.net:
openrisc.net[0: xx.xx.xx.xx]: errno=接続を拒否されました
Clone of 'git://openrisc.net/jonas/binutils-svn' into submodule path 'binutils'
なんかopenrisc.netドメインが売りに出されてるとかの情報にヒットする。
手順にopenrisc.netを使った説明のサイトは解決策が分からない。
openrisc.orgは存在するようだが、代わりにopenrisc.orgと置き換えれば良いのか?
[OPENRISC]sim環境
minsoc_latest.tar.gzを以下から入手。
http://opencores.org/project,minsoc
tap_topが無いので以下からjtag_latest.tar.gzを入手。
http://opencores.org/project,jtag
■SWビルドツールの入手