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++

Loading ucLinux on DE2

Altera_Forum
Honored Contributor II
1,175 Views

Hi, 

 

I am trying to load ucLinux on DE2. I compiled the kernel without ATA/ATAPI/MFM/RLL and networking support.  

 

But i could not find the option to set Link address offset for booting as specified in post.  

 

http://forum.niosforum.com/forum/index.php?showtopic=3174 (http://forum.niosforum.com/forum/index.php?showtopic=3174) 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

Processor type and features-->(0x00500000) Link address offset for booting[/b] 

--- Quote End ---  

 

 

I used Nios-II IDE to compile the kernel. I thought it would create problems only while booting the Kernel so proceeded with compilation. Kernel compiled succesfully. It created two files. vmlinux and vmlinux.bin. I thought vmlinux.bin is compressed version of vmlinux. vmlinux is 8.4MB and vmlinux.bin is 1MB.  

 

I used following command to download linux: 

nios2_download -g vmlinux.bin 

and i get following error: 

./vmlinux.bin File format not recognized. 

I tried using gzip on vmlinux and uploading vmlinux.gz there also i get the same error. 

 

One more problem is I am not sure if the kernel is being downloaded to flash or sdram. How can I specify that kernel should be loaded to sdram? should i do it in SOPC builder?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
458 Views

mythri, 

 

I load the De2 board with following commands. 

1. Bin -> Flash 

bin2flash --input=vmlinux.bin --output=vmlinux.flash --location=0x0 

2. Erase Flash 

nios2-flash-programmer --debug --erase=0x0+0x200000 --base=0x2000000 

3. Load Linux 

nios2-flash-programmer --base=0x2000000 --debug vmlinux.flash 

 

The Reset Address needs to be specified in SOPC builder 

The base Address depends on your settings in SOPC builder
0 Kudos
Reply