niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » embedded
u-boot and root filesystems
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
psommerfeld@gmail.com
*nix forums beginner


Joined: 22 Mar 2006
Posts: 3

PostPosted: Thu Jun 08, 2006 6:48 pm    Post subject: Re: u-boot and root filesystems Reply with quote

Thanks everyone for the answers. Very useful info.

-- Pete

Brian Silverman wrote:
Quote:
psommerfeld@gmail.com wrote:
Another question is how small can a functional rootfs be? I am hoping I
can get it under 20 MB.

I worked on linux project last year, which may give you some
guidelines... We had a very functional rootfs that fit snuggly into
4MB (with JFFS2). We kept our app and additional packages (the most
notable large ones were Python and Qt) in a separate partition in flash
- that took up a little over 20MB (also JFFS2, and we got better than
2:1 compression).

Of course, it all depends on what you want...

I'm now again working on a linux project, and I've just the other day
used Busybox to get a minimal rootfs (NOTHING, except init and sh).
It's only 75K. Of course, the caveat is you need glibc, too, and
that's 2MB.

-bri
Back to top
groups.20.thebriguy@spamg
*nix forums beginner


Joined: 21 Dec 2005
Posts: 8

PostPosted: Mon Jun 05, 2006 8:56 pm    Post subject: Re: u-boot and root filesystems Reply with quote

psommerfeld@gmail.com wrote:
Quote:
Another question is how small can a functional rootfs be? I am hoping I
can get it under 20 MB.

I worked on linux project last year, which may give you some
guidelines... We had a very functional rootfs that fit snuggly into
4MB (with JFFS2). We kept our app and additional packages (the most
notable large ones were Python and Qt) in a separate partition in flash
- that took up a little over 20MB (also JFFS2, and we got better than
2:1 compression).

Of course, it all depends on what you want...

I'm now again working on a linux project, and I've just the other day
used Busybox to get a minimal rootfs (NOTHING, except init and sh).
It's only 75K. Of course, the caveat is you need glibc, too, and
that's 2MB.

-bri
Back to top
linnix
*nix forums addict


Joined: 28 Feb 2005
Posts: 76

PostPosted: Sun Jun 04, 2006 7:23 pm    Post subject: Re: u-boot and root filesystems Reply with quote

larwe wrote:
Quote:
psommerfeld@gmail.com wrote:

I have some questions about u-boot for a project I'm working on. The uP
is an ARM9.

In answer to most of your questions, please refer to
http://www-128.ibm.com/developerworks/library/pa-migrate2/> which is
an article I wrote last year on related topics.

It is irksome to run Linux off a write-protected root filesystem.
Possible, yes - with tweaking - but it's much easier just to load the
root filesystem into a RAMdisk and run entirely out of RAM. Faster,
too.

As far as memory footprint goes, are you asking about flash storage
requirements or RAM requirements? You can fit a fully functional Linux
distribution and applications into 8Mb without difficulty. (The root
filesystem can be compressed, remember. I've implemented turnkey
x86-based Linux devices on a 4Mb CompactFlash). I would suggest 64Mb
RAM, more if you intend to use X. It can be squeezed into less, but
again it's irritating.

There are no set rules for flash vs. ram. Very often, it's a
trade off between costs and limitations. Nowadays, flash
is sometimes cheaper than ram. There are still many systems
with limited ram space, but flash is virtually unlimited.

You can compress everything on flash, but need more ram to
decompress and run them anyway.
Back to top
larwe
*nix forums beginner


Joined: 31 Dec 2005
Posts: 10

PostPosted: Sat Jun 03, 2006 12:16 am    Post subject: Re: u-boot and root filesystems Reply with quote

psommerfeld@gmail.com wrote:

Quote:
I have some questions about u-boot for a project I'm working on. The uP
is an ARM9.

In answer to most of your questions, please refer to
<http://www-128.ibm.com/developerworks/library/pa-migrate2/> which is
an article I wrote last year on related topics.

It is irksome to run Linux off a write-protected root filesystem.
Possible, yes - with tweaking - but it's much easier just to load the
root filesystem into a RAMdisk and run entirely out of RAM. Faster,
too.

As far as memory footprint goes, are you asking about flash storage
requirements or RAM requirements? You can fit a fully functional Linux
distribution and applications into 8Mb without difficulty. (The root
filesystem can be compressed, remember. I've implemented turnkey
x86-based Linux devices on a 4Mb CompactFlash). I would suggest 64Mb
RAM, more if you intend to use X. It can be squeezed into less, but
again it's irritating.
Back to top
Ulf Samuelsson
*nix forums beginner


Joined: 21 Feb 2005
Posts: 11

PostPosted: Fri Jun 02, 2006 4:54 am    Post subject: Re: u-boot and root filesystems Reply with quote

linnix wrote:
Quote:
psommerfeld@gmail.com wrote:
Hi,

I have some questions about u-boot for a project I'm working on. The
uP is an ARM9.

I am wondering if it's possible to use u-boot to two things in one
boot-up:
- to create a root filesystem on an SD card (I'm not interested in the
secure digital functionality)

You can use U-boot to store a file system, not to create it.
Whether you can use your specific ARM9 or not is depending on
if u-boot supports the SD-interface on your chip.
If it doesn't then you have to write a driver.

Quote:
- to boot Linux using a Linux kernel image from inside this newly created
root filesystem

May beed modifications to U-boot, but I know of people that have done such
modifications.


Quote:
Another question is how small can a functional rootfs be? I am
hoping I can get it under 20 MB.

You can have a bare bone system in 8M or so. But there is not much
you can do other than starting a custom app.


You can have a complete system with Linux kernel and small file system in 4
MB
but you would have very little room for your own application

Quote:
And a final question is: Is it possible to have a read-only
filesystem? Or do some things (ie. /dev devices) have to be
read/write?

No, /dev can be read-only, but /tmp amd /var must be writable.

Yes, in a way,
if you use a RAM disk, then the underlying flash image is not writable.

Quote:


Thanks, Pete

--
Best Regards,
Ulf Samuelsson
ulf@a-t-m-e-l.com
This message is intended to be my own personal view and it
may or may not be shared by my employer Atmel Nordic AB
Back to top
linnix
*nix forums addict


Joined: 28 Feb 2005
Posts: 76

PostPosted: Fri Jun 02, 2006 12:50 am    Post subject: Re: u-boot and root filesystems Reply with quote

psommerfeld@gmail.com wrote:
Quote:
Hi,

I have some questions about u-boot for a project I'm working on. The uP
is an ARM9.

I am wondering if it's possible to use u-boot to two things in one
boot-up:
- to create a root filesystem on an SD card (I'm not interested in the
secure digital functionality)
- to boot Linux using a Linux kernel image from inside this newly
created root filesystem

Another question is how small can a functional rootfs be? I am hoping I
can get it under 20 MB.

You can have a bare bone system in 8M or so. But there is not much you
can do other than starting a custom app.

Quote:

And a final question is: Is it possible to have a read-only filesystem?
Or do some things (ie. /dev devices) have to be read/write?

No, /dev can be read-only, but /tmp amd /var must be writable.

Quote:

Thanks, Pete
Back to top
psommerfeld@gmail.com
*nix forums beginner


Joined: 22 Mar 2006
Posts: 3

PostPosted: Thu Jun 01, 2006 9:31 pm    Post subject: u-boot and root filesystems Reply with quote

Hi,

I have some questions about u-boot for a project I'm working on. The uP
is an ARM9.

I am wondering if it's possible to use u-boot to two things in one
boot-up:
- to create a root filesystem on an SD card (I'm not interested in the
secure digital functionality)
- to boot Linux using a Linux kernel image from inside this newly
created root filesystem

Another question is how small can a functional rootfs be? I am hoping I
can get it under 20 MB.

And a final question is: Is it possible to have a read-only filesystem?
Or do some things (ie. /dev devices) have to be read/write?

Thanks, Pete
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 5:11 am | All times are GMT
navigation Forum index » *nix » Linux » embedded
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts fsck during startup following mirroring of boot drives Joe D. Solaris 0 Thu Jul 20, 2006 9:09 pm
No new posts Root relay issue Johnson, S Postfix 4 Thu Jul 20, 2006 6:50 pm
No new posts Is there a boot loader that can load a file a start up an... christopher.mcrorie@gmail Setup 1 Thu Jul 20, 2006 2:57 am
No new posts root can't change owner wizzywiz Suse 3 Wed Jul 19, 2006 5:55 am
No new posts 7044-170 automatic boot after power on temp_acc@yahoo.de AIX 5 Tue Jul 18, 2006 7:27 pm

Problem Mortgage | Secured Loans | 0 Credit Cards | Free Games | Problem Mortgage
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2858s ][ Queries: 20 (0.1847s) ][ GZIP on - Debug on ]