OpenCores
no use no use 1/1 no use no use
GNU Toolchain installation problem
by daisordan on Aug 24, 2012
daisordan
Posts: 16
Joined: Aug 6, 2012
Last seen: Mar 21, 2013
Hi, I am newbie of linux and I got some stupid questions when I am trying to install OR1Ksim, GNU Toolchain and ORPSOC into linux(Ubuntu12.04).

I start to install GNU Toolchain first:
1)Downloaded "OpenRISC newlib toolchain 1.0rc1 compiled under Ubuntu x86/i686 (32-bit)" into direction /home/dan
2)sudo -i
3)cd /opt
4)tar xjf path to or32-elf-1.0rc1-x86.tar.bz2
5)sudo ln -s or32-elf-1.0rc1 or32-elf
6)sudo ln -s or1ksim-0.5.1rc1 or1ksim
7)~/.bashrc
8)export PATH=$PATH:/opt/or32-elf/bin:/opt/or1ksim/bin

At step(4), it said
tar(child):path:cannot open:No such file or directory
tar (child): Error is not recoverable: exiting now
tar:Child returned status 2
tar:Error is not recoverable: exiting now
Is it because or32-elf-1.0rc1-x86.tar.bz2 is not in the /opt? How to download it using svn co? I have tried svn co ftp://ocuser:ocuser@openrisc.opencores.org/toolchain/or32-elf-1.0rc1-x86.tar.bz2 but it doesnt work.

In step(7), it said Permission denied. But I think I have entered the admin account by typing sudo -i and the terminal becomes root@ubuntu:. Why will this happen?

Thank you for the help and sorry about those stupid questions
Dan
RE: GNU Toolchain installation problem
by jeremybennett on Aug 25, 2012
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019
Hi, I am newbie of linux and I got some stupid questions when I am trying to install OR1Ksim, GNU Toolchain and ORPSOC into linux(Ubuntu12.04).

I start to install GNU Toolchain first:
1)Downloaded "OpenRISC newlib toolchain 1.0rc1 compiled under Ubuntu x86/i686 (32-bit)" into direction /home/dan
2)sudo -i
3)cd /opt
4)tar xjf path to or32-elf-1.0rc1-x86.tar.bz2
5)sudo ln -s or32-elf-1.0rc1 or32-elf
6)sudo ln -s or1ksim-0.5.1rc1 or1ksim
7)~/.bashrc
8)export PATH=$PATH:/opt/or32-elf/bin:/opt/or1ksim/bin

At step(4), it said
tar(child):path:cannot open:No such file or directory
tar (child): Error is not recoverable: exiting now
tar:Child returned status 2
tar:Error is not recoverable: exiting now
Is it because or32-elf-1.0rc1-x86.tar.bz2 is not in the /opt? How to download it using svn co? I have tried svn co ftp://ocuser:ocuser@openrisc.opencores.org/toolchain/or32-elf-1.0rc1-x86.tar.bz2 but it doesnt work.

In step(7), it said Permission denied. But I think I have entered the admin account by typing sudo -i and the terminal becomes root@ubuntu:. Why will this happen?

Thank you for the help and sorry about those stupid questions
Dan

Hi Dan,

Problem with step 4 is that you have literally typed the words "path to or32-elf-1.0rc1-x86.tar.bz2". The "tar" command therefore thinks you are asking it to open an archive in a file called "path".

What the instructions mean is that you should substitute the actual file path to where the downloaded file is. In your case you say you downloaded into /home/dan, so you want

    tar xjf /home/dan/or32-elf-1.0rc1-x86.tar.bz2
    

I don't know why you are trying to do step 7. ".bashrc" is a file in your home directory (i.e. /home/dan, shortened to "~") which is sourced (not executed) each time you start a new bash shell. What I believe you should be doing is editing that file, to add at the end the line:

    export PATH=$PATH:/opt/or32-elf/bin:/opt/or1ksim/bin
    

The environment variable "PATH" is a ":" separated list of all the directories where the shell looks for programs. You are just adding the location of the tool chain and or1ksim binaries to the end of that list. Once you have done this any new shell will automatically find commands like or32-elf-gcc. If you want to automatically find commands in the existing shell, then use the command:

    source ~/.bashrc
    

One other practical tip. It's generally a good idea to do as little programming as possible as root (i.e. after running "sudo -i"). It is quite common to make /opt writable by all users, so anyone can install programs there without needing to be root. You can do this with the command:

    sudo chmod ugo+rwx /opt
    

and entering your password to enable the sudo. Then you'll be able to carry out all the above steps without needing to use "sudo -i".

If you need more help, post here, or for a quicker (probably) response, use IRC on freenode.net, channels #opencores and #openrisc.

HTH

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.