On Sun, Nov 16, 2014 at 10:54:18AM +0100, Daniel Golle wrote: > Hi Maxime, > > first of all sorry for the late reply. > > On Mon, Oct 27, 2014 at 11:16:13AM +0100, Maxime Ripard wrote: > > Hi Daniel, > > > This will break things if rootfs is a read-write UBIFS volume which should > > > by dynamic. > > > > Indeed, but is this something that is usually done in OpenWRT? > > Yes. Similar to having the option of using either JFFS2 (rw) or SquashFS (ro) > as rootfs on NOR-based devices, allowing users to use UBIFS (rw) rootfs can > make sense depending on the requirements further down the road.
Ok. Who makes this decision? The user? The target? Someone else? > > > I also saw weird things happening when trying to access static > > > volumes in U-Boot and thus avoided them for now. > > > Please also consider that ubootenv* and kernel could be static volumes as > > > well, however, that needs to be tested with a more recent U-Boot (I hope > > > it'll work). > > > > Indeed, the kernel and bootloader might be static too. > > > > The only other solution I could think of was to force the size of the > > ubifs rootfs image to something like 10MB in our case. Which looks a > > bit counter-productive. > > I don't understand why that would be needed. > From what I saw, support for static volumes is hardly being used anywhere > and thus in exactly in the best shape. > I never encountered any problems writing fixed-size read-only images into > a dynamic UBI volume and just not using random-access write and dynamic > resize features. The cost of using dynamic volumes vs. static volumes also > seems neglectible (anyone?) You're missing the point. The point is UBI for a dynamic volume requires a bit less that 20 LEBs (I remember it being around 17, but I'm not sure anymore, and don't have the board here to test). 20 LEBs on a NAND with a PEB-size of 512k represents around 10MB. So far, OpenWRT generates UBI volumes for the rootfs that are of the size of the rootfs image you put in it, aligned on a PEB. Which makes sense. But for it to even just be mounted, this rootfs volume needs to be more 10MB. Which never happens. So there's two solutions here: - Don't make the rootfs volume dynamic - Align the rootfs volume on 20 PEBs, instead of a single one. The second solution is just dumb, especially when you try to make such aggressive changes to reduce the size of other components, while you waste ~7MB on the other side. I do believe it is the right solution. It might not be enforced at the right place (but where then? target? board level? we then fall back to another question I had that was unanswered on this same patch set...) Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
signature.asc
Description: Digital signature
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel