OpenCores
no use no use 1/1 no use no use
A Problem of linux run on minsoc
by anthony5000 on Oct 13, 2011
anthony5000
Posts: 18
Joined: Jul 16, 2011
Last seen: Jun 5, 2014
Hi everyone,

I am trying to run linux on minsoc and I get some problems. I plan to use Advanced debug system to upload linux kernel to the RAM directly and set pc to 0x100 and continue to see the booting process. And many versions has been tried. Blow are descriptions for different cases. All kernels I used are from : http://git.openrisc.net/cgit.cgi/jonas/linux/

Linux 2.6.35 : From uart, I get "Ok, booting the kernel. Runarunaround: Unhandled exception 0x200 : EPC=0x2148"

Linux 2.6.36 & 2.6.37 : I couldn't finish the make with default config. It said "arch/or32/kernel/vmlinux.lds:240: undefined symbol `jiffies_64' referenced in expression"

Linux 3.1 rc6: The compilation process works well. But I couldn't get correct result using or32-elf-sim to simulate the kernel file: vmlinux. The simulation exits automously after the "******counter reset********" section. If I enable the debug in or1ksim.cfg, the system will suspend at counter reset section. After I upload the vmlinux to FPGA, I get nothing output.

Other questions: In newer version linux kernels, I couldn't find the file to define some basic information of the board. Such file seems to be found at: /arch/or32/include/asm/board.h. In this file I needs to define base address for devices. But I couldn't find one counterpart in 2.6.37/36/ 3.1 rc6. Besides, I don't know how to set clock frequency in these versions either.

My experiment condition:
Cyclong II : EP2C35

Any help will be appreciated sincerely.

Anthony
RE: A Problem of linux run on minsoc
by rfajardo on Oct 13, 2011
rfajardo
Posts: 306
Joined: Jun 12, 2008
Last seen: Jan 6, 2020
Hi Anthony,

the Linux kernel would generally not fit in the onchip memory amount used by minsoc. Did you include another memory controller for some offchip memory?

Other people can certainly help you better with the simulator.

Regards,
Raul
RE: A Problem of linux run on minsoc
by rfajardo on Oct 13, 2011
rfajardo
Posts: 306
Joined: Jun 12, 2008
Last seen: Jan 6, 2020
Hi Anthony,

you might consider uploading first a bootloader to your board. The bootloader enables the upload of firmwares to the main memory by sending the firmware through Ethernet. I never tested any bootloader under minsoc so it might need some adaptations, modules addressing probably (Ethernet + UART). Also, this might be the case for the kernel too.

These are the documented bootloader options:
http://opencores.org/or1k/OR1K:Community_Portal#Bootloaders
U-boot has been recommended:
git://openrisc.net/stefan/u-boot

If you are happy with one of the bootloaders you can burn them to some flash memory to auto-initialize them on start. More information on that here: http://www.minsoc.com/minsoc_faq#i_want_my_design_to_automatically_initialize_my_firmware_on_power-up_how_do_i_do_that

Best regards,
Raul
RE: A Problem of linux run on minsoc
by anthony5000 on Oct 13, 2011
anthony5000
Posts: 18
Joined: Jul 16, 2011
Last seen: Jun 5, 2014
Hi Raul,

Thanks for your reply. I am sorry I forget to mention that I have attached one memory controller IP to enable my SDRAM. The SDRAM is a 64-bit width and 64MBytes large in total.

Is it required to attach flash IP and download bootloader for booting linux? I mean, I use GDB to download "vmlinux" into the SDRAM directly.

What the error: "unhandled exception 0x200 EPC=0x2148" means? They system has ever sent a SIGBUS signal to GDB, but the signal does not appear regularly.

Best regards,
RE: A Problem of linux run on minsoc
by rfajardo on Oct 13, 2011
rfajardo
Posts: 306
Joined: Jun 12, 2008
Last seen: Jan 6, 2020
Is it required to attach flash IP and download bootloader for booting linux? I mean, I use GDB to download "vmlinux" into the SDRAM directly.

What the error: "unhandled exception 0x200 EPC=0x2148" means? They system has ever sent a SIGBUS signal to GDB, but the signal does not appear regularly.


A bootloader is not required. I just supported the idea of using one for your comfort.

The exception 0x200 is bus error. I would really believe this is the processor trying to access a module in an undefined address range.

You have to carefully update the Linux kernel with the addresses of the modules of minsoc on minsoc_defines.v.

These addresses are also listed under board.h (minsoc/sw or minsoc/backend), but these are only images with the same values for software access, the real ones are the ones defined for RTL on minsoc_defines.v.

Of course, you can do it one way or the other, either update minsoc with the values of the kernel or the kernel with the values of minsoc.

This post could help you further:
http://opencores.org/forum,OpenRISC,0,4004

I'm looking forward to hear about your progress.

Raul
RE: A Problem of linux run on minsoc
by ppfromero on Jul 9, 2013
ppfromero
Posts: 4
Joined: Jul 7, 2008
Last seen: Feb 6, 2014
Hello Anthony and Raul, I want to know if you have some news installing linux in minsoc. Do you have some info about this subject?. I'm using xfguo git repository for de2-115 backend files and svn minsoc repository. I have some problems installing quartus in my debian but the next step is to embed linux from jonas repository. Thanks for your help.
José
no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.