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

Generate Device Tree Help and kernel compile questions

Thanks in advance for any help. 

I’m a newbie to NIOS II embedded system design and would like to use the uClinux (version 2.6.38+mmu) running NIOS 2/f processor on my project. I have been following the wiki instruction, and successfully generated the SOPCINFO using the QSYS, and hope it will run on the NEEK development kit (Cyclone III) with the system design contains: 

 

  • NIOS2/f processor with reset vector: 0x02000000 (Ext_Flash), Exception Vector: 0x00200000 (On_Chip_RAM), and MMU Fast TLB Miss Exception Vector: 0x00400000 (On_Chip_RAM)  

  • PLL: c0 – 100MHz, c1-100MHz, c2-60MHz  

  • Tristate_conduit_bridge  

  • Ext_flash  

  • Avalong_MM_Pipeline_Bridge (Base Addr: 0x0200_0000 End: 0x03ff_ffff)  

  • Avalon_MM_Clock_Crossing_Bridge (Base Addr: 0x0000_1000 End: 0x03ff_ffff)  

  • Internal timer (Base Addr: 0x0000_0100 End: 0x0000_011f)  

  • Jtag UART (Base Addr: 0x0000_0120 End: 0x0000_0127)  

  • Uart_COM RS232 (Base Addr: 0x0000_0140 End: 0x0000_015f)  

 

My goal is to run the uClinux on the NEEK and understanding the design and implementation process. However, as of now, I am uncertain this will ever boot or successfully load onto the kit. 

Here are my questions: 

1. I got stuck on this failure message using the SOPC2DTS (Thanks Walter Goossens for provided us this Java application.)  

failure message: 

GenericTristateController: ext_flash failed to detect driver type. 

Component ext_flash of class altera_generic_tristate_controller is unknown  

dts memory section: No memory nodes specified. Blindly adding them all 

 

I have been searching for an answer and find this link permalink.gmane.org/gmane.linux.uclinux.nios2.devel/1135 

I added another component into the bottom of the sopc_components_altera.xml, and then rebuild the .jar 

 

<S2DComponent classname=”ext_flash” 

compatDevice=”ext_flash” group =”flash”> 

<compatible name=”cfi_flash”></compatible> 

</S2DComponent> 

 

Executed: java –jar sopc2dts.jar –t dts –I system.sopcinfo –o system.dts –v -v 

 

Clearly this doesn’t work, since I still have the same failure message. Nonetheless, it does generate the system.dts, but maybe with failure in it? Can anyone point me into the right path to generate the device tree?? 

 

2. I tried to compile the kernel with the system.dts. I did the git checkout unstable-nios2mmu. Is this still the preferred branch to work with NIOS2 + MMU and use the dts? I read branch nios2 is the replacement of it because of the confusing name. 

3. The kernel did successful compiled with the dts, but it shows the load and entry address is in 0xC000_0000 instead of my reset vector. Not sure I understand. Perhaps anyone kindly explain it to me? 

4. I been using the version 2.6.38, is there a new kernel out there make life a LOT easier? Wishful thinking if we could just use the .SOPCINFO and it can generate the DTB or DTS file.  

 

-Yeung
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
94 Views

You can get a newer version of the kernel from the "nios2" branch. 

http://alterawiki.com/wiki/linux_sources
Altera_Forum
Honored Contributor I
94 Views

Hi, Thank you very much for your respond. I was able to result the problem and would like to share to anyone may have similar issue. Please kindly point me out if this isn’t a preferred method to result the SOPC2DTS bug. My problem is relate to the GenericTristateController class module in the GenericTriStateController.java (below is my modified code) which it’s locate at /tools/sopc2dts/sopc2dts/lib/components  

 

Note: The SOPCINFO uses the value "embeddedsw.configuration.hwClassnameDriverSupportList" and "altera_avalon_lan91c111,altera_avalon_cfi_flash" 

 

boolean bChanged = false; 

String driverType = getParamValByName("embeddedsw.configuration.softwareDriver"); 

if(driverType==null) 

driverType = getParamValByName("embeddedsw.configuration.hwClassnameDriverSupportDefault"); 

--> if(driverType==null) 

--> { 

--> driverType = getParamValByName("embeddedsw.configuration.hwClassnameDriverSupportList"); 

--> }  

 

 

if(driverType==null) 

Logger.logln("GenericTristateController: " + getInstanceName() 

+ " failed to detect driver type.", LogLevel.WARNING); 

} else { 

if(driverType.equalsIgnoreCase("altera_avalon_cfi_flash_driver") || 

driverType.equalsIgnoreCase("altera_avalon_cfi_flash")|| 

--> driverType.equalsIgnoreCase("altera_avalon_lan91c111,altera_avalon_cfi_flash")) 

Logger.logln("GenericTristateController: " + getInstanceName()  

+ " seems to be a CFI-Flash chip.", LogLevel.INFO); 

SICFlash flash = new SICFlash(this); 

 

flash.setScd(SopcComponentLib.getInstance().getScdByClassName("altera_avalon_cfi_flash")); 

sys.removeSystemComponent(this); 

sys.addSystemComponent(flash); 

bChanged = true; 

} else { 

Logger.logln("GenericTristateController: " + getInstanceName()  

+ " is of unsupported type: " + driverType, LogLevel.WARNING); 

return bChanged; 

 

-Yeung
Altera_Forum
Honored Contributor I
94 Views

The answer to my third question regards of 0xC000 0000 is on altera.com/support/kdb/solutions/rd07292010_420.html. uClinux uses it as Virtual Memory. Sorry for this dump question. 

 

-Yeung
Reply