[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writeable JFFS partition




(This is all relevant to a 2.4.10 kernel, if that makes a difference)

Okay, so I've successfully managed to boot off of flash with the
kernel sitting in a linux filesystem. Now for the next challenege: a
writeable root filesystem. :)

From what I've observed, there's a dependency between the arenas
defined in drivers/block/blkmem.c and the map defined in
drivers/mtd/maps/____.c. So does that mean that if I want a partition
to be writeable, I need to define write and erase routines in the
arena definition of that partition? 

If not, is there something else that I need to do to make the
partition writeable? 

My arenas are defined as follows:

{0, 0x1fc00000, 0 },
{0, 0x1fc00000, 16 * 1024 },
{0, 0x1fc04000, 16 * 1024 },
{0, 0x1fc08000, 32 * 1024 },
{0, 0x1fc20000, 2 * 1024 * 1024 - 128 * 1024 },

And my MTD map is:

static struct mtd_partition ad6489_rg2_partitions[] =
{
    /* The first stage bootloader */
    {
        "Bootstrap 1",
        16 * 1024,
        0,
        MTD_WRITEABLE 
    },    
    {
        "Configuration",
        16 * 1024,
        16 * 1024,
        MTD_WRITEABLE
    },
    /* The second stage bootloader */
    {
        "Bootstrap 2",
        96 * 1024,
        32 * 1024,
        MTD_WRITEABLE
    },
    {
        "Root",
        2 * 1024 * 1024 - 128 * 1024,
        128 * 1024,
    }
};

-- 
-------------------------------------------------
Justin Wojdacki        
justin.wojdacki@xxxxxxx.com         (408) 350-5032
Communications Processors Group -- Analog Devices

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com