Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

JFFS2 istead of ROMFS

Hi,

Please explain to me what is exactly JFFS2 ?

Where can I get it ? How can I compile that filesystem to use on uClinux ? And how can I use it instead of the romfs which can be built using the Linux Filesystem Project from NIOS II IDE ?

Thanks for ideas.

Dmitry.

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Dmitry,

    > Please explain to me what is exactly JFFS2 ?

    Journaling Flash File System II. Here's a very good starting point:

    http://www.enseirb.fr/~kadionik/embedded/u.../howto_mtd.html (http://www.enseirb.fr/~kadionik/embedded/uclinux/mtd/howto_mtd.html)

    > Where can I get it ?

    It's already in the Microtronix distribution.

    > How can I compile that filesystem to use on uClinux ?

    Enable JFFS2 when configuring the kernel. You'll need an appropriate mtd

    mapping driver and chip driver. If you're using CFI flash, you can use the

    one (or both) of the CFI chip drivers already in the source tree.

    > And how can I use it instead of the romfs which can be built using the

    > Linux Filesystem Project from NIOS II IDE ?

    This is a bit more involved & it's much easier if you have a linux development

    platform (e.g. RH9). Basically, you create a directory tree on your development

    system that contains all of the inodes (regular, special, etc) that you want

    for your Nios system, then use the mkfs.jffs2 utility to create a binary image

    that you program into your flash.

    BTW: If you're using the AMDLV065D, you'll probably have to deal with the

    "erase" bug in the CFI chip driver ... I haven't had time to look at the

    code yet ... so I got lazy & just used cramfs instead ;-)

    Regards,

    --Scott
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    BTW: If you&#39;re using the AMDLV065D, you&#39;ll probably have to deal with the

    "erase" bug in the CFI chip driver ... I haven&#39;t had time to look at the

    code yet ... so I got lazy & just used cramfs instead ;-)[/b]

    --- Quote End ---

    Can you tell more about this bug? Thanks,
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi wentao,

    > Can you tell more about this bug?

    Ouch ... I need to find my notes on this ;-) Basically it was more

    of a &#39;hardware issue&#39; ... rather than a software bug. As I recall it was

    related to the the polling method used during erase/erase-suspend

    operations -- and the state of the toggle bit ...

    This motivated me to switch to cramfs (which BTW works great). Since

    upgrading to the latest Microtronix kernel, I haven&#39;t looked through

    the CFI chip driver code ... perhaps it was already addressed. But

    with the previous kernel I had problems.

    Regards,

    --Scott
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Scott,

    Your notes remind me that we did run into that problem related with the toggling bit, which does not work because of the way Avalon bus works. We modified that driver to use the polling bit instead, for Nios systems. The modification is included in the last release.

    Thanks and Regards,

    wentao
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi wentao,

    > We modified that driver to use the polling bit instead, for Nios systems.

    > The modification is included in the last release.

    Great! It&#39;s time for me to switch back then -- thanks :-)

    Regards,

    --Scott