Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12410 Discussions

Problem Booting uClinux on DE2

Altera_Forum
Honored Contributor II
796 Views

Can anyone help me? I'm trying to get uClinux running on a DE2 board. 

Ultimately, after making an image to download, the system does not fully boot. The symptoms are similar to a thread I found on the forum: "uClinux 20100621 - connecting NIOS HW with linux" but playing with the load offset and trimming down the kernel doesn't produce any different result. 

 

Thanks in advance. 

D.W. Lynn 

 

Here are the details: 

I'm using a Centos6 system. 

For the most part I have followed the current instructions on the wiki at "Linux for the Nios II Processor" 

I did step 1, adding a "yum install libuuid-devel" as I found (later) that libuuid.a was missing on my system. I also had to make a few minor changes to makefiles since my make is 3.82. 

 

I found step 2 a bit confusing since it indicates that one should now install i"nios2-linux-20100621.tar". Is this necessary? This tarball contains what seems to be a subset of what was already installed in step 1. 

I skipped this step. 

I did go to nios2-linux/linux-2.6 and checked out the unstable-nios2mmu branch 

I then did ./checkout in nios2-linux. 

I then successfully went through step3 except I don't have a 3C120 system to test with. 

 

At this point I setup an MMU based system for my DE2 board. Following the hints in step 4, I added 1KB of dual-port tightly-coupled on-chip memory and setup the caches and assigned the fast TLB miss exception vector to address 0 in the added on-chip memory. The system also has 8MB of SDRAM at address 0x10000000, a JTAG UART, a system timer, LED and switch ports and a University program clock module (which provides a PLL for SDRAM clock timing). 

Did I miss something? I wasn't able to find any reference to a minimal set of hardware requirements. 

 

I then followed the step 8 devicetree instructions to build and include a dts file for my system. Some kernel config options were described differently, but I believe that I found and set them all. 

After configuring my .sof, I downloaded the zImage. It downloaded to 0xc1000000 through 0xc13f0000 and verified as indicated below: 

Using cable "USB-Blaster [1-1.1]", device 1, instance 0x00 

Pausing target processor: OK 

Initializing CPU cache (if present) 

OK 

Downloaded 4009KB in 21.5s (186.4KB/s) 

Verified OK  

Starting processor at address 0xC1000000 

but did not boot, as indicated below: 

[lynnd@Doug-new ~]$ nios2-terminal 

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

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

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

 

nios2-terminal: exiting due to ^C on host 

 

You can see that it did not boot. 

If I download the vmlinux image, I get the following: 

 

[lynnd@Doug-new ~]$ nios2-download -g nios2-linux/uClinux-dist/images/vmlinux  

Using cable "USB-Blaster [1-1.1]", device 1, instance 0x00 

Pausing target processor: OK 

Initializing CPU cache (if present) 

OK 

Downloaded 2795KB in 14.9s (187.5KB/s) 

Verified OK  

Starting processor at address 0xC0000000 

[lynnd@Doug-new ~]$ nios2-terminal 

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

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

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

 

Linux version 3.1.0-rc4-01162-g45c9dd8 (lynnd@Doug-new.faculty.cset.oit.edu) (gcc version 4.1.2)# 8 Mon Nov 5 16:25:58 PST 2012 

bootconsole [early0] enabled 

early_console initialized at 0xe1411050 

On node 0 totalpages: 8192 

free_area_init_node: node 0, pgdat c02bb060, node_mem_map c02d0a20 

DMA zone: 64 pages used for memmap 

DMA zone: 0 pages reserved 

DMA zone: 8128 pages, LIFO batch:0 

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

pcpu-alloc: [0] 0  

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

Kernel command line: debug console=ttyJ0,115200 

PID hash table entries: 128 (order: -3, 512 bytes) 

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) 

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) 

Memory available: 29568k/2874k RAM (2191k kernel code, 682k data) 

NR_IRQS:32 

Unable to handle kernel NULL pointer dereference at virtual address 00000000 

ea = c0227c7c, ra = c0227c4c, cause = 15 

Kernel panic - not syncing: Oops
0 Kudos
0 Replies
Reply