[ECOS] Multiple partitions on a FLASH device.

Andrew Lunn andrew@lunn.ch
Wed Nov 19 10:21:00 GMT 2003


On Wed, Nov 19, 2003 at 11:02:53AM +0100, Vincent Catros wrote:
> Hello,
> 
> I've a FLASH device (the Linux Synthetic Target one for the moment) that
> I would like to split into multiple partitions.
> 
> Is it possible?
> If yes, how to do that?

What exactly do you mean by partitions? Do you mean multiple jffs2
filesystems? ie /dev/flash1 & /dev/flash2?

In this case, not its not supported. But it does not look too hard to
add it. You would need to modify
packages/io/flash/current/io_flash.cdl and add a 
cdl_component CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_2 based on the ..._NAME_2.
Then in src/flashiodev.c:

static struct flashiodev_priv_t flashiodev_priv[1];

needs to have 2 entries when there are 2 devices, and add a second

BLOCK_DEVTAB_ENTRY( cyg_io_flashdev1,
                    CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1,
                    0,
                    &cyg_io_flashdev1_ops,
                    &flashiodev_init,
                    0, // No lookup required
                    &flashiodev_priv[0] );

but make that last line &flashiodev_priv[1]

flashiodev_init() will need to be generalized. It assumes only one
device when working out what dev->start and dev->end should be. 

       Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list