On 7 December 2014 at 16:11, John Crispin <blo...@openwrt.org> wrote: > > > On 07/12/2014 16:05, Hauke Mehrtens wrote: >> On 12/07/2014 01:30 AM, Rafał Miłecki 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)? >>> >>> 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? >>> >>> Yet another solution could be to ignore this few MiB space on serial >>> flash and simply use NAND for rootfs_data. But this would: >>> 1) Waste some minor space on SPI serial flash >>> 2) Would require hacking partitioner to don't create rootfs_data >>> 3) Hacking UBI a bit I guess >>> >> Hi, >> >> I assume these device are loading the kernel from serial flash by default. >> >> Have you looked at extroot: >> http://wiki.openwrt.org/doc/howto/extroot >> This is used to place the root file system on an external storage. >> >> Hauke > > HI, > > extroot is the wrong pattern for 2 flash setups. > >>> 1) Waste some minor space on SPI serial flash > how big is spi / nand
SPI serial flash is 16 MiB NAND is 128 MiB >>> 2) Would require hacking partitioner to don't create rootfs_data > huh ? ubifs ? I have to store "rootfs" on SPI serial due to CFE flashing method. Since "rootfs" is there, OpenWrt will create "rootfs_data" right after it. So with a partition "rootfs_data" on NAND I'd end up with two "rootfs_data" partitions. Since this is a device with SPI serial flash, I don't use UBI there (it's squashfs + jffs2 right now). >>> 3) Hacking UBI a bit I guess > sound like a wrong assumption no idea why you think ubi wont work on > your flash I guess I was thinking about a way to create UBI partition on NAND flash, create UBI volume + format it. Since this is a separated flash, I couldn't use ubinize for that. _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel