OpenCores
no use no use 1/1 no use no use
Can not install the required tool chain - FTP server not correct.
by kpatra on Sep 17, 2011
kpatra
Posts: 7
Joined: Mar 20, 2009
Last seen: Sep 25, 2011
Hello All,

I just downloaded the trunk for OR1K project into my work copy and trying to build / install the cross compiler tool chain for OR1K.

$> svn info .
Path: .
URL: http://opencores.org/ocsvn/openrisc/openrisc/trunk/toolchain_install_scripts

$> sudo ./crossbuild.sh
CROSSBUILD: /home/kp146812/Study/Thesis/ArchPower/designs/OR1K/toolchain_install_scripts/crossbuild-dl has been created
CROSSBUILD: Download dir: /home/kp146812/Study/Thesis/ArchPower/designs/OR1K/toolchain_install_scripts/crossbuild-dl
CROSSBUILD: Build dir : /home/kp146812/Study/Thesis/ArchPower/designs/OR1K/toolchain_install_scripts/crossbuild-build
CROSSBUILD: Install dir : /usr/local
CROSSBUILD: Downloading http://mirrors.kernel.org/sources.redhat.com/binutils/snapshots/binutils-2.18.50.tar.bz2 using curl

curl: (6) Couldn't resolve host 'mirrors.kernel.org'


sudo ./crossbuild-1.0.sh
CROSSBUILD: Download dir: /home/kp146812/Study/Thesis/ArchPower/designs/OR1K/toolchain_install_scripts/crossbuild-dl
CROSSBUILD: Build dir : /home/kp146812/Study/Thesis/ArchPower/designs/OR1K/toolchain_install_scripts/crossbuild-build
CROSSBUILD: Install dir : /usr/local
CROSSBUILD: Downloading ftp://ocuser:oc@opencores.org/toolchain/or1ksim-0.5.0rc2.tar.bz2 using curl
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
curl: (7) couldn't connect to host


any tips on how to build / install the tool chain ?

regards,
Kaushik
RE: Can not install the required tool chain - FTP server not correct.
by jeremybennett on Sep 18, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hi Kaushik,

I believe this script is obsolete. If you have downloaded SVN, you should fine a script bld-all.sh in the gnu-src directory which will build both ELF and Linux toolchains. You can then follow the instructions to build BusyBox and Linux if required.

HTH

Jeremy

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

RE: Can not install the required tool chain - FTP server not correct.
by kpatra on Sep 20, 2011
kpatra
Posts: 7
Joined: Mar 20, 2009
Last seen: Sep 25, 2011
Thank you very much Jeremy, I could proceed further. However, now I am encountering the following issue during build.

1. I used the gnu-src/bld-all.sh and got the following error (attached is the log).

../../.././gdb-7.2/sim/or32/wrapper.c:47:21: fatal error: or1ksim.h: No such file or directory


2. I followed the easy steps in http://www.openrisc.net/toolchain-build.html#_build_linux and got the following error.

syslex.l:29:21: fatal error: sysinfo.h: No such file or directory
compilation terminated.
make[3]: *** [syslex.o] Error 1

what package should I install to have this sysinfo.h.

thanks again for your valuable help.

regards,
Kaushik
bld-all.log (2582 kb)
RE: Can not install the required tool chain - FTP server not correct.
by jeremybennett on Sep 20, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hi kpatra,

My omission. I should have explained that you need to download, build and install Or1ksim (the architectural simulator) first, before building the tool chain. The simulator is used in GDB. It can be found in the or1ksim directory in SVN, and there are instructions on the Wiki.

Try that, and see where you get to with the rest of the process. I suspect your Linux problem is because the tool chain build did not complete. Note that you will need to start your build of the tool chain cleanly. bld-all.sh --force will achieve that for you.

HTH

Jeremy

RE: Can not install the required tool chain - FTP server not correct.
by kpatra on Sep 21, 2011
kpatra
Posts: 7
Joined: Mar 20, 2009
Last seen: Sep 25, 2011
Thanks Jeremmy. I'll post my latest finding on building the toolchain from the gnu-src dir with bld-all.sh.

Let me put my finding on the alternate way you mentioned to build tool-chain (i.e. following instruction on http://www.openrisc.net/toolchain-build.html#_build_linux).

I mentioned that syslex.c is complaining about the 'sysinfo.h', I modified the lex code syslex.l to include the 'sys/sysinfo.h' instead to pass through that error and that worked. However, I am getting the following error while building syslex.c (regenerated using flex).

syslex.l:52:16: error: �NAME� undeclared (first use in this function)
syslex.l:57:10: error: �NUMBER� undeclared (first use in this function)
syslex.l:66:23: error: �UNIT� undeclared (first use in this function)
syslex.l:71:28: error: �TYPE� undeclared (first use in this function)
syslex.l:78:10: error: �COND� undeclared (first use in this function)
syslex.l:79:10: error: �REPEAT� undeclared (first use in this function)

Looks like they are tokens to be generated from parser. I could not find in syslex.l to include anything parser specific. Wondering how this should work. Any help ?

thanks,
Kaushik
RE: Can not install the required tool chain - FTP server not correct.
by kpatra on Sep 21, 2011
kpatra
Posts: 7
Joined: Mar 20, 2009
Last seen: Sep 25, 2011
Hello Jeremmy,

With bld-all.sh --force I am getting the following error now.

make[1]: Leaving directory `/home/kp146812/Study/Thesis/ArchPower/designs/OR1K/gnu-src/bd-linux/gcc'
/home/kp146812/Study/Thesis/ArchPower/designs/OR1K/gnu-src
./bld-all.sh: line 693: cd: ./linux-2.6.39: No such file or directory
bld-all.sh: Configuring Linux headers
make: *** No rule to make target `defconfig'. Stop.

Please help.

regards,
Kaushik
RE: Can not install the required tool chain - FTP server not correct.
by jeremybennett on Sep 21, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hello Jeremmy,

With bld-all.sh --force I am getting the following error now.

    make[1]: Leaving directory `/home/kp146812/Study/Thesis/ArchPower/designs/OR1K/gnu-src/bd-linux/gcc'
    /home/kp146812/Study/Thesis/ArchPower/designs/OR1K/gnu-src
    ./bld-all.sh: line 693: cd: ./linux-2.6.39: No such file or directory
    bld-all.sh: Configuring Linux headers
    make: *** No rule to make target `defconfig'.  Stop.
    

Please help.

regards,

Kaushik

Hi Kaushik,

Sorry left out a bit more of the instructions. You need Linux to be downloaded, so the script can find the headers to use when building the or32-linux tool chain. By default the linux is assumed to be in a directory linux-2.6.39. However there is a flag to specify a different location.

Third time lucky :)

When you have this all working, you might like to update the Wiki with a set of instructions for beginners that makes it clear.

HTH

Jeremy

RE: Can not install the required tool chain - FTP server not correct.
by kpatra on Sep 22, 2011
kpatra
Posts: 7
Joined: Mar 20, 2009
Last seen: Sep 25, 2011
Hello Jeremy,

Could you please tell what is this linux download ? Where can I download this ?

The 'trunk' I checked out has a 'linux' but does not contain anything but patch information. Or, is there suppose to be another 'linux' dir under gnu-src dir ?

Thanks for all your help.

regards,
Kaushik
RE: Can not install the required tool chain - FTP server not correct.
by jeremybennett on Sep 22, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hi Kaushik

Linux, uClibc (both of which you need) and BusyBox (you only need if you are going to run Linux on OpenRISC) are not on SVN. They are all hosted on git at openrisc.net.

Details for obtaining this are on the Wiki: opencores.org/or1k/OpenRISC_GNU_tool_chain. Look at the section "Downloading the source".

HTH,

Jeremy

RE: Can not install the required tool chain - FTP server not correct.
by kpatra on Sep 25, 2011
kpatra
Posts: 7
Joined: Mar 20, 2009
Last seen: Sep 25, 2011
Jeremy,

Hoorrah !!!! The latest Wiki you have pointed worked perfectly for me. Thanks for all your excellent help.

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