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

uboot uclinux boot

Altera_Forum
Honored Contributor II
1,722 Views

hi all, 

 

I am tring to boot uclinux-1.3 from u-boot-1.1.3 on altera 2s60 board.  

I can download and boot uboot on the board sucessfully and also uclinux-1.3 by directly downloading into sdram or buring vmlinux.img file into flash through quratus flash programmer. 

 

Both, u-boot and uclinux are fine individually..... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

The problem which I am facing is when I try to boot my vmlinux.img ( maked through mkimage utility with -a 0x01000000 -e 0x01000000) ..... the terminal is totally blank ....... 

 

seems like linux never gets control (executed) once u-boot passes control to location 0x01000000 (linux kernel entry address).  

 

I tried keeping LED blinking code (tested in linux as well as u-boot) in my head.S file of linux which will blink 3 leds on the board and its not happening which means linux never got executed. 

 

I am confirm about u-boot passing control to memory address 0x01000000 as my prints are there in bootm command source code after disabling interrupt and before calling (kernel) (); 

 

My question to the forum is ... Is there any one who has booted any linux from any u-boot ever on any altera board. 

 

I have searched on the nios forum for same but all the discussions were over with incomplete state or any success in this area is never submitted on web or any forum. 

 

Can any one suggest me some solutions or share his/her experince over similar issue. Or please direct me to proper links if some details are given on web. 

 

Any Reply or Help is highly appreciated 

 

thanks in advance 

 

Ankur Maheshwari
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
930 Views

Hello,currently I am working on porting uclinux and uboot on my Cyclone board and I ported uClinux and uboot on Samsung&#39;44b0 board some time ago. I have a question to ask, before uploading our kernel image to the board, we must build a niosCPU and download it to the board? Or can you give me some detailed file on porting uclinux to nios board? 

Thank you in advance 

my e-mail is : scut_ak@163.com 

 

 

 

 

 

 

 

 

 

 

 

 

--- Quote Start ---  

originally posted by ankur@Apr 20 2006, 05:51 AM 

hi all, 

 

i am tring to boot uclinux-1.3 from u-boot-1.1.3 on altera 2s60 board.  

i can download and boot uboot on the board sucessfully and also uclinux-1.3 by directly downloading into sdram or buring vmlinux.img file into flash through quratus flash programmer. 

 

both, u-boot and uclinux are fine individually..... http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif  

 

the problem which i am facing is when i try to boot my vmlinux.img ( maked through mkimage utility with -a 0x01000000 -e 0x01000000) ..... the terminal is totally blank ....... 

 

seems like linux never gets control (executed) once u-boot passes control to location 0x01000000 (linux kernel entry address).  

 

i tried keeping led blinking code (tested in linux as well as u-boot) in my head.s file of linux which will blink 3 leds on the board and its not happening which means linux never got executed. 

 

i am confirm about u-boot passing control to memory address 0x01000000 as my prints are there in bootm command source code after disabling interrupt and before calling (kernel) (); 

 

my question to the forum is ... is there any one who has booted any linux from any u-boot ever on any altera board. 

 

i have searched on the nios forum for same but all the discussions were over with incomplete state or any success in this area is never submitted on web or any forum. 

 

can any one suggest me some solutions or share his/her experince over similar issue. or please direct me to proper links if some details are given on web. 

 

any reply or help is highly appreciated 

 

thanks in advance 

 

ankur maheshwari 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14504) 

--- quote end ---  

 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
930 Views

To Ankur, 

Please give how you mkimg, bootm, and u-boot log messages. Let forum see what happens .
0 Kudos
Altera_Forum
Honored Contributor II
930 Views

 

--- Quote Start ---  

originally posted by mountain8848@Apr 20 2006, 08:05 AM 

to ankur, 

please give how you mkimg, bootm, and u-boot log messages. let forum see what happens . 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14511) 

--- quote end ---  

 

--- Quote End ---  

 

 

OK.. 

 

I am building my uclinux in linux environment 

 

For mkimg ...... 

 

objcopy -O binary vmlinux vmlinux.bin 

 

gzip -9 vmlinux.bin 

 

mkimage - A nios2 -O linux -T kernel -C gzip -a 01000000 -e 01000000 -n &#39;linux-2s60es&#39; -d vmlinux.bin.gz vmlinux.img 

 

 

for bootm  

 

I download my vmlinux.img at 01000000 and my file system at 01900000 (file system I image I have taken form nios-II ide) 

 

then 

bootm 01000000 01900000 

 

then prints comes which is between disable_interrupt and kernel(); call (I have used ppc kernel function call). 

 

"Transferring control to Linux at ......." 

 

 

After this print screen goes blank 

 

thanks 

Ankur
0 Kudos
Altera_Forum
Honored Contributor II
930 Views

 

--- Quote Start ---  

 

Hello,currently I am working on porting uclinux and uboot on my Cyclone board and I ported uClinux and uboot on Samsung&#39;44b0 board some time ago. I have a question to ask, before uploading our kernel image to the board, we must build a niosCPU and download it to the board? Or can you give me some detailed file on porting uclinux to nios board? 

Thank you in advance 

my e-mail is : scut_ak@163.com 

 

 

hi scut, 

 

Till now I have worked on 1s40es and 1s60es development kits, which comes along quartus and nios ide software cds. We have build our niosCPU (fpga image file OR .sof) file through quartus-II 4.2 and for compiling my linux I have used same installation in linux system or we can build our linux with nios ide s/w. 

 

thanks 

Ankur
0 Kudos
Altera_Forum
Honored Contributor II
930 Views

Hi Ankur, 

 

> gzip -9 vmlinux.bin 

> mkimage - A nios2 -O linux -T kernel -C gzip -a 01000000 -e 01000000 -n 

> &#39;linux-2s60es&#39; -d vmlinux.bin.gz vmlinux.img 

 

Since you&#39;re using a compressed kernel ... 

 

> I download my vmlinux.img at 01000000 

 

... you need to load the image somewhere else. Otherwise, u-boot will decompress 

the kernel over the compressed image (the compressed image gets corrupted). 

Try downloading the image to a higher address, say 0150_0000 or something. 

Then when it is decompressed to 0100_0000 you won&#39;t have any overlap. 

 

> bootm 01000000 01900000 

 

Specifying a ramdisk using the bootm command won&#39;t work. The kernel doesn&#39;t 

accept parameters from the bootloader. You&#39;ll have to use another technique. 

 

> Is there any one who has booted any linux from any u-boot ever on any 

> altera board. 

 

Yes, there are many people who used u-boot to with several versions of linux 

(and ecos) on a variety of altera (and custom) boards. Don&#39;t get frustrated, 

you&#39;re very close to success :-) 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
930 Views

hi Scott, 

 

thanks for the info, my load address for kernel image is 0130_0000, mistakenly I wrote 0100_0000. 

 

I have noted down bootm limitation also. 

 

I will update the forum as soon as I get any success. 

 

thanks once again 

 

Ankur Maheshwari  

 

 

 

 

--- Quote Start ---  

originally posted by smcnutt@Apr 20 2006, 09:55 AM 

hi ankur, 

 

> gzip -9 vmlinux.bin 

> mkimage - a nios2 -o linux -t kernel -c gzip -a 01000000 -e 01000000 -n 

> &#39;linux-2s60es&#39; -d vmlinux.bin.gz vmlinux.img 

 

since you&#39;re using a compressed kernel ... 

 

> i download my vmlinux.img at 01000000 

 

... you need to load the image somewhere else. otherwise, u-boot will decompress 

the kernel over the compressed image (the compressed image gets corrupted). 

try downloading the image to a higher address, say 0150_0000 or something. 

then when it is decompressed to 0100_0000 you won&#39;t have any overlap. 

 

> bootm 01000000 01900000 

 

specifying a ramdisk using the bootm command won&#39;t work. the kernel doesn&#39;t 

accept parameters from the bootloader. you&#39;ll have to use another technique. 

 

> is there any one who has booted any linux from any u-boot ever on any 

> altera board. 

 

yes, there are many people who used u-boot to with several versions of linux 

(and ecos) on a variety of altera (and custom) boards. don&#39;t get frustrated, 

you&#39;re very close to success :-) 

 

regards, 

--scott 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14517) 

--- quote end ---  

 

--- Quote End ---  

0 Kudos
Reply