1/1

|
minimum memory requirements for linux?
by rbecker on Sep 1, 2011 |
rbecker
Posts: 3 Joined: Jul 10, 2010 Last seen: Aug 8, 2025 |
||
|
Hi,
I have a development board with 8MB of Memory at hand and would like to run linux on that. Is that possible at all? I have reduced the size of available memory in linux/arch/openrisc/boot/dts/system.dts memory { device_type = "memory"; /* reg = ; */ reg = ; }; and am seeing warnings during compilation of the kernel: =================== LD vmlinux.o MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x6e664): Section mismatch in reference from the function __pte_alloc_kernel() to the function .init.text:__alloc_bootmem_low() The function __pte_alloc_kernel() references the function __init __alloc_bootmem_low(). This is often because __pte_alloc_kernel lacks a __init annotation or the annotation of __alloc_bootmem_low is wrong. GEN .version =================== When loading the resulting image into or1ksim the run terminates early with kernel panic due to lack of memory. Thanks |
|||
|
RE: minimum memory requirements for linux?
by jonibo on Sep 5, 2011 |
jonibo
Posts: 21 Joined: Mar 29, 2010 Last seen: Nov 20, 2012 |
||
|
Hi,
I have a development board with 8MB of Memory at hand and would like to run linux on that. Is that possible at all? I have reduced the size of available memory in linux/arch/openrisc/boot/dts/system.dts memory { device_type = "memory"; /* reg = ; */ reg = ; }; and am seeing warnings during compilation of the kernel: =================== LD vmlinux.o MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x6e664): Section mismatch in reference from the function __pte_alloc_kernel() to the function .init.text:__alloc_bootmem_low() The function __pte_alloc_kernel() references the function __init __alloc_bootmem_low(). This is often because __pte_alloc_kernel lacks a __init annotation or the annotation of __alloc_bootmem_low is wrong. The warning is resolved in later kernel versions. Try running a more recent kernel, for example via: git clone git://openrisc.net/~jonas/linux When loading the resulting image into or1ksim the run terminates early with kernel panic due to lack of memory. Yeah, really depends what it is that you want to do. My configuration doesn't let me run on 8MB, but 16MB works ok. This config includes block device support and an IP stack. If you can live without those, you can surely get in under 8 MB, but not sure how interesting that really is. Running just busybox on Linux I get: # free -b free -b total used free shared buffers Mem: 14139392 8798208 5341184 0 0 -/+ buffers: 8798208 5341184 Swap: 0 0 0 This isn't minimum size, but perhaps pretty close to "minimum useful" size. Regards, Jonas |
|||
|
RE: minimum memory requirements for linux?
by jeremybennett on Sep 8, 2011 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Hi rbecker, It works fine for me on 8Mb under Or1ksim. Looking at the image size, you might even get away with 3-4Mb - depends how much your application code needs. I suggest you experiment with Or1ksim configuration to see how small you can go. HTH, Jeremy
-- |
|||
|
RE: minimum memory requirements for linux?
by rbecker on Sep 8, 2011 |
rbecker
Posts: 3 Joined: Jul 10, 2010 Last seen: Aug 8, 2025 |
||
|
Thanks for your response, Jonas.
After booting memory usage always has been below 8MB, I typically get figures such as these: # # free -b free -b total used free shared buffers Mem: 31989760 5029888 26959872 0 0 -/+ buffers: 5029888 26959872 Swap: 0 0 0 # I see the same as you, reducing to 16MB works ok, going to 8 breaks it. For now I'd be quite happy with a very minimal configuration, e.g. networking not needed at all. I'll play a bit with the configuration and see if that helps. Cheers, Rene |
|||
|
RE: minimum memory requirements for linux?
by rbecker on Sep 8, 2011 |
rbecker
Posts: 3 Joined: Jul 10, 2010 Last seen: Aug 8, 2025 |
||
|
Hi,
removing networking and hot-plug support did the trick ... getting to a prompt now and can run simple commands. Overall memory usage as shown by free once linux is up is actually identical with what I had before: # # free -b free -b total used free shared buffers Mem: 6938624 5029888 1908736 0 0 -/+ buffers: 5029888 1908736 Swap: 0 0 0 # Thanks for your help. Cheers, Rene |
|||
1/1

