* Where to look for CRAMFS
@ 2006-05-03 21:15 Sauro Salomoni
2006-05-04 19:46 ` Antonio Di Bacco
0 siblings, 1 reply; 3+ messages in thread
From: Sauro Salomoni @ 2006-05-03 21:15 UTC (permalink / raw)
To: linuxppc-embedded
Greetings.
I have an embedded board using i.MX21.
What I want to know is: how do I tell the kernel where my CRAMFS root
file system is?
I mean, I put it in a specific memory address, but how does the kernel
know where it is?!
What happens here is that the kernel looks in some address and don't
find the Magic Number CRAMFS stores in its own start address. I have a
"bad magic number" msg because my root fs is somewhere else.
Can anyone help me, plz?
Thanks in advance.
Sauro
Engineer
Z Tec
www.ztec.com.br
+55 61 3322-2544
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Where to look for CRAMFS
@ 2006-05-04 7:17 Josu Onandia
0 siblings, 0 replies; 3+ messages in thread
From: Josu Onandia @ 2006-05-04 7:17 UTC (permalink / raw)
To: Sauro Salomoni, linuxppc-embedded
Hi Sauro,
You don't tell us what method and bootloader you use.
In case you use uBoot, you should read
http://www.denx.de/wiki/view/DULG/UBootCmdGroupExec#Section_5.9.4.2.
and
http://www.denx.de/wiki/view/DULG/FlashFilesystemsCRAMFS
Actually, I'd suggest reading the whole DULG even if you don't use =
uBoot. It's a very interesting reading.
Good luck
Josu
-----Mensaje original-----
De: linuxppc-embedded-bounces+jonandia=3Daotek.es@ozlabs.org
[mailto:linuxppc-embedded-bounces+jonandia=3Daotek.es@ozlabs.org]En =
nombre
de Sauro Salomoni
Enviado el: mi=E9rcoles, 03 de mayo de 2006 23:15
Para: linuxppc-embedded@ozlabs.org
Asunto: Where to look for CRAMFS
Greetings.
I have an embedded board using i.MX21.
What I want to know is: how do I tell the kernel where my CRAMFS root
file system is?
I mean, I put it in a specific memory address, but how does the kernel
know where it is?!
What happens here is that the kernel looks in some address and don't
find the Magic Number CRAMFS stores in its own start address. I have a
"bad magic number" msg because my root fs is somewhere else.
Can anyone help me, plz?
Thanks in advance.
Sauro
Engineer
Z Tec
www.ztec.com.br
+55 61 3322-2544
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Where to look for CRAMFS
2006-05-03 21:15 Where to look for CRAMFS Sauro Salomoni
@ 2006-05-04 19:46 ` Antonio Di Bacco
0 siblings, 0 replies; 3+ messages in thread
From: Antonio Di Bacco @ 2006-05-04 19:46 UTC (permalink / raw)
To: linuxppc-embedded
Your flash is seen by the kernel as sequence of partitions, the size and
offset of each partition (mtd partition) can be specified in two ways:
1) Tipically your board has a specific file in drivers/mtd/maps/yourboard.c
that cares to partition the flash based on a static table that you provide.
2) The kernel can parse command line argument mtdparts (for example
mtdparts=0:384k(boot),1024k(kern),2560k(cramfs),-(jffs2) ) to get the size of
these partitions (this feature should be enabled when compiling the kernel)
Your cramfs will be written in one of this partitions and you can tell the
kernel in which one it resides specifying cmd line argument "root"
On my board I specified 4 partitions on my 8MB flash:
1) /dev/mtd0 -> 256kb for u-boot and its environment
2) /dev/mtd1 -> for the kernel
3) /dev/mtd2 -> for rootfs on a cramfs
4) /dev/mtd3 -> for a jffs2 filesystem
and therefore root=/dev/mtd2
If you want to load your software as a bundle of both kernel and cramfs and
not separately you can also provide your package with an header containing
the size of kernel and cramfs and instruct the kernel to partition the flash
based on this header.
Bye,
Antonio.
On Wednesday 03 May 2006 23:15, Sauro Salomoni wrote:
> Greetings.
>
> I have an embedded board using i.MX21.
>
> What I want to know is: how do I tell the kernel where my CRAMFS root
> file system is?
> I mean, I put it in a specific memory address, but how does the kernel
> know where it is?!
>
> What happens here is that the kernel looks in some address and don't
> find the Magic Number CRAMFS stores in its own start address. I have a
> "bad magic number" msg because my root fs is somewhere else.
> Can anyone help me, plz?
>
> Thanks in advance.
>
>
> Sauro
> Engineer
> Z Tec
> www.ztec.com.br
> +55 61 3322-2544
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-04 19:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-03 21:15 Where to look for CRAMFS Sauro Salomoni
2006-05-04 19:46 ` Antonio Di Bacco
-- strict thread matches above, loose matches on Subject: below --
2006-05-04 7:17 Josu Onandia
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).