All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Run Linux kernel from within a JFFS2 filesystem
@ 2008-06-14  9:48 Giuseppe Modugno
  2008-06-14 10:18 ` Luigi 'Comio' Mantellini
  0 siblings, 1 reply; 2+ messages in thread
From: Giuseppe Modugno @ 2008-06-14  9:48 UTC (permalink / raw)
  To: u-boot

Hi all,

this is my first post in this mailing list. I hope I don't start with a FAQ.

On my board I have installed U-Boot and I'm able to run Linux kernel and 
  rootfs via Flash/Flash (ramdisk/image file) or TFTP/NFS.

Of course, either ramdisk and nfs aren't suitable for my end application 
(ramdisk losts many RAM space and NFS won't be available).

So I'd like to use a local root filesystem stored in the NOR Flash (a 
J30 Intel), starting from the small ramdisk I have and adding all 
software I need.

I could divide my Flash memory in three partitions:
- U-Boot bootloader (with the two sectors for its configuration)
- Linux kernel image
- JFFS2 root filesystem

But I want to go futher and I want to save the linux kernel image file 
into the root JFFS2 filesystem. So I'll have only two main partitions:
- U-Boot bootloader (...)
- JFFS2 root filesystem (with linuk kernel image file saved inside)

Is U-Boot able to run a kernel image file that is saved into a JFFS2 
filesystem stored in the Flash? I think this is what happens on a 
desktop computer (where the bootloader is Grub and the root filesystem 
is on a hard-disk and the kernel is a file saved into it).

I think it isn't so simple for U-Boot that is capable of running the 
application (linux kernel in my case) only at a specified memory address 
(it doesn't have any knowledge about JFFS2 filesystem, do it?).

Many thanks for your comments and my compliments for the good work!

   Giuseppe

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot-Users] Run Linux kernel from within a JFFS2 filesystem
  2008-06-14  9:48 [U-Boot-Users] Run Linux kernel from within a JFFS2 filesystem Giuseppe Modugno
@ 2008-06-14 10:18 ` Luigi 'Comio' Mantellini
  0 siblings, 0 replies; 2+ messages in thread
From: Luigi 'Comio' Mantellini @ 2008-06-14 10:18 UTC (permalink / raw)
  To: u-boot

Ciao Pes?,

U-Boot can load an image from a jffs2 fs using the fsload command:

fsload DEST_ADDR imagename

Furthermore, you need to properly define the mtdpart and mtdids
environment vars or define the opportune #define, like this:

#define MTDIDS_DEFAULT          "nor0=phys_mapped_flash"
#define MTDPARTS_DEFAULT
"mtdparts=phys_mapped_flash:2M(jffs2),10M(root)ro,2M(u-boot)ro,2M(kernel)ro"

ciao,

luigi

Il giorno sab, 14/06/2008 alle 11.48 +0200, Giuseppe Modugno ha scritto:

> Hi all,
> 
> this is my first post in this mailing list. I hope I don't start with a FAQ.
> 
> On my board I have installed U-Boot and I'm able to run Linux kernel and 
>   rootfs via Flash/Flash (ramdisk/image file) or TFTP/NFS.
> 
> Of course, either ramdisk and nfs aren't suitable for my end application 
> (ramdisk losts many RAM space and NFS won't be available).
> 
> So I'd like to use a local root filesystem stored in the NOR Flash (a 
> J30 Intel), starting from the small ramdisk I have and adding all 
> software I need.
> 
> I could divide my Flash memory in three partitions:
> - U-Boot bootloader (with the two sectors for its configuration)
> - Linux kernel image
> - JFFS2 root filesystem
> 
> But I want to go futher and I want to save the linux kernel image file 
> into the root JFFS2 filesystem. So I'll have only two main partitions:
> - U-Boot bootloader (...)
> - JFFS2 root filesystem (with linuk kernel image file saved inside)
> 
> Is U-Boot able to run a kernel image file that is saved into a JFFS2 
> filesystem stored in the Flash? I think this is what happens on a 
> desktop computer (where the bootloader is Grub and the root filesystem 
> is on a hard-disk and the kernel is a file saved into it).
> 
> I think it isn't so simple for U-Boot that is capable of running the 
> application (linux kernel in my case) only at a specified memory address 
> (it doesn't have any knowledge about JFFS2 filesystem, do it?).
> 
> Many thanks for your comments and my compliments for the good work!
> 
>    Giuseppe
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users


Ing. Luigi Mantellini
Industrie Dial Face S.p.A.
Via Canzo, 4 
20068 Peschiera Borromeo (MI)
Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
E-mail: luigi.mantellini at idf-hit.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080614/f0bf521e/attachment.htm 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-14 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-14  9:48 [U-Boot-Users] Run Linux kernel from within a JFFS2 filesystem Giuseppe Modugno
2008-06-14 10:18 ` Luigi 'Comio' Mantellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.