Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,026 Views

Help with Nios II linux from rocketboards.org

Hello! 

According to http://www.alteraforum.com/forum/showthread.php?t=42090 there is a new linux guide. So I have some question. 

Is uClinux for Nios II still being developed? If yes, what have been changed in the process of installing it to the nios2 sopc? Should I just use Blackfin dist instead of uClinux-dist? 

And about new guide from rocketboards.org. Have anyone successfully got it worked? I'm trying to boot nios II linux from RAM. This process needs u-boot. Does it just use binary executable of mkimage or use somehow it's config? (I meant that in this guide 3c120 configs are used for u-boot, but I have another board. I used to create dts and config other options from menuconfig). 

And my problem. After downloading vmlinux to the board and launching nios2-terminal, the progress stop at "bootconsole [early0] enabled early_console initialized at 0xe8003450".
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
57 Views

Hi Vdvoznyuk, 

 

First, the uClinux for nios2 will not be developed unless some one else pick up the work. The Blackfin dist migrated to buildroot last year. You may keep using the existing Blackfin uClinux-dist. Just that there won't be update of it. 

 

Second, the booting issue of rocketboards. Please check if you use irq0 on your design, change it to nonzero one. 

 

Cheers, 

Hippo
Altera_Forum
Honored Contributor I
57 Views

Unfortunately, that haven't helped. 

As I wrote, the progress stopped at "bootconsole [early0] enabled early_console initialized at 0xe8003450". My jtag_uart has address 0x08003450. So, why is there 0xe8003450 in the output, is it normal? As I know, 0xC0000000 is added to address when using MMU, but now 0xe0000000, or am I wrong? 

And still there is a question about u-boot. Does kernel make (make vmImage) use u-boot config (there are options in u-boot config, which I have in my dts)? So should I look at them (u-boot option), only use dts? 

Thanks for help
Altera_Forum
Honored Contributor I
57 Views

The 0xe prefix to address for io ports is correct, which bypass the cache. 

 

I don't quite understand your question about u-boot. In typical configuration, we can seperate kernel and dts binding and u-boot pass dtb to kernel. That is, a single kernel image can be used for several similar boards, each board has a specific dtb. So you may select u-boot in kerenel config, and you don't need to specify dts in kernel config. However, dts property name is sometime related to kernel version. 

 

There is a change in usng math code from libgcc. Please apply this patch by hand. 

 

diff --git a/arch/nios2/kernel/vmlinux.lds.S b/arch/nios2/kernel/vmlinux.lds.S 

index db9078f..e935377 100644 

--- a/arch/nios2/kernel/vmlinux.lds.S 

+++ b/arch/nios2/kernel/vmlinux.lds.S 

@@ -57,6 +57,12 @@ SECTIONS 

RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 

_edata = .; 

 

+ .got : { 

+ _GLOBAL_OFFSET_TABLE_ = .; 

+ *(.got) 

+ *(.got.plt) 

+ } 

BSS_SECTION(0, 0, 0) 

_end = .; 

 

- Hippo
Altera_Forum
Honored Contributor I
57 Views

I've got a previous MMU design from the older uClinux-dist that I know works. I have a *.dts and my *.sof that I'm not trying to get going on the Rocketboards Nios II linux-socfpga. 

 

 

I'm just downloading directly to RAM so I just goto Platform Options and select my *.dts and build the vmlinux kernel for downloading. 

 

It runs on the DE2-115 Terasic board. I have a daughter card with a compact flash adapter. So in the kernel configuration I also enable SCSI disk support and Serial ATA Generic platform device PATA support. 

 

When I do a "make vmImage" I get the following error: 

 

****************************************************************************8 

[user1@localhost linux-socfpga]$ make vmImage 

CHK include/config/kernel.release 

CHK include/generated/uapi/linux/version.h 

CHK include/generated/utsrelease.h 

CALL scripts/checksyscalls.sh 

CHK include/generated/compile.h 

DTC arch/nios2/boot/system.dtb 

AS arch/nios2/boot/linked_dtb.o 

LD arch/nios2/boot/built-in.o 

CC drivers/scsi/scsi_lib.o 

drivers/scsi/scsi_lib.c: In function 'scsi_calculate_bounce_limit': 

drivers/scsi/scsi_lib.c:1682:7: error: 'PCI_DMA_BUS_IS_PHYS' undeclared (first use in this function) 

drivers/scsi/scsi_lib.c:1682:7: note: each undeclared identifier is reported only once for each function it appears in 

make[2]: *** [drivers/scsi/scsi_lib.o] Error 1 

make[1]: *** [drivers/scsi] Error 2 

make: *** [drivers] Error 2 

[user1@localhost linux-socfpga]$  

 

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

 

Can anyone help tell me what's the problem? Thanks in Advance 

 

Oh - if I remove the SCSI I can't boot either -- I get: 

 

Linux version 3.14.0-00598-g8adb74d (user1@localhost.localdomain) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-43) )# 7 Wed May 7 13:20:41 CDT 2014 

bootconsole [early0] enabled 

early_console initialized at 0xe9004040 

BUG: failure at mm/bootmem.c:378/mark_bootmem()! 

Kernel panic - not syncing: BUG! 

 

Any help would be greatly appreciated.  

I'm assuming that the Rocket boards Nios II linux is what I should use now for Altera nios2? If this isn't true then please let me know. 

Also, is this all MMU or can I do a non-MMU project by just not having it in the *.dts file?
Reply