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

uClinux without CFI compliant flash or EPCS

Altera_Forum
Honored Contributor II
1,812 Views

Hi, 

 

I am trying to setup uClinux on a custom board without CFI compliant flash.  

When I start a new kernel project from the Nios2 IDE, it fails beacause it doesn't find any CFI device.  

The board contains an AMD (non CFI) flash for wich I have a working HAL driver, and a NAND flash for which I have a working HAL driver too. 

I usually boot my device through a CPLD which takes config from the AMD flash to my Cyclone. I have made my own (wifi) flash programmer utility since I could not use the Flash Programmer from the IDE because I dont have any EPCS or CFI flash. 

 

Is the limitation only a way to be certain the IDE will be able to use the Flash Programmer (in that case I would be glad to find a workaround because I have my own programmer), or is it for something else (and I am forced to have a CFI flash to run linux on a Nios2) ? 

 

Something else : I plan to use my AMD flash to boot the system, and my NAND flash as a filesystem. 

Is this possible ? Is there any restriction ? 

 

Thanks a lot for help, 

 

Regards, 

 

cetic
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
371 Views

Hi cetic, 

 

Did you disable CFI in the MTD config for your kernel? Or were you 

unable to get that far? 

 

> Something else : I plan to use my AMD flash to boot the system, and my 

> NAND flash as a filesystem. 

> Is this possible ? Is there any restriction ? 

 

Several AMD parts are supported by the jedec chip driver ... but this may 

not matter if you're not using it for a filesystem. 

 

I don't believe there is a NAND chip driver in the 2.6 kernel ... so you'll 

probably need to code one up for a read/write filesystem. If you're planning 

on a read-only filesystem on the NAND, you can just use a generic rom 

driver. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
371 Views

> Several AMD parts are supported by the jedec chip driver 

 

Sorry ... 

 

[/SLOWBRAIN OFF] 

... as well as the amd_flash driver. 

[/SLOWBRAIN ON] 

 

...
0 Kudos
Altera_Forum
Honored Contributor II
371 Views

Hi, 

 

I actually wasn't far enough to disable CFI flash. 

 

My problem is that the Nios2 IDE doesn't want to create a project if my reference design doesn't contain a CFI flash (or an EPCS, I guess). 

 

Concerning the NAND driver, I have seen one in the kernel config, so I guess I will try it as soon as I can create a project.  

For now I made a workaround, I added a CFI flash in SOPC builder so I can create the project... 

 

Thanks  

 

cetic
0 Kudos
Altera_Forum
Honored Contributor II
371 Views

No, when developing the plugins for the Nios II Linux Distribution, I found C symbols referencing the flash device that stores the kernel. So, I made it a requirement to specify a CFI compliant flash that would allow me to properly define the C symbols that the kernel required. 

 

At this point, it is not possible to build the kernel without a CFI device in your system.... sorry about that. After examination of the code, it should be possible to do it but we need to perform some more testing first. 

 

I'll see if I can get some info for you on how to make the mod's and to build the kernel.
0 Kudos
Altera_Forum
Honored Contributor II
371 Views

Ok thanks, I'll wait for news from you 

 

Yours, 

 

cetic
0 Kudos
Altera_Forum
Honored Contributor II
371 Views

I've been able to build a kernel without CFI flash support of any kind and it booted up alright. I'm going to put together a patch, a script, and some docs for you to build from the patched kernel. Expect a reply by noon tommorow if all goes well...

0 Kudos
Altera_Forum
Honored Contributor II
371 Views

Hey cetic, I was pulled away on another task this morning so I couldn't get the patch and stuff put together. I'll try to get it to you by the end of today or by Monday noon.

0 Kudos
Altera_Forum
Honored Contributor II
371 Views

I've put together the patch and I'm now getting it looked at by another co-worker before I post. Can you pm me your e-mail address so that I can e-mail it to you directly when it's ready?

0 Kudos
Reply