Altera_Forum
Honored Contributor
21 years agoLinux - running kernel from flash to free ram
Hello, is it possible to run the kernel directly from the flash? It seems the kernel is currently copied to SDRAM before being executed, but my system has very little RAM so I would like to be able to run the kernel directly from flash if possible. This is just during development to begin with, because my custom board is only equipped with 2MB RAM.
....or if anyone has a better idea to minimize the RAM consumption I would very much like to hear it :-) Currently my kernel takes up 813kb in RAM. But when I try to run a program like mount it says there aren't enough RAM free. A few things I have tried: - I've tried to change the Memory Device to "ext_flash" instead of "sdram under" "kernel options" under "Nios II Linux Kernel" but this doesn't seem to be the way to do it since it results in a compiler error ....something about undefine flash-thing....and furthermore it seems Linux wants to use flash as program-memory and that was not what I was looking for. I only wanted the kernel to execute from flash ;-) - I've tried to modify the kconfig-file (<- the one with all the options for the kernel - used by menuconfig I believe). I saw this file had a few lines that was commented out. One of them said something like:config ROMKERNEL I modified the file to include this option......ugly but hey - I had to try it, right? It didn't work - big surprise ....guess there was a reason why this was commented out in the first place http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif . My custom board consist of: 2MB flash/2MB SDRAM/Cyclone EP1C6/...and some other stuff not relevant here. Hope you guys have a few suggestions for me. Regards Goon http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif