This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Multiple partitions on a FLASH device.
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Vincent Catros <Vincent dot Catros at elios-informatique dot fr>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 19 Nov 2003 11:21:30 +0100
- Subject: Re: [ECOS] Multiple partitions on a FLASH device.
- References: <001001c3ae84$4c546020$7407a8c0@figuier>
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