[OpenWrt-Devel] Some standard partition name for extra user data?

Rafał Miłecki zajec5 at gmail.com
Tue Dec 9 07:13:04 EST 2014


On 7 December 2014 at 01:30, Rafał Miłecki <zajec5 at gmail.com> wrote:
> I've bcm53xx device which has two usable flashes:
> 1) SPI serial flash for CFE + firmware + NVRAM
> 2) NAND flash for extra data
>
> Because of general design of OpenWrt firmware my image contains two
> partitions: kernel and rootfs (SquashFS). Automatically rootfs_data
> (JFFS2) is created right after rootfs.
>
> I wanted to make space on NAND flash also usable for OpenWrt. Do you
> have any advice on that?
>
> 1) The coolest idea would be to use some LVM solution, but I don't
> think we have anything like this ready in OpenWrt. Or do we? AFAIK UBI
> itself can't work as LVM (can't use blocks from several MTD
> partitions)?

So I guess this isn't really possible.


> 2) So I was thinking about simply registering that NAND partition with
> some name we could make common across OpenWrt targets. Something like
> "extra_data" or whatever you prefer. User would need to mount it and
> use a proper directory for storing his data. Is there anything like
> this in any other target?

Can we consider this option then?
AFAIK the most suitable filesystem for NAND we have is UBIFS. So we
probably will want to use UBI with a single volume.
What do you think about something like this?

Creating 1 MTD partitions on "bcm_nand":
0x000000000000-0x000008000000 : "extra_ubi"

mount_extra_ubi || format_ubi "extra_ubi"
has_extra_ubifs_volume || create_extra_ubifs_volume
mount_extra_ubifs_volume

This of course will mean having extra space for storage mounted to
some directory only. Like an /mnt/extra/ or something... Does it make
any sense?

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list