Altera_Forum
Honored Contributor
21 years agoLinux - a question about linux fs in flash
Hello, does anyone know if the Microtronix ROMfs is cached in RAM upon bootup? I mean does the fs take up the same amount of RAM as it occupies in flash?
I have a custom board with a 2MB flash (but im only "allowed" to use 1MB) and a 2MB SDRAM-chip. When I bootup my kernel Linux says that the kernel takes up about 813KB:Memory available: 1048k/512k RAM, 0k/0k ROM (813k kernel code, 122k data) But when linux later on is running the init-routine I get an out-of memory error: ...
Free pages: 132kB (0kB HighMem)
Active:0 inactive:12 dirty:0 writeback:0 unstable:0 free:33 slab:197 mapped:0 pagetables:0
DMA free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB
Normal free:132kB min:128kB low:256kB high:384kB active:0kB inactive:48kB present:2048kB
HighMem free:0kB min:128kB low:256kB high:384kB active:0kB inactive:0kB present:0kB
DMA: empty
Normal: 1*4kB 2*8kB 3*16kB 0*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 132kB
HighMem: empty
Unable to allocate RAM for process text/data, errno 12
/bin/expand: program too big
DMA per-cpu: empty
Normal per-cpu:
cpu 0 hot: low 2, high 6, batch 1
cpu 0 cold: low 0, high 2, batch 1
HighMem per-cpu: empty
Free pages: 128kB (0kB HighMem)
Active:7 inactive:0 dirty:0 writeback:0 unstable:0 free:32 slab:198 mapped:0 pagetables:0
DMA free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB
Normal free:128kB min:128kB low:256kB high:384kB active:28kB inactive:0kB present:2048kB
HighMem free:0kB min:128kB low:256kB high:384kB active:0kB inactive:0kB present:0kB
DMA: empty
Normal: 0*4kB 2*8kB 3*16kB 0*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 128kB
HighMem: empty
Kernel panic: Out of memory and no killable processes... Because if the fs isn't cached in RAM - then what is eating up all my RAM - I mean I have 2MB and the kernel only occupies 813KB? Next question: If the fs take up the same amount of RAM as the fs occupies in flash......is there then a way to disable this? I mean rather a system that are running slow than a system that aren't running at all ;-) Hope you guys can help me with this one! Regards Goon