1/1

|
Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by sfielding on Nov 11, 2011 |
sfielding
Posts: 6 Joined: Feb 25, 2004 Last seen: Dec 22, 2020 |
||
|
Running
make CROSS_COMPILER=or32-linux gives error or32-linux gcc not found believe that export PATH=$PATH:/opt/openrisc/or32-linux/bin needs to be added to instructions for toolchain build Seperate issue When building toolchain using or1ksim 0.4.0 stable release, following constant is unresolved OR1KSIM_RC_HALTED Looks like this constant is available in latest or1ksim from repository |
|||
|
RE: Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by antygan on Nov 12, 2011 |
antygan
Posts: 10 Joined: Dec 2, 2010 Last seen: Jan 26, 2015 |
||
|
Hi,
Even i am trying to run linux on or1ksim. I have used these commands, 1) export PATH=$PATH:/opt/openrisc/bin 2) added export PATH=$PATH:/opt/openrisc/bin at the end of ~/.bashrc file 3) make vmlinux ARCH=openrisc CROSS_COMPILE=/opt/openrisc/bin/or32-linux- for generating the vmlinux file. (I am not sure if this is the correct command, but it compiles without errors) 4) then am using the command, or32-elf-sim -f sim.cfg vmlinux this starts the simulator, but i expect linux to be booted and to stop at a command prompt. But instead, I am getting this output: **************************************************************** Seeding random generator with value 0xfda6e063 Warning: Unknown Ethernet type: file assumed. Warning: ./sim.cfg: Unrecognized parameter: section at line 467; ignored. Or1ksim 2011-08-15 Building automata... done, num uncovered: 0/213. Parsing operands data... done. Warning: PS2 keyboard unable to open RX file stream. Resetting PIC. loadcode: filename vmlinux startaddr=00000000 virtphy_transl=00000000 Not COFF file format ELF type: 0x0002 ELF machine: 0x005c ELF version: 0x00000001 ELF sec = 28 Section: .text, vaddr: 0xc0000000, paddr: 0x0 offset: 0x00002000, size: 0x001fbd6c Section: .rodata, vaddr: 0xc01fc000, paddr: 0x1fc000 offset: 0x001fe000, size: 0x00024ee8 Section: __ksymtab, vaddr: 0xc0220ee8, paddr: 0x220ee8 offset: 0x00222ee8, size: 0x00003b28 Section: __ksymtab_gpl, vaddr: 0xc0224a10, paddr: 0x224a10 offset: 0x00226a10, size: 0x00001978 Section: __ksymtab_strings, vaddr: 0xc0226388, paddr: 0x226388 offset: 0x00228388, size: 0x0000b422 Section: __param, vaddr: 0xc02317ac, paddr: 0x2317ac offset: 0x002337ac, size: 0x000001b0 Section: .data, vaddr: 0xc0232000, paddr: 0x232000 offset: 0x00234000, size: 0x00014f60 Section: __ex_table, vaddr: 0xc0246f60, paddr: 0x246f60 offset: 0x00248f60, size: 0x00000a10 Section: .head.text, vaddr: 0xc0248000, paddr: 0x248000 offset: 0x0024a000, size: 0x00004000 Section: .init.text, vaddr: 0xc024c000, paddr: 0x24c000 offset: 0x0024e000, size: 0x00011560 Section: .init.data, vaddr: 0xc025d560, paddr: 0x25d560 offset: 0x0025f560, size: 0x0014b07c ****************** counters reset ****************** cycles 88660, insn #59441 ****************** counters reset ****************** and it stops here. I am able to go the interactive mode by using CTRL C, and see the status of registers etc. Here are my queries, 1) Am I following the correct procedure ? I am able to run programs in bare metal mode. So I think the installation of tool chain etc is correct. 2) Can we get back to normal mode after entering the interactive mode ? Regards, Anantha |
|||
|
RE: Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by jeremybennett on Nov 14, 2011 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Running
make CROSS_COMPILER=or32-linux gives error or32-linux gcc not found believe that export PATH=$PATH:/opt/openrisc/or32-linux/bin needs to be added to instructions for toolchain build Hi sfielding This is exactly what the instructions say on the Wiki (http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Building).
Seperate issue
When building toolchain using or1ksim 0.4.0 stable release, following constant is unresolved OR1KSIM_RC_HALTED Looks like this constant is available in latest or1ksim from repository I find this surprising. Are you sure you have a completely clean 0.4.0 download. Before packaging, the distribution is tested with "make distcheck", which would trivially find a fault like this. 0.4.0 has been available for quite some time, and you are the first person to report this error. Would you download the package again and try a clean build. HTH Jeremy
-- |
|||
|
RE: Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by jeremybennett on Nov 14, 2011 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Hi,
Even i am trying to run linux on or1ksim. I have used these commands, 1) export PATH=$PATH:/opt/openrisc/bin 2) added export PATH=$PATH:/opt/openrisc/bin at the end of ~/.bashrc file 3) make vmlinux ARCH=openrisc CROSS_COMPILE=/opt/openrisc/bin/or32-linux- for generating the vmlinux file. (I am not sure if this is the correct command, but it compiles without errors) 4) then am using the command, or32-elf-sim -f sim.cfg vmlinux Hi Anantha You are using the wrong simulator configuration file. You should find a configuration file for Linux in the arch/openrisc directory of the Linux kernel source. HTH Jeremy |
|||
|
RE: Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by antygan on Nov 14, 2011 |
antygan
Posts: 10 Joined: Dec 2, 2010 Last seen: Jan 26, 2015 |
||
|
Thanks Jeremy. I used the correct configuration file now and have the following results,
1) The result stops at, Configuring loopback device and is gets hung at this point indefinitely. The complete results are attached in the result1 file. 2) I came across an article in Embecosm website, which asks to change the config file: a) in the ethernet section change the enabled to 0 b) comment the sockif line After using this changed config file, i get an exception because of an infinite loop. The complete result is attached in the result2 file. Kindly help me how to solve this problem. Thanks & Regards, Anantha
result1 (5 kb)
result2 (12 kb)
|
|||
|
RE: Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by jeremybennett on Nov 15, 2011 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Thanks Jeremy. I used the correct configuration file now and have the following results,
1) The result stops at, Configuring loopback device and is gets hung at this point indefinitely. The complete results are attached in the result1 file. 2) I came across an article in Embecosm website, which asks to change the config file: a) in the ethernet section change the enabled to 0 b) comment the sockif line After using this changed config file, i get an exception because of an infinite loop. The complete result is attached in the result2 file. Kindly help me how to solve this problem. Hi Anantha, Linux has changed a lot since the Embecosm application note was written, so please ignore it. I think the issue is due to Ethernet support. In simulation, you can use TUN/TAP to simulate a connection to your LAN, but this does require root access on your workstation. This is only supported in the latest SVN version of Or1ksim. The Or1ksim user guide has a section on configuring the TUN/TAP interface (page 11 of the PDF version). The alternative is to disable the Ethernet, by setting the enabled flag to 0 in or1ksim.cfg and commenting out any troublesome parameters like sockif. However I think this is what you tried to do with your second run, and I don't understand what went wrong. The kernel panicked after disabling the boot console. This really needs someone with more Linux expertise. I suggest you try IRC channel #opencores on freenode.net. There are usually experts to be found there. HTH Jeremy |
|||
|
RE: Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by sfielding on Nov 21, 2011 |
sfielding
Posts: 6 Joined: Feb 25, 2004 Last seen: Dec 22, 2020 |
||
|
I started from scratch using clean Fedora 12.
When I run: ./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux I get the following errors: gcc -c -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -I/opt/or1ksim/include -I. -I../../.././gdb-7.2/sim/or32 -I../common -I../../.././gdb-7.2/sim/or32/../common -I../../include -I../../.././gdb-7.2/sim/or32/../../include -I../../bfd -I../../.././gdb-7.2/sim/or32/../../bfd -I../../opcodes -I../../.././gdb-7.2/sim/or32/../../opcodes -g -O2 ../../.././gdb-7.2/sim/or32/wrapper.c ../../.././gdb-7.2/sim/or32/wrapper.c: In function �sim_resume�: ../../.././gdb-7.2/sim/or32/wrapper.c:650:10: error: �OR1KSIM_RC_HALTED� undeclared (first use in this function) I checked or1ksim.h, and indeed OR1KSIM_RC_HALTED is missing, but it is present in version 0.5.0 of or1ksim. |
|||
|
RE: Linux and Toolchain build problemspt/openrisc/or32-linux/bin needs to be added to instructions?
by yu.yu.panin on Dec 18, 2011 |
yu.yu.panin
Posts: 1 Joined: Nov 22, 2011 Last seen: Jan 26, 2012 |
||
|
Thanks Jeremy. I used the correct configuration file now and have the following results,
1) The result stops at, Configuring loopback device and is gets hung at this point indefinitely. The complete results are attached in the result1 file. 2) I came across an article in Embecosm website, which asks to change the config file: a) in the ethernet section change the enabled to 0 b) comment the sockif line After using this changed config file, i get an exception because of an infinite loop. The complete result is attached in the result2 file. Kindly help me how to solve this problem. Thanks & Regards, Anantha
result1 (5 kb)
result2 (12 kb)
I've had this problem before. Here's the quote from Jeremy's "The OpenCores OpenRISC 1000 Simulator and Tool Chain Installation Guide" @ Embecosm: Find section uart. This specifies that the channel for I/O should be via TCP port 84. This will probably fail, since the port is in the Well Known Ports range, requiring administrative privileges. If it is desired to run Linux through a telnet link, this should be changed to a value in the Dynamic Range (49152-65535). A separate window can then connect to this port using telnet. Rather more elegant is to use an xterm for output. For this, change the channel specification to channel = "xterm:" -------------------------------- That did it for me. P.S. Install xterm beforehand. yum install -y xterm if you're running CentOS. Best of luck, Yu. |
|||
1/1

