* Re: Enabling JFFS as Root FS
@ 2008-05-15 17:27 David VomLehn
0 siblings, 0 replies; 3+ messages in thread
From: David VomLehn @ 2008-05-15 17:27 UTC (permalink / raw)
To: rkota; +Cc: linux-mips
> 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.
...
In addition, you should know that the kernel and device drivers may automatically
create device special files in the /dev directory. The mtd layer is one of the
components that does this. Automatic /dev file creation is normally done through
the kernel hotplug framework. You can read more about this at kernel.org
(http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html) or the Wikipedia
article http://en.wikipedia.org/wiki/Udev.
--
David VomLehn, dvomlehn@cisco.com
The opinions expressed herein are likely mine, but might not be my employer's...
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH RESEND] [MIPS]: multi-statement if() seems to be missing braces
@ 2008-05-13 11:50 Ilpo Järvinen
2008-05-13 23:25 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2008-05-13 11:50 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Andrew Morton
[-- Attachment #1: Type: TEXT/PLAIN, Size: 881 bytes --]
In case this is a genuine bug, somebody else more familiar
with that stuff should evaluate it's effects (I just found it
by some shell pipeline and it seems suspicious looking).
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
...Added Cc Andrew as I didn't get any response last time.
include/asm-mips/pgtable.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 2f597ee..6a0edf7 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -239,9 +239,10 @@ static inline pte_t pte_mkdirty(pte_t pte)
static inline pte_t pte_mkyoung(pte_t pte)
{
pte.pte_low |= _PAGE_ACCESSED;
- if (pte.pte_low & _PAGE_READ)
+ if (pte.pte_low & _PAGE_READ) {
pte.pte_low |= _PAGE_SILENT_READ;
pte.pte_high |= _PAGE_SILENT_READ;
+ }
return pte;
}
#else
--
1.5.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH RESEND] [MIPS]: multi-statement if() seems to be missing braces
2008-05-13 11:50 [PATCH RESEND] [MIPS]: multi-statement if() seems to be missing braces Ilpo Järvinen
@ 2008-05-13 23:25 ` Ralf Baechle
2008-05-14 1:02 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2008-05-13 23:25 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: linux-mips, Andrew Morton
On Tue, May 13, 2008 at 02:50:50PM +0300, Ilpo Järvinen wrote:
> In case this is a genuine bug, somebody else more familiar
> with that stuff should evaluate it's effects (I just found it
> by some shell pipeline and it seems suspicious looking).
Should be fairly as proven by practice; it's there since day of of 64-bit
pagetable for 32-bit hw support which was November 29, 2004.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] [MIPS]: multi-statement if() seems to be missing braces
2008-05-13 23:25 ` Ralf Baechle
@ 2008-05-14 1:02 ` Andrew Morton
2008-05-14 15:08 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-05-14 1:02 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Ilpo Järvinen, linux-mips
On Wed, 14 May 2008 00:25:07 +0100 Ralf Baechle <ralf@linux-mips.org> wrote:
> On Tue, May 13, 2008 at 02:50:50PM +0300, Ilpo J__rvinen wrote:
>
> > In case this is a genuine bug, somebody else more familiar
> > with that stuff should evaluate it's effects (I just found it
> > by some shell pipeline and it seems suspicious looking).
>
> Should be fairly as proven by practice; it's there since day of of 64-bit
> pagetable for 32-bit hw support which was November 29, 2004.
>
It's unlikely that anyone would notice an error in pte_mkyoung(). It
will affect page reclaim behaviour and _might_ be demonstrable with a
carefully set up test. But an error in here won't cause crashes or
lockups or anything.
What this needs is someone who understands the architecture (ie: you
;)) to take a look, please.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] [MIPS]: multi-statement if() seems to be missing braces
2008-05-14 1:02 ` Andrew Morton
@ 2008-05-14 15:08 ` Ralf Baechle
2008-05-14 15:58 ` Enabling JFFS as Root FS Ramgopal Kota
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2008-05-14 15:08 UTC (permalink / raw)
To: Andrew Morton; +Cc: Ilpo Järvinen, linux-mips
On Tue, May 13, 2008 at 06:02:25PM -0700, Andrew Morton wrote:
> > > In case this is a genuine bug, somebody else more familiar
> > > with that stuff should evaluate it's effects (I just found it
> > > by some shell pipeline and it seems suspicious looking).
> >
> > Should be fairly as proven by practice; it's there since day of of 64-bit
> > pagetable for 32-bit hw support which was November 29, 2004.
> >
>
> It's unlikely that anyone would notice an error in pte_mkyoung(). It
> will affect page reclaim behaviour and _might_ be demonstrable with a
> carefully set up test. But an error in here won't cause crashes or
> lockups or anything.
It's even more subtle than that. Only a special variant of the pagetables
used for the MIPS equivalent of PAE is affected. For performance reason
this format contains two copies of the some of the bits. The result of
the bug was one being maintained corrected, the other one not.
> What this needs is someone who understands the architecture (ie: you
> ;)) to take a look, please.
I've applied the patch yesterday; will go to Linus in the next merge.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Enabling JFFS as Root FS
2008-05-14 15:08 ` Ralf Baechle
@ 2008-05-14 15:58 ` Ramgopal Kota
2008-05-15 7:21 ` Freddy Spierenburg
0 siblings, 1 reply; 3+ messages in thread
From: Ramgopal Kota @ 2008-05-14 15:58 UTC (permalink / raw)
To: linux-mips
Hi,
Currently I am having a kernel 2.6.14 with INIT_RAMFS and it is using
cpio archive to create the nodes and rootfs.
Now I want to have the rootfs (jffs) on flash. Is there any document
which tells me how to do that ?
I did the following ..
I created the rootfs directory say "embeddedroot" structure except /dev
directory and ran mkfs.jffs2 on "embeddedroot".
The .jffs2 image is loaded onto flash at the correct offset pointed in
the MTD partition structure as mtdblock2.
My basic doubt is , how the kernel will create a node in /dev in the
above case ? or is there any other way to make jffs as rootfs.
I am missing some thing , I will be glad if someone points me that.
Ramgopal Kota
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Enabling JFFS as Root FS
2008-05-14 15:58 ` Enabling JFFS as Root FS Ramgopal Kota
@ 2008-05-15 7:21 ` Freddy Spierenburg
0 siblings, 0 replies; 3+ messages in thread
From: Freddy Spierenburg @ 2008-05-15 7:21 UTC (permalink / raw)
To: Ramgopal Kota; +Cc: linux-mips
[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]
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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-15 17:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-15 17:27 Enabling JFFS as Root FS David VomLehn
-- strict thread matches above, loose matches on Subject: below --
2008-05-13 11:50 [PATCH RESEND] [MIPS]: multi-statement if() seems to be missing braces Ilpo Järvinen
2008-05-13 23:25 ` Ralf Baechle
2008-05-14 1:02 ` Andrew Morton
2008-05-14 15:08 ` Ralf Baechle
2008-05-14 15:58 ` Enabling JFFS as Root FS Ramgopal Kota
2008-05-15 7:21 ` Freddy Spierenburg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox