Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
1,232 Views

Linux doesn't boot --> Please Help

Hello all, 

i still have problems to boot uCLinux on my FPGA-System. 

I carefully read every article within the Linux categorie on the Altera wicki. 

I'am the nios2-branch and checked out the latest stable version tagged with v3.1-nios2. I am also able to configure and build the kernel, but when i download the zImage.initramfs.gz to my hardware i only got the following printout: 

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

Pausing target processor: OK 

Initializing CPU cache (if present) 

OK 

Downloaded 3532KB in 218.2s (16.1KB/s) 

Verified OK in 1.5s (2354.6KB/s) 

Starting processor at address 0xD1000000 

bernd@linux-n1m0:~/Data/nios2-linux/uClinux-dist/images> nios2-terminal 

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

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

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

����������������������������������������������������� 

As you can see, the caracters at the nios2-terminal are not printable! 

It looks like a wrong Baudrate? --> But i use jtag uart insted of an ordinary uart. 

So perhaps there is something wrong with the address setup? 

I will enclose my sopcinfo, dts, and kernel-config files. 

It would be very nice, if someone could give me some usefull hints!
0 Kudos
12 Replies
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Did you select the proper serial driver (SERIAL_ALTERA_JTAGUART) and console support (SERIAL_ALTERA_JTAGUART_CONSOLE) in kernel configuration (you posted your uClinux-dist config instead of your kernel config)? You might also need to set SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS.

0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Yes is select the device driver and console support for the JTAG UART, but i didn't set the SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS. 

I also changed the bootargs within the dts file to: 

bootargs = "debug console=ttyJ0,115200" 

I will test console-bypass option. 

Where can i find the kernel config? 

Is it a problem using kernel v3.1?? (in the first window, comming up when entering make xconfig there is an entry "Kernel is linux-2.6.x") 

Thanks
0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

If I enable the bypass feauture, i don't even see symbols on the terminal any more.

0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

What about the address? 

My SDRAM is located at 0x10000000 (as recomended by the Altera wiki) but Download beginns at address 0xD1000000 and the processor starts at address 0xD1000000. 

Is this ok? and why?
0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Yes, the address looks correct. 0xC0000000 is added to map the address into the kernel memory region. 

 

You can find the kernel config in uClinux-dist/linux-2.6.x/.config, but that should be ok then, if you followed the instructions from the wiki.
0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

OK thank you. 

Here is my kernel-config.... 

Does my SOPC-System match all requirements (eg. timer, interrupt, memory, etc)?
0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Hello folks, 

i have played araound with some further configuration parameters but without  

nothing was successfull yet. 

I have also checkedout the v3.2-nios2 kernel version. 

I think there must be something wrong with my kernel configuration (see atachment). 

It would be very nice, if someone out there could give some hints....
0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Have you tried running something other than Linux/uClinux on the hardware??

0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Yes! 

I have configured the cpu without MMU and tested the hardware by writing a simple programm (based on the Altera hal). This programm uses a timer-callback to print out messages on the JTAG-UART every second. Everything worked fine. 

I will enclose my very very simple quartus project, perhaps there is something wrong with address and/or irq-configuration? 

Or must there always be a flash-memory available within the system?
0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Hello folks, 

i got a little bit further! 

Linux boots now!:) 

I simple downloaded linux.initramfs.gz instead of the zImage! 

There must be something wrong with the CONFIG_BOOT_LINK_OFFSET 0x01000000 within the configuration. 

When is try to reboot linux, i got the following message: 

Unable to handle kernel paging request at virtual address 01000000 

ea = c0400090, ra = d0001e38, cause = 15 

Kernel panic - not syncing: Oops 

 

Any ideas?
0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Some time ago I had also problem wih booting but I found where was the problem. Wrote it in this post: http://www.alteraforum.com/forum/showthread.php?p=115493#post115493

0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Linux doesn't boot --> Please Help

Everything is fine now! 

After changing the link-offset-address for the zImage to a proper value i can download this image to the ram and everything worked fine. 

Thank's
0 Kudos