Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

Running uClinux on the DE2-115

Altera_Forum
Honored Contributor II
2,107 Views

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 II
209 Views

I've watched the video and read the *.pdf by Johan. I'm using the DE2-115 Board and I got a design from the hardware guy.  

I ran the sopc2dts gui and created my *.dts file did the make and got the kernel image. The download works fine but when I boot -- 

this was due to the fact that my timer was "unknown" in the *.dts 

i can now boot. i do have to use the serial port as the uart console. i could not get it to work using the jtag as the console. i'm figuring it is something to do with the *.dts file?  

before i switched to uart console - i was getting the "turn off boot console early0" 

 

my question about download below (for the cyclone iii evaluation board the download is 0xdxxxxxxx = usually 0xd1000000 if you use the 0x01000000 offset) 

 

[NiosII EDS]$ nios2-terminal[NiosII EDS]$ nios2-terminal 

nios2-terminal: connected to hardware target using JTAG UART on cable 

nios2-terminal: "USB-Blaster [2-2]", device 1, instance 0 

nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) 

 

Linux version 3.7.0-01377-g1061bd7 (janet@localhost.localdomain) (gcc version 4.1.2)# 130 Sat Mar 16 16:29:34 PDT 2013 

bootconsole [early0] enabled 

early_console initialized at 0xe90040d0 

On node 0 totalpages: 32768 

free_area_init_node: node 0, pgdat c05a2ac0, node_mem_map c05b9540 

DMA zone: 256 pages used for memmap 

DMA zone: 0 pages reserved 

DMA zone: 32512 pages, LIFO batch:7 

pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 

pcpu-alloc: [0] 0  

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 

Kernel command line:  

PID hash table entries: 512 (order: -1, 2048 bytes) 

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 

nios2-terminal: connected to hardware target using JTAG UART on cable 

nios2-terminal: "USB-Blaster [2-2]", device 1, instance 0 

nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) 

 

Linux version 3.7.0-01377-g1061bd7 (janet@localhost.localdomain) (gcc version 4.1.2)# 130 Sat Mar 16 16:29:34 PDT 2013 

bootconsole [early0] enabled 

early_console initialized at 0xe90040d0 

On node 0 totalpages: 32768 

free_area_init_node: node 0, pgdat c05a2ac0, node_mem_map c05b9540 

DMA zone: 256 pages used for memmap 

DMA zone: 0 pages reserved 

DMA zone: 32512 pages, LIFO batch:7 

pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 

pcpu-alloc: [0] 0  

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 

Kernel command line:  

PID hash table entries: 512 (order: -1, 2048 bytes) 

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 

Memory available: 124052k/5850k RAM (2387k kernel code, 3462k data) 

NR_IRQS:64 

BUG: failure at /home/janet/nios2-linux/linux-2.6/arch/nios2/kernel/time.c:112/nios2_late_time_init()! 

Kernel panic - not syncing: BUG! 

 

***************************** 

A few questions  

1. The *.sopcinfo was generated with Qsys 10.1 - could that be an issue? Do we need to go to a newer version of Qsys? 

2. I saw that the download starts at C1000000 - is this correct? 

 

If anyone can help me become "less stupid" I'd appreciate it. 

 

Thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
209 Views

can anyone that have successfully run uClinux on DE2-115 upload the zimage and .sof please? thanks!

0 Kudos
Altera_Forum
Honored Contributor II
209 Views

Hi 

I also add .sof and zImage and Quartus project to the below thread, hope that it helps 

http://www.alteraforum.com/forum/showthread.php?t=39964
0 Kudos
Altera_Forum
Honored Contributor II
209 Views

 

--- Quote Start ---  

Hi 

I also add .sof and zImage and Quartus project to the below thread, hope that it helps 

http://www.alteraforum.com/forum/showthread.php?t=39964 

--- Quote End ---  

 

 

I have successfully gotten MMU going on the DE2-115 with 1Gbyte Ethernet (eth0) and we have a daughter card with a Compact Flash that is also up and running. I am in the process of adding a custom device driver for our unique entry in the *.dts that is custom. Still using 10.1 because the hardware guy has had no time to update. 

 

My advise to getting MMU going would be: 

1. Watch the video referenced AND read the *.pdf in this thread. 

2. Don't just 'blindly' think the "sopc2dts gui" will have what you need (I had to fix my timer and change the "cf" entry a bit). From other posts, I was figuring I'd have to do the same for the TSE but it worked first time. 

3. With the DE2-115 Evaluation board I did not have success getting "JTAG as console" but knew from a previous project that the interface had some issues. So, I went with the "UART as console" and it works great. 

 

Understand the *.dts and your hardware design. The "spoc2dts gui" is FANTASTIC for getting started but when you work at this level if it doesn't work the first time, then you need to study the boot messages.
0 Kudos
Altera_Forum
Honored Contributor II
209 Views

Hi 

I read the below article but i'm not successful in implementing TSE in uClinux 

http://www.alterawiki.com/wiki/ethernet 

I actually don't know where the problem is, the Quartus project or the uClinux Configuration 

Could you please provide tutorial how to add TSE to uclinux or Upload your Quartus Project? 

 

Thank you
0 Kudos
Altera_Forum
Honored Contributor II
209 Views

 

--- Quote Start ---  

Hi 

I read the below article but i'm not successful in implementing TSE in uClinux 

http://www.alterawiki.com/wiki/ethernet 

I actually don't know where the problem is, the Quartus project or the uClinux Configuration 

Could you please provide tutorial how to add TSE to uclinux or Upload your Quartus Project? 

 

Thank you 

--- Quote End ---  

 

 

THIS IS WHAT I DID FOR THE DE2-115 EVALUATION BOARD: 

 

O.K. -- First there is a very good post titled "TSE (Triple Speed Ethernet) MAC on uClinux with MMU" Of course it is on the "unstable-nios2mmu" 

 

1. Make sure you are working in the new "nios2" branch  

2. My *.sopcinfo file was generated with 10.1 - I'm assuming that later versions don't have bugs. 

3. I created a *.dts file with sopc2dts gui (I did not have to do ANY modifications to the tse entry) Here it is below (of course your values will depend on your design) 

tse_mac: ethernet@0x9002000 { 

compatible = "ALTR,tse-10.1", "ALTR,tse-1.0"; 

reg = < 0x09002000 0x00000400 

0x09002440 0x00000040 

0x09002400 0x00000040 

0x09006000 0x00001000 >; 

interrupt-parent = < &cpu >; 

interrupts = < 11 10 >; 

ALTR,rx-fifo-depth = < 2048 >; /* embeddedsw.CMacro.RECEIVE_FIFO_DEPTH type NUMBER */ 

ALTR,tx-fifo-depth = < 2048 >; /* embeddedsw.CMacro.TRANSMIT_FIFO_DEPTH type NUMBER */ 

address-bits = < 48 >; 

max-frame-size = < 1518 >; 

local-mac-address = [ 00 00 00 00 00 00 ]; 

phy-mode = "rgmii"; 

ALTR,mii-id = < 0 >; 

}; //end ethernet@0x9002000 (tse_mac) 

 

4. In uClinux -- First I would see if your design boots without changing anything for the ethernet. Just use the default settings. This will verify that your console is working properly, etc. 

5. change your uClinux to use the correct device driver: Customize Kernel Settings 

Device Drivers - Network Device Support - Ethernet Driver Support - 

Altera Devices - Altera Triple Speed Ethernet MAC 

Marvell devices --- not sure I need this but it is checked now 

FORGOT - You have to have PHY support 

PHY Device support and infrastructure --> 

<*> Drivers for Marvell PHYs 

 

5. save and make 

6. Try it  

Let me know I'm not at my computer to give anymore details and show boot messages.
0 Kudos
Altera_Forum
Honored Contributor II
209 Views

I done the process and i finally able to set the ip address and set the eth0 to up and down 

but after that i set the IP address i get the below message 

libphy: Trying 1000/FULL, and it's like it stop in this step 

and also when i try to use "mii-tool" i get the below error message 

"SIOCGMIIPHY on 'eth0' failed: Operation not supported 

no MII interfaces found" 

Please give me some suggestion
0 Kudos
Altera_Forum
Honored Contributor II
209 Views

You have to give me/people more to go on than that... *.dts file, Boot messages. Are you sure your Quartus design is correct? 

You say you can assign an IP address - so, can you successfully "ping?" 

I haven't ever used "mii-tool" but I'd suggest, once again, that you post your command, and output (maybe -v verbose output will help). THAT SAID, I googled your error and found that "mii-tool" is depreciated maybe -- "ethtool" is the way to go.
0 Kudos
Reply