Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,166 Views

Running uClinux on the DE2-115

Hi all, 

 

Have anyone successfully run the uClinux on a DE2-115? I was able to get the uClinux version 3.1 to run on the NEEK kit and would like to try it on the DE2-115, but run into "Pausing target processor: not responding" problem. Sometime I got it to download, but it always end up "Verify failed between address". I realize the DE2-115 have DDR instead of DDR2 in the NEEK, and the nios.h in uClinux only have DDR2_TOP_BASE for the base address. Do I have to change it to DDR_TOP_BASE? or does it really matter to the uClinux? Any help is greatly appreciated. 

 

Thanks.
0 Kudos
28 Replies
Altera_Forum
Honored Contributor I
50 Views

Hello! 

I'm trying to launch uClinux on DE2-115 too. I'm using sdram to download initramfs zImage to it, and there is no verifying problem with it. Can you contact me (I can't PM you because of low number of messages). vadya90 at gmail.com
Altera_Forum
Honored Contributor I
50 Views

I just put together a kind of how-to for uClinux on DE2-115. You'll find it here: http://82.145.55.202/uclinux_nios2_custom_hardware.pdf

Altera_Forum
Honored Contributor I
50 Views

I just recently put together a how-to for uClinux on DE2-115. Hope this info is helpful. 

 

http://82.145.55.202/uclinux_nios2_custom_hardware.pdf
Altera_Forum
Honored Contributor I
50 Views

Hi, 

 

I successfully got the uClinux to run on the DE2-115 board, but I am still a newbie and wouldn't claim myself an expert to this subject. I will try to answer your problem if you able to post any failure message. Were you able to download your zImage?
Altera_Forum
Honored Contributor I
50 Views

Hello! 

Ok. My main problem is that after nios2-download nothing happens. And so, I don't know what's the problem. zImage is successfully downloaded, As terminal i tried to use both nios2-terminal and uart terminal. Do you use qsys or sopcbuilder and device tree or not? Maybe someone knows, how uClinux can boot if I download only zImage.initramfs.gz? Is u-boot integrated into it? I use sdram for this image. Should reset address point to base address of sdram in this case?
Altera_Forum
Honored Contributor I
50 Views

 

--- Quote Start ---  

Hi, 

 

I successfully got the uClinux to run on the DE2-115 board, but I am still a newbie and wouldn't claim myself an expert to this subject. I will try to answer your problem if you able to post any failure message. Were you able to download your zImage? 

--- Quote End ---  

 

 

apparently everyone is have problems getting UClinux to work on the DE2-115 how about a newbie friendly step by step tutorial on how u implemented it? that would be a great help for everybody :)
Altera_Forum
Honored Contributor I
50 Views

Hi vdvoznyuk,  

 

"as terminal i tried to use both nios2-terminal and uart terminal." 

I use nios2-termainal only 

 

"do you use qsys or sopcbuilder" 

I use qsys. SOPC Builder is going away very soon. 

 

and device tree or not? 

I have device tree build from the QSYS sopcinfo. Basically, you have to have device tree in all the latest uClinux version (3.1, 3.7) 

 

how uclinux can boot if i download only zimage.initramfs.gz? is u-boot integrated into it? 

Yes, the boot loader should be already included. The default boot copier is automatically and transparently added to your system when you convert your executable file to flash programming files. Unless you wanted to have a custom boot copier, which I don't even have on my design.  

 

i use sdram for this image. should reset address point to base address of sdram in this case?  

Absolutely not, the reset address I have is pointing at the flash memory which where my zIMage/firmware store at. It really depend on your design, but the DE2-115 has flash memory for you to store the zImage. Definite not pointing at the sdram because the boot copier will copy the zImage to the sdram where it will be executed.  

 

Things I would recommend are: 

- Correct the reset address to point to the right memory device 

- I have the same problem you have couple days ago, but no one responded my help request. Firmware was able to load but wouldn't start up. Nonetheless, I bypassed it. Make sure your uClinux Kernel memory base address is align with the hardware sdram base address. 

 

Which uClinux version are you using 3.1 or 3.7? I got both of them working. There are difference in between. 3.1 is with nios.h for hard coding in the base address, and 3.7 is through the menuconfig -> platform options. 

 

Let me know if this helps. 

 

Thanks.
Altera_Forum
Honored Contributor I
50 Views

I have written a document on how to get uClinux up and running on DE2-115 board, see attached file. 

Hope it will be useful.
Altera_Forum
Honored Contributor I
50 Views

That's an excellent reference. Thanks for the post.

Altera_Forum
Honored Contributor I
50 Views

 

--- Quote Start ---  

I have written a document on how to get uClinux up and running on DE2-115 board, see attached file. 

Hope it will be useful. 

--- Quote End ---  

 

 

Thank you so much !!!
Altera_Forum
Honored Contributor I
50 Views

i'm currently going through "n0ll4n" tutorial (very informative), 

just one thing though... in the kernel configuration, setting the start of the SDRAM would be in my case 0x00000000 right? (btw im using DE2-115) 

and if that's right how do i calculate the "link address offset" ? 

 

sorry i couldn't paste the dts file since i dont have enough posts 

so i attached the dts file 

 

thanks in advanced
Altera_Forum
Honored Contributor I
50 Views

Thank you very much! 

I use make version 3.82 and uClinux builds succesfully. Is it critical to use 3.81 or less?
Altera_Forum
Honored Contributor I
50 Views

vdvoznyuk: 

It was critical for me, I *had* to use make 3.81, with 3.82 it was a nightmare, lots of "errors" in Makefiles and such. With 3.81 it worked directly. 

 

sam3oun: 

You should use 0x00000000 as start for SDRAM, correct. There is a way of calculating the link address offset, i think it is supposed to be 2/3 of the SDRAM size. However, I used 0x01000000, which worked perfectly.
Altera_Forum
Honored Contributor I
50 Views

Hi! 

Thanks for your advices! My problem was easy, as I thought: I just didn't set link address offset. Now I can see starting system, but there is a new error: 

 

Unable to handle kernel NULL pointer dereference at virtual address 00000000 

ea = c02381dc, ra = c02381dc, cause = 14 

Kernel panic - not syncing: Oops
Altera_Forum
Honored Contributor I
50 Views

ok so i tried with the 0x0100000 link offset ... now when booting uclinux it hangs with 

turn off boot console early0 

 

what does it mean? 

 

Edit: 

ok got it to work by enabling "SERIAL_ALTERA_UART_CONSOLE" in kernel settings, uclinux booted !!!  

thank you every1 here who helped!!!! 

 

EDIT2: 

u can find more information about linux config for: 

1-JTAG UART or Serial UART  

2-link offset calculation 

 

in the following link: 

http://www.alterawiki.com/wiki/linux_config
Altera_Forum
Honored Contributor I
50 Views

Hi sam3oun, I believe this error message means it doesn't know where to load the application. I have this error message before but it went away after I correct the memory base address to point to the sdram base address showing in the Qsys. 0x0100000 sounds about right for the link offset address in DE2115 kit.

Altera_Forum
Honored Contributor I
50 Views

Hi,  

 

I am trying to mount the MMC/SD by following the instruction in http://www.nioswiki.com/operatingsystems/uclinux/mmcsd and using n0114n's document as reference. Nonetheless it doesn't work... 

 

I am suppose to see this message in boot up right?? But it doesn't show up... 

mmc_spi spi2.0: assuming spi bus stays unshared! 

mmc_spi spi2.0: assuming 3.2-3.4 v slot power  

mmc_spi spi2.0: sd/mmc host mmc0, no dma, no wp, no poweroff 

 

My next question would be on my pin mapping. Is this correct?? 

sd_dat[0] --> miso 

sd_cmd <-- mosi 

sd_clk <-- sclk 

sd_dat[3] <-- ss_n 

 

I tried to mount it with no luck 

/> mount -t vfat /dev/mmcblk0p1 /mnt 

mount: mounting /dev/mmcblk0p1 on /mnt failed: no such device or address 

 

I read post to add the follow lines into the top level design. I tried to add them but compiled with errors, so I am not sure what I have to do, and if anyone know, please kindly let me know. 

.miso_to_the_mmc_spi (sd_dat), 

.mosi_from_the_mmc_spi (sd_cmd), 

.sclk_from_the_mmc_spi (sd_clk), 

.ss_n_from_the_mmc_spi (sd_dat3), 

 

Thanks!
Altera_Forum
Honored Contributor I
50 Views

sorry this post was accedently deleted: (should be post# 16) 

 

ok so i tried with the 0x0100000 link offset ... now when booting uclinux it hangs with 

turn off boot console early0 

 

what does it mean? 

 

Edit: 

ok got it to work by enabling "SERIAL_ALTERA_UART_CONSOLE" in kernel settings, uclinux booted !!!  

thank you every1 here who helped!!!! 

 

EDIT2: 

u can find more information about linux config for: 

1-JTAG UART or Serial UART  

2-link offset calculation 

 

in the following link: 

www . alterawiki . com / wiki / Linux Config
Altera_Forum
Honored Contributor I
50 Views

say i wanted to load uclinux from the flash memory in the de2-115 board 

do i point the base address the the beginning of the sdram and point the link offset to the beginning of the flash? 

or am i getting this wrong? 

from my understanding the processor starts from the link offset address and extracts the uclinux image to the base address and starts from the base address ... am i correct?