linux-mips
[Top] [All Lists]

Re: Enabling JFFS as Root FS

To: Ramgopal Kota <rkota@broadcom.com>
Subject: Re: Enabling JFFS as Root FS
From: Freddy Spierenburg <freddy@dusktilldawn.nl>
Date: Thu, 15 May 2008 09:21:58 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <E06E3B7BBC07864CADE892DAF1EB0FBD07CEB326@NT-SJCA-0752.brcm.ad.broadcom.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.64.0805131444360.15369@wrl-59.cs.helsinki.fi> <20080513232507.GA24102@linux-mips.org> <20080513180225.194f400b.akpm@linux-foundation.org> <20080514150859.GA9898@linux-mips.org> <E06E3B7BBC07864CADE892DAF1EB0FBD07CEB326@NT-SJCA-0752.brcm.ad.broadcom.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
Hi Remgopal,

On Wed, May 14, 2008 at 08:58:47AM -0700, Ramgopal Kota wrote:
> Now I want to have the rootfs (jffs) on flash. Is there any document
> which tells me how to do that ?

As a learning exercise you could start by reading the Filesystem
Hierarchy Standard: http://www.pathname.com/fhs/. This is a great
document to give you some insight into a Unix filesystem.

With that basic knowledge you can start to build your own
filesystem. It's not that hard. Just use a standard Debian
(that's what I did) mipsel installation and copy everything you
need from it to your own filesystem.

What do you need and what not? Well, you start with /sbin/init,
since that is the very first process the Linux kernel starts when
it is done with itself. So make sure that is in place. Next use
ldd to find out what libraries it needs. Copy those in place too.
Run ldd too for every library, to get it's dependings too.

Next you put /etc/inittab in place. Read it carefully and follow
all its scripts in it. Of course copy those in place too and all
the tools all those scripts need. Again, for all the tools run
ldd to find the libraries needed. In the start it looks like a
lot, but you'll soon find out most basic pieces of the system use
the same libraries over and over again.

You can also copy the /dev directory from the Debian installation
to your own filesystem.

This way you will build a very basic and clean system and more
important you will learn how a Linux system boots. For me back
then it was a real eye opener when I read the aforementioned FHS
document and just started by following all scripts mentioned in
/etc/inittab. It takes some time, but it's worth the exercise!

Good luck!


-- 
$ cat ~/.signature
Freddy Spierenburg <freddy@dusktilldawn.nl>  http://freddy.snarl.nl/
GnuPG: 0x7941D1E1=C948 5851 26D2 FA5C 39F1  E588 6F17 FD5D 7941 D1E1
$ # Please read http://www.ietf.org/rfc/rfc2015.txt before complain!

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>