mkfs.ubifs: device table support

Hamish Moffatt hamish at cloud.net.au
Fri Mar 28 03:07:56 EDT 2008


Hi,

On Fri, Mar 28, 2008 at 08:42:54AM +0200, Artem Bityutskiy wrote:
> On Fri, 2008-03-28 at 17:24 +1100, Hamish Moffatt wrote:
> > Are there any plans to add support for a device table in mkfs.ubifs,
> > similar to mkfs.jffs2, genext2fs etc?
> 
> Not sure what is this for actually :-) Could you please elaborate?

You provide a list of device nodes that you want to be included in the
created image, but you don't need to actually create them on your host
file system so you don't need to be root. They are just added to the
image automatically by mkfs.jffs2 etc.

Here's an example table from buildroot:

# Normal system devices
#<name>		<type>	<mode>	<uid>	<gid>	<major>	<minor>	<start>	<inc>	<count>
/dev/mem	c	640	0	0	1	1	0	0	-
/dev/kmem	c	640	0	0	1	2	0	0	-
/dev/null	c	666	0	0	1	3	0	0	-
/dev/zero	c	666	0	0	1	5	0	0	-
/dev/random	c	666	0	0	1	8	0	0	-
/dev/urandom	c	666	0	0	1	9	0	0	-
/dev/ram	b	640	0	0	1	1	0	0	-
/dev/ram	b	640	0	0	1	0	0	1	4
/dev/loop	b	640	0	0	7	0	0	1	2
[snip]

The last entry for example creates /dev/loop0 through /dev/loop7.

> I glanced at mkfs.jffs2.c it does not look difficult, so we may
> implement it if you need - no problem.

That would be very useful for me and for buildroot, which uses that option 
on genext2fs and mkfs.jffs2.

thanks,
Hamish
-- 
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>



More information about the linux-mtd mailing list