



Does OpenRISC GNU tool chain Supports Linux 64-bit OS
by chetanm on Jan 8, 2013 |
chetanm
Posts: 13 Joined: Sep 26, 2008 Last seen: Jan 26, 2013 |
||
Dear All,
I'm trying to set up OpenRISC GNU tool chain on Red Hat Enterprise Linux Server release 6.3 (Santiago) and my question is that the tool chain file "or32-elf-1.0rc1-x86.tar.bz2" does it work on 64 bit Linux. since i'm getting an error "Segmentation fault (core dumped)" If not then should i install the tool chain on Linux 32 bit version? Please suggest me the steps to install the complete tool chain with library files on Linux OS 32/64 bit. Thanks, Chetan. |
RE: Does OpenRISC GNU tool chain Supports Linux 64-bit OS
by jeremybennett on Jan 8, 2013 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
I'm trying to set up OpenRISC GNU tool chain on Red Hat Enterprise Linux Server release 6.3 (Santiago) and my question is that the tool chain file "or32-elf-1.0rc1-x86.tar.bz2" does it work on 64 bit Linux. since i'm getting an error "Segmentation fault (core dumped)" If not then should i install the tool chain on Linux 32 bit version? Please suggest me the steps to install the complete tool chain with library files on Linux OS 32/64 bit. Hi Chetan, I'm not sure where you got that particular version from. However the stable GCC 4.5.1 tool chain in Subversion should build OK on 64-bit. If not, post a message. You can find details of how to build this here: There is a newer, development version, of the tool chain available, described lower down on the same page. I would expect this to build on 64-bit as well, but if you have problems, please post a message. HTH, Jeremy
-- |
RE: Does OpenRISC GNU tool chain Supports Linux 64-bit OS
by chetanm on Jan 11, 2013 |
chetanm
Posts: 13 Joined: Sep 26, 2008 Last seen: Jan 26, 2013 |
||
I'm trying to set up OpenRISC GNU tool chain on Red Hat Enterprise Linux Server release 6.3 (Santiago) and my question is that the tool chain file "or32-elf-1.0rc1-x86.tar.bz2" does it work on 64 bit Linux. since i'm getting an error "Segmentation fault (core dumped)" If not then should i install the tool chain on Linux 32 bit version? Please suggest me the steps to install the complete tool chain with library files on Linux OS 32/64 bit. Hi Chetan, I'm not sure where you got that particular version from. However the stable GCC 4.5.1 tool chain in Subversion should build OK on 64-bit. If not, post a message. You can find details of how to build this here: There is a newer, development version, of the tool chain available, described lower down on the same page. I would expect this to build on 64-bit as well, but if you have problems, please post a message. HTH, Jeremy
-- Hi Jeremy, Thanks for the reply, I had downloaded the file �or32-elf-1.0rc1-x86.tar.bz2� from this link http://www.rte.se/blog/blogg-modesty-corex/openrisc-1200-soft-processor and the FTP Link for the file is ftp://ocuser:ocuser@openrisc.opencores.org/toolchain/or32-elf-1.0rc1-x86.tar.bz2 I�m trying to understand the installation setup and steps please read the below installation steps and guide me if I�m doing any wrong steps or missing any steps. Please Note: My requirement is to step up OpenRISC GNU Tool Chain for OR1200 Processor on RHEL 6 server release 6.3 (Santiago). The steps I have been following for setting up OpenRISC GNU Tool Chain on RHEL 6.3 are: 1. Downloaded the 64 bit tool chain �or32-elf-1.0rc1-CentOS-x86_64.tar.bz2� from the link http://opencores.org/or1k/OpenRISC_GNU_tool_chain#1.0rc1 2. Installed the toolchain from the download archive under the folder /opt/ using commands a. cd /opt b. tar xjf or32-elf-1.0rc1-CentOS-x86_64.tar.bz2 c. sudo ln -s or32-elf-1.0rc1 or32-elf d. sudo ln -s or1ksim-0.5.1rc1 or1ksim 3. Added the PATH into the .cshrc file - setenv PATH /opt/or32-elf/bin:/opt/or1ksim/bin:$PATH 4. As per your suggestion i tried to install the libraries from the link http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Installation_from_source for some reason yum command is not working in my system, so manually downloaded the libraries � binutils-2.20.1, gcc-4.5.1, newlib-1.18.0 and gdb-7.2 from the link http://opencores.org/ocsvn/openrisc/openrisc/trunk/gnu-stable/ and placed it under the folder /opt/openrisc/ 5. Before Building the tool chain I tried to install the libraries for the Linux (uClibc) toolchain (or1k-linux) as per the steps mentioned in the link http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Initial_preparations a. Created a directory mkdir /opt/or1k-toolchain, sudo chown username:username /opt/or1k-toolchain and set the path �export PATH=$PATH:/opt/or1k-toolchain/bin� b. Downloaded the OR1K source but the link mention in opencores page is not working so I used this command �git clone https://github.com/openrisc/or1k-src.git� and used the command ../or1k-src/configure --target=or1k-linux --prefix=/opt/or1k-toolchain \ --disable-shared --disable-itcl --disable-tk --disable-tcl --disable-winsup \ --disable-libgui --disable-rda --disable-sid --disable-sim --disable-gdb \ --with-sysroot --disable-newlib --disable-libgloss make && make install and installed it. c. Downloaded the Linux Headers and this time to the link mentioned in the opencore page is not work and the right link is �git clone http://git.openrisc.net/cgit.cgi/jonas/linux/� (it took long time to download) and used the command make INSTALL_HDR_PATH=${SYSROOT}/usr_headers_install to installed it. d. Downloaded the ork1-gcc and the right link is �git clone https://github.com/openrisc/or1k-gcc.git� and used the command ../or1k-gcc/configure --target=or1k-linux --prefix=/opt/or1k-toolchain --disable-libssp \ --srcdir=../or1k-gcc --enable-languages=c --without-headers --enable-threads=single \ --disable-libgomp --disable-libmudflap --disable-shared --disable-libquadmath \ --disable-libatomic make && make install and installed it. e. Downloaded the uClibc from the link �git clone https://github.com/openrisc/or1k-gcc.git� and used the command make ARCH=or1k defconfig make && make PREFIX=$SYSROOT install f. Completed the gcc stage 2 using command ../or1k-gcc/configure --target=or1k-linux --prefix=/opt/or1k-toolchain --disable-libssp \ --srcdir=../or1k-gcc --enable-languages=c,c++ --enable-threads=posix --disable-libgomp \ --disable-libmudflap --with-sysroot=${SYSROOT} --disable-multilib make && make install and installed it. 6. Building the uClibc tool chain using bld-all.sh script using the command ./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux --no-newlib --no-or32-elf The command in the opencores page need to be updated since the last switch --no-or32 to --no-or32-elf I hope the steps are followed are right please suggest me if I have missed any steps are doing any thing wrong. PS: some of the links in Opencores page http://opencores.org/or1k/OpenRISC_GNU_tool_chain needs to be updated. |
RE: Does OpenRISC GNU tool chain Supports Linux 64-bit OS
by jeremybennett on Jan 11, 2013 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
Thanks for the reply, I had downloaded the file or32-elf-1.0rc1-x86.tar.bz2 from this link http://www.rte.se/blog/blogg-modesty-corex/openrisc-1200-soft-processor and the FTP Link for the file is
Hi Chetan, Sven's blog posts are a great place to start. I think the FTP version of the code is somewhat out of date, which is why I recommend the SVN version.
I'm trying to understand the installation setup and steps please read the below installation steps and guide me if I'm doing any wrong steps or missing any steps. Please Note: My requirement is to step up OpenRISC GNU Tool Chain for OR1200 Processor on RHEL 6 server release 6.3 (Santiago). The steps I have been following for setting up OpenRISC GNU Tool Chain on RHEL 6.3 are: 1. Downloaded the 64 bit tool chain or32-elf-1.0rc1-CentOS-x86_64.tar.bz2 from the link
2. Installed the toolchain from the download archive under the folder /opt/ using commands a. cd /opt b. tar xjf or32-elf-1.0rc1-CentOS-x86_64.tar.bz2 c. sudo ln -s or32-elf-1.0rc1 or32-elf d. sudo ln -s or1ksim-0.5.1rc1 or1ksim 3. Added the PATH into the .cshrc file - setenv PATH /opt/or32-elf/bin:/opt/or1ksim/bin:$PATH 4. As per your suggestion i tried to install the libraries from the link http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Installation_from_source for some reason yum command is not working in my system, so manually downloaded the libraries - binutils-2.20.1, gcc-4.5.1, newlib-1.18.0 and gdb-7.2 from the link http://opencores.org/ocsvn/openrisc/openrisc/trunk/gnu-stable/ and placed it under the folder /opt/openrisc/ This is probably where you are going wrong. Sven's link should have everything you want for the tool chain - mixing with stuff from SVN is a bad idea. As far as I know there are no YUM repos there, so I wouldn't expect yum to work. I wouldn't usually put source in /opt/openrisc (I'd keep it in my local directory)- it's a place for the built tools 5. Before Building the tool chain I tried to install the libraries for the Linux (uClibc) toolchain (or1k-linux) as per the steps mentioned in the link http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Initial_preparations a. Created a directory mkdir /opt/or1k-toolchain, sudo chown username:username /opt/or1k-toolchain and set the path export PATH=$PATH:/opt/or1k-toolchain/bin b. Downloaded the OR1K source but the link mention in opencores page is not working so I used this command git clone https://github.com/openrisc/or1k-src.git and used the command ../or1k-src/configure --target=or1k-linux --prefix=/opt/or1k-toolchain \ --disable-shared --disable-itcl --disable-tk --disable-tcl --disable-winsup \ --disable-libgui --disable-rda --disable-sid --disable-sim --disable-gdb \ --with-sysroot --disable-newlib --disable-libglossmake && make install and installed it. OK - this is the development version of the compiler. It uses a different target, or1k-xxx rather than or32-xxx and is based on the GCC 4.8 code base and more recent versions of binutils, GDB etc. You can't mix the two. c. Downloaded the Linux Headers and this time to the link mentioned in the opencore page is not work and the right link is git clone http://git.openrisc.net/cgit.cgi/jonas/linux/ (it took long time to download) and used the command make INSTALL_HDR_PATH=${SYSROOT}/usr_headers_install to installed it. d. Downloaded the ork1-gcc and the right link is git clone https://github.com/openrisc/or1k-gcc.git and used the command ../or1k-gcc/configure --target=or1k-linux --prefix=/opt/or1k-toolchain --disable-libssp \ --srcdir=../or1k-gcc --enable-languages=c --without-headers --enable-threads=single \ --disable-libgomp --disable-libmudflap --disable-shared --disable-libquadmath \ --disable-libatomicmake && make install and installed it. e. Downloaded the uClibc from the link git clone https://github.com/openrisc/or1k-gcc.git and used the command make ARCH=or1k defconfig make && make PREFIX=$SYSROOT install f. Completed the gcc stage 2 using command ../or1k-gcc/configure --target=or1k-linux --prefix=/opt/or1k-toolchain --disable-libssp \ --srcdir=../or1k-gcc --enable-languages=c,c++ --enable-threads=posix --disable-libgomp \ --disable-libmudflap --with-sysroot=${SYSROOT} --disable-multilibmake && make install and installed it. OK - these are the instructions to build the development tool chain. I can't see where you are setting SYSROOT. Personally I think this use of SYSROOT is wrong - but there is a confusing statement in the GNU installation manual that everyone misunderstands.
6. Building the uClibc tool chain using bld-all.sh script using the command
./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux --no-newlib --no-or32-elf The command in the opencores page need to be updated since the last switch --no-or32 to --no-or32-elf This last step should be all you need to build stable versions of both the ELF and Linux tool chains.
I hope the steps are followed are right please suggest me if I have missed any steps are doing any thing wrong. I think you have building of three different versions of the tool chain intermingled. For the stable tool chain all you should need is:
PS: some of the links in Opencores page http://opencores.org/or1k/OpenRISC_GNU_tool_chain needs to be updated. It's a wiki, so you can change it. I think it is the links to Linux and the development compiler that are wrong. Please would you update them. Thanks for all the feedback. Best wishes, Jeremy |
RE: Does OpenRISC GNU tool chain Supports Linux 64-bit OS
by chetanm on Jan 14, 2013 |
chetanm
Posts: 13 Joined: Sep 26, 2008 Last seen: Jan 26, 2013 |
||
Hi Jeremy,
Thanks for you valuable suggestion, firstly as a beginner I just followed the Opencore link http://opencores.org/or1k/OpenRISC_GNU_tool_chain and the procedure is not straight forward what I had understood I had put in steps and thanks for you to correct me.
So here are the steps as I understood from your suggestion.
I think you have building of three different versions of the tool chain intermingled. For the stable tool chain all you should need is:
1. Download the Or1ksim from SVN in the local directory and install it in the /opt/or1ksim using the command
a. svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk/or1ksim
b. mkdir builddir_or1ksim
c. cd builddir_or1ksim
d. ../configure --target=or32-elf --prefix=/opt/or1ksim
Here the target is specified as or32-elf but I want to install it in a Linux so should I use target as or1k-linux or both since we need to build the tool chain for both (I�m
sorry I don�t know the significance of both)
e. make all
f. make install
Download Or1ksim from SVN, configure and install in /opt/or1ksim (use --prefix to specify this when configuring).
Add /opt/or1ksim/bin to your path.
Download everything from SVN in the gnu-stable directory into somewhere in your home directory.
3. Download everything from SVN in the gnu-stable directory into home directory by using the command
svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk/gnu-stable
a. Do I have to install anything from the gnu-stable diredtory?
b. When should I install the GCC, binutils and GDB libraries.
Download linux and uClibc from git.
4. Downloaded linux and uClibc from git using the right link.
git clone http://git.openrisc.net/cgit.cgi/jonas/linux/
git clone http://git.openrisc.net/cgit.cgi/jonas/uClibc/
a. What command should I use to Install the Linux and the uClibc
b. What Path should I use to set the SYSROOT
Run
5. Only after the Linux and uClibc are configured then I have to run the following command to building it.
./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux
a. This is used to build both the ELF and Linux tool chains right,
so should I have to configure the or1k-sim target for both or32-elf and or1k-linux?
./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux Add /opt/openrisc/bin to you path.
It's a wiki, so you can change it. I think it is the links to Linux and the development compiler that are wrong. Please would you update them. |
RE: Does OpenRISC GNU tool chain Supports Linux 64-bit OS
by chetanm on Jan 15, 2013 |
chetanm
Posts: 13 Joined: Sep 26, 2008 Last seen: Jan 26, 2013 |
||
My last post was not tabulated as per the Opencore standard Im sorry for that, please refer to this post.
Hi Jeremy, Thanks for you valuable suggestion, firstly as a beginner I just followed the Opencore link http://opencores.org/or1k/OpenRISC_GNU_tool_chain and the procedure is not straight forward what I had understood I had put in steps and thanks for correcting me.So here are the steps as I understood from your suggestion. I think you have building of three different versions of the tool chain intermingled. For the stable tool chain all you should need is: Download Or1ksim from SVN, configure and install in /opt/or1ksim (use --prefix to specify this when configuring). a. svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk/or1ksim b. mkdir builddir_or1ksimc. cd builddir_or1ksim d. ../configure --target=or32-elf --prefix=/opt/or1ksimHere the target is specified as or32-elf but I want to install it in a Linux so should I use target as or1k-linux or both since we need to build the tool chain for both (Im sorry I dont know the significance of both) e. make allf. make install Add /opt/or1ksim/bin to your path. Download everything from SVN in the gnu-stable directory into somewhere in your home directory. svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk/gnu-stable a. Do I have to install anything from the gnu-stable diredtory? b. When should I install the GCC, binutils and GDB libraries.Download linux and uClibc from git. git clone http://git.openrisc.net/cgit.cgi/jonas/linux/ git clone http://git.openrisc.net/cgit.cgi/jonas/uClibc/a. What is the Path I should use to set the SYSROOT b. What command should I use to Install the Linux and the uClibc since I was mixing up things here.Run ./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux ./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux a. This is used to build both the ELF and Linux tool chains right, so should I have to configure the or1k-sim target for both or32-elf and or1k-linux?Add /opt/openrisc/bin to you path. It's a wiki, so you can change it. I think it is the links to Linux and the development compiler that are wrong. Please would you update them.I will surly update the link in the Opencores page. Im very thankful to you for supporting and helping me to understanding the flow to setup the tool chain. Thanks for your support.Chetan. |
RE: Does OpenRISC GNU tool chain Supports Linux 64-bit OS
by jeremybennett on Jan 16, 2013 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
My last post was not tabulated as per the Opencore standard Im sorry for that, please refer to this post.
Hi Jeremy, Thanks for you valuable suggestion, firstly as a beginner I just followed the Opencore link http://opencores.org/or1k/OpenRISC_GNU_tool_chain and the procedure is not straight forward what I had understood I had put in steps and thanks for correcting me.So here are the steps as I understood from your suggestion. I think you have building of three different versions of the tool chain intermingled. For the stable tool chain all you should need is: Download Or1ksim from SVN, configure and install in /opt/or1ksim (use --prefix to specify this when configuring). a. svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk/or1ksim b. mkdir builddir_or1ksimc. cd builddir_or1ksim d. ../configure --target=or32-elf --prefix=/opt/or1ksimHere the target is specified as or32-elf but I want to install it in a Linux so should I use target as or1k-linux or both since we need to build the tool chain for both (Im sorry I dont know the significance of both) Hi Chetan, The use of --target is not the same with Or1ksim. It doesn't matter about ELF or Linux, it is just the or32 that matters. However I wouldn't change it to or32-linux, just in case the scripts aren't properly set up.
e. make all
f. make install Add /opt/or1ksim/bin to your path. Download everything from SVN in the gnu-stable directory into somewhere in your home directory. svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk/gnu-stable a. Do I have to install anything from the gnu-stable diredtory? >Nothing to do here - that is all done by the bld-all.sh script. Download linux and uClibc from git. git clone http://git.openrisc.net/cgit.cgi/jonas/linux/ git clone http://git.openrisc.net/cgit.cgi/jonas/uClibc/a. What is the Path I should use to set the SYSROOT b. What command should I use to Install the Linux and the uClibc since I was mixing up things here.Don't set SYSROOT or install Linux/uClibc. Let bld-all.sh sort things out. Run ./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux ./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux a. This is used to build both the ELF and Linux tool chains right, so should I have to configure the or1k-sim target for both or32-elf and or1k-linux?No - as noted above or1ksim is the same for ELF and Linux. Add /opt/openrisc/bin to you path. It's a wiki, so you can change it. I think it is the links to Linux and the development compiler that are wrong. Please would you update them.I will surly update the link in the Opencores page. Im very thankful to you for supporting and helping me to understanding the flow to setup the tool chain. Thanks for your support.Chetan. HTH Jeremy |



