linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wolfgang.grandegger@bluewin.ch>
To: Mark Hatle <fray@mvista.com>
Cc: Christophe.LINDHEIMER@fr.thalesgroup.com,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: Running Linux with 2Mo of Ram.
Date: Thu, 12 Jun 2003 21:14:53 +0200	[thread overview]
Message-ID: <3EE8D12D.4020507@bluewin.ch> (raw)
In-Reply-To: 3EE8A746.7010901@mvista.com


On 06/12/2003 06:16 PM Mark Hatle wrote:
> Christophe.LINDHEIMER@fr.thalesgroup.com wrote:
>> Hi.
>>
>> I am trying to run linux on a custom board ( Mpc8xx )
>> There is only 2Mo of RAM.
>> I use romfs to save RAM.
>>
>> I use U-boot to start the kernel.
>>
>> The kernel starts correctly.
>> the kernel is launched with init=/bin/sh
>>
>> The kernel stops to tell me to press enter to activate the console ( to
>> launch the sh ) and then crash because it is running out of memory.
>>
>> The question is to know if it is really impossible to make Linux work on
>> this target or is I have missed something that could explain that there is
>> no more memory available.
>
> You will need some type of "execute in place", i.e. run the kernel and/or
> userspace applications out of ROM in order to work with 2MB of RAM.
>
> This type of thing is generally very board, processor and application specific.
>   So I don't believe there is existing (open source) code to do it.

Some time ago I got XIP working for MPC 8xx with our DENX Linux 2.4.4
kernel by collecting and integrating the various pieces already around.
Below are some results about the amount of memory you can save. Note
that this is for our standard, normally RAMdisk based run time
environment SELF (see ftp://ftp.denx.de/pub/LinuxPPC/usr/src/SELF/). If
you have little RAM and plenty of Flash memory XIP might be an option.

Hope it's useful.

Wolfgang.



Normal kernel + linear cramfs (patched):

  pImage:  538062
  cramfs: 1081344

          total:    used:    free:  shared: buffers:  cached:
  Mem:  14921728  3866624 11055104  2781184        0  2240512

XIP kernel + linear cramfs:

  pImage: 1395952
  cramfs: 1081344

          total:    used:    free:  shared: buffers:  cached:
  Mem:  16175104  3940352 12234752  2822144        0  2240512


XIP kernel + XIP cramfs (chmod +t: busybox, initd, libc)

  pImage: 1395952
  cramfs: 1871872

          total:    used:    free:  shared: buffers:  cached:
  Mem:  16175104  2367488 13807616   610304        0   671744

The net saving is > 1.1MB + 1.5M = 2.6 MB.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-06-12 19:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-12 15:53 Running Linux with 2Mo of Ram Christophe.LINDHEIMER
2003-06-12 16:16 ` Mark Hatle
2003-06-12 19:14   ` Wolfgang Grandegger [this message]
2003-06-12 21:53   ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2003-06-12 17:22 erik.teose
2003-06-12 18:02 ` Todd Poynor
2003-06-12 18:26 ` Dan Malek
2003-06-13  8:29 Christophe.LINDHEIMER

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EE8D12D.4020507@bluewin.ch \
    --to=wolfgang.grandegger@bluewin.ch \
    --cc=Christophe.LINDHEIMER@fr.thalesgroup.com \
    --cc=fray@mvista.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).