Loading ...
Sorry, an error occurred while loading the content.

x86 embedded linux on compact flash question

Expand Messages
  • Tal Rotbart
    Hi all, I m working on a biscuit-size single-board computer that has a 586-compatible 200mhz CPU, 64mb of RAM and a 256mb flash drive for a hard-disk.
    Message 1 of 5 , Aug 4, 2004
    • 0 Attachment
      Hi all,

      I'm working on a biscuit-size single-board computer that has a
      586-compatible 200mhz CPU, 64mb of RAM and a 256mb flash drive for a
      hard-disk. Amazingly for me, I managed to install Slackware on it.

      However, even with the bare-bones system only, I can't get the
      distribution to take less than 100mb on the hard-disk and 20mb of
      memory (out of the mere 64mb).

      I know that this is mostly due to my incompetence in this field... :)

      I've checked out some of the on-floppy distributions to try and get a
      smaller footprint, but they all basically use a ramdisk to decompress
      from the two floppies and thus waste all the memory, none of these
      distributions can run from flash either.

      Now the annoying thing, is that this box has to run Java. I've
      managed to get it all working, but the Java application requires a bit
      more than the 40mb of RAM left to it by Linux. It runs, but it is very
      slow to load, once it does load it works very well -- until it hits an
      out-of-memory error... I need aproximately 5-10mb more of free ram for
      it to work well.

      I've seen embedded Linux distributions that run at 5mb memory
      footprint with 10mb of hard-disk footprint, but they all want $$$ for
      their installation CD (Installation environment non-GPLd...) that
      installs GPLd software...

      Any clue would be greatly appreciated...

      Tal

      --
      /************************************************

      Tal 'redbeard' Rotbart
      Software Wizard

      eMail: redbeard of gmail dot com
      Tel: +972-2-671-6178
      Mobile: +972-52-896-5025

      Snail mail:
      Klozner 7/2
      Jerusalem 93388
      ISRAEL

      ************************************************/
    • Gilad Ben-Yossef
      ... OK, your question has two parts, really: 1. Making the distro smaller. This can be done by compiling your distribution from source and taking jsut the
      Message 2 of 5 , Aug 4, 2004
      • 0 Attachment
        Tal Rotbart wrote:

        > I'm working on a biscuit-size single-board computer that has a
        > 586-compatible 200mhz CPU, 64mb of RAM and a 256mb flash drive for a
        > hard-disk. Amazingly for me, I managed to install Slackware on it.
        >
        > However, even with the bare-bones system only, I can't get the
        > distribution to take less than 100mb on the hard-disk and 20mb of
        > memory (out of the mere 64mb).
        >
        > ...>
        > Any clue would be greatly appreciated...
        >


        OK, your question has two parts, really:

        1. Making the distro smaller. This can be done by compiling your
        distribution from source and taking jsut the stuff you need.

        You can achieve additional "smallness" gains by using a non standrt libc
        which is build specifically for embedded system, like uClibc.

        To automatically build a uClibc based source-based distro, use builtroot:

        http://www.uclibc.org/toolchains.html

        If you decide to stick with glibc (for example because the JAVA runtime
        wont play well with uClibc...) I recommned ptxdist:

        http://www.pengutronix.de/software/ptxdist_en.html


        2. "Packaging" it in a small space, without wasting memory.

        Instead of using ramdisks or cloop (which takes a lot of memory during
        use), using either cramfs (already in the Linux kernel) or squashfs
        (available here: http://squashfs.sourceforge.net/). Both of them are
        compressed read-only decompressed on teh file at the file block level
        file systems which are suitable for the job.


        FYI, a glibc based squashfs file system I'm using right now takes 13M. A
        compressed uClibc system will take slightly over 1M.

        Hope this helps,
        Gilad



        --
        Gilad Ben-Yossef <gilad@...>
        Codefidence. A name you can trust(TM)
        http://www.codefidence.com

        "The people I've met who do great work... generally feel that
        they're stupid and lazy, that their brain only works properly
        one day out of ten, and that it's only a matter of time until
        they're found out."


        -- Paul Grahm, "Great Hackers".
      • Tal Rotbart
        This is without X-windows... Headless system. Only the very core of X libs are there because Java doesn t like it otherwise (about 6mb of them). Tal ... --
        Message 3 of 5 , Aug 4, 2004
        • 0 Attachment
          This is without X-windows... Headless system. Only the very core of X
          libs are there because Java doesn't like it otherwise (about 6mb of
          them).

          Tal

          On Wed, 04 Aug 2004 14:19:15 +0300, Omer Zak <omerz@...> wrote:
          > I suggest that you check whether you need heavyweight window manager or
          > X-Window. If you eject them, you may be able to realize lots of memory
          > and hard disk savings.
          >
          >
          > Tal Rotbart wrote:
          > > Hi all,
          > >
          > > I'm working on a biscuit-size single-board computer that has a
          > > 586-compatible 200mhz CPU, 64mb of RAM and a 256mb flash drive for a
          > > hard-disk. Amazingly for me, I managed to install Slackware on it.
          > >
          > > However, even with the bare-bones system only, I can't get the
          > > distribution to take less than 100mb on the hard-disk and 20mb of
          > > memory (out of the mere 64mb).
          > --- Omer
          > My own blog is at http://www.livejournal.com/users/tddpirate/
          >
          > My opinions, as expressed in this E-mail message, are mine alone.
          > They do not represent the official policy of any organization with which
          > I may be affiliated in any way.
          > WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >


          --
          /************************************************

          Tal 'redbeard' Rotbart
          Software Wizard

          eMail: redbeard of gmail dot com
          Tel: +972-2-671-6178
          Mobile: +972-52-896-5025

          Snail mail:
          Klozner 7/2
          Jerusalem 93388
          ISRAEL

          ************************************************/
        • Omer Zak
          I suggest that you check whether you need heavyweight window manager or X-Window. If you eject them, you may be able to realize lots of memory and hard disk
          Message 4 of 5 , Aug 4, 2004
          • 0 Attachment
            I suggest that you check whether you need heavyweight window manager or
            X-Window. If you eject them, you may be able to realize lots of memory
            and hard disk savings.


            Tal Rotbart wrote:
            > Hi all,
            >
            > I'm working on a biscuit-size single-board computer that has a
            > 586-compatible 200mhz CPU, 64mb of RAM and a 256mb flash drive for a
            > hard-disk. Amazingly for me, I managed to install Slackware on it.
            >
            > However, even with the bare-bones system only, I can't get the
            > distribution to take less than 100mb on the hard-disk and 20mb of
            > memory (out of the mere 64mb).
            --- Omer
            My own blog is at http://www.livejournal.com/users/tddpirate/

            My opinions, as expressed in this E-mail message, are mine alone.
            They do not represent the official policy of any organization with which
            I may be affiliated in any way.
            WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
          • Tal Rotbart
            Thanks Gilad! Very helpfull response, I ll give your ideas a shot -- especially the squashfs one. Thanks again, Tal Rotbart On Wed, 04 Aug 2004 14:18:04 +0300,
            Message 5 of 5 , Aug 9, 2004
            • 0 Attachment
              Thanks Gilad!
              Very helpfull response, I'll give your ideas a shot -- especially the
              squashfs one.

              Thanks again,
              Tal Rotbart

              On Wed, 04 Aug 2004 14:18:04 +0300, Gilad Ben-Yossef
              <gilad@...> wrote:
              >
              >
              > Tal Rotbart wrote:
              >
              > > I'm working on a biscuit-size single-board computer that has a
              > > 586-compatible 200mhz CPU, 64mb of RAM and a 256mb flash drive for a
              > > hard-disk. Amazingly for me, I managed to install Slackware on it.
              > >
              > > However, even with the bare-bones system only, I can't get the
              > > distribution to take less than 100mb on the hard-disk and 20mb of
              > > memory (out of the mere 64mb).
              > >
              > > ...>
              > > Any clue would be greatly appreciated...
              > >
              >
              >
              > OK, your question has two parts, really:
              >
              > 1. Making the distro smaller. This can be done by compiling your
              > distribution from source and taking jsut the stuff you need.
              >
              > You can achieve additional "smallness" gains by using a non standrt libc
              > which is build specifically for embedded system, like uClibc.
              >
              > To automatically build a uClibc based source-based distro, use builtroot:
              >
              > http://www.uclibc.org/toolchains.html
              >
              > If you decide to stick with glibc (for example because the JAVA runtime
              > wont play well with uClibc...) I recommned ptxdist:
              >
              > http://www.pengutronix.de/software/ptxdist_en.html
              >
              > 2. "Packaging" it in a small space, without wasting memory.
              >
              > Instead of using ramdisks or cloop (which takes a lot of memory during
              > use), using either cramfs (already in the Linux kernel) or squashfs
              > (available here: http://squashfs.sourceforge.net/). Both of them are
              > compressed read-only decompressed on teh file at the file block level
              > file systems which are suitable for the job.
              >
              > FYI, a glibc based squashfs file system I'm using right now takes 13M. A
              > compressed uClibc system will take slightly over 1M.
              >
              > Hope this helps,
              > Gilad
              >
              > --
              > Gilad Ben-Yossef <gilad@...>
              > Codefidence. A name you can trust(TM)
              > http://www.codefidence.com
              >
              > "The people I've met who do great work... generally feel that
              > they're stupid and lazy, that their brain only works properly
              > one day out of ten, and that it's only a matter of time until
              > they're found out."
              >
              > -- Paul Grahm, "Great Hackers".
              >
              >
              > Yahoo! Groups Links
              >
              >
              >
              >
              >


              --
              /************************************************

              Tal 'redbeard' Rotbart
              Software Wizard

              eMail: redbeard of gmail dot com
              Tel: +972-2-671-6178
              Mobile: +972-52-896-5025

              Snail mail:
              Klozner 7/2
              Jerusalem 93388
              ISRAEL

              ************************************************/
            Your message has been successfully submitted and would be delivered to recipients shortly.