[PATCH/RFC 0/3] UBI: unify mouting rootfs based on cmdline parameter

Boris Brezillon boris.brezillon at free-electrons.com
Sun Aug 28 07:20:59 PDT 2016


On Sun, 28 Aug 2016 11:12:50 -0300
Ezequiel Garcia <ezequiel at vanguardiasur.com.ar> wrote:

> Daniel,
> 
> Let's try to tackle this from a different angle.
> 
> On 27 August 2016 at 16:43, Daniel Golle <daniel at makrotopia.org> wrote:
> > Hi!
> >
> > In an attempts to fix the flaws of the current set of UBI-related
> > patches we are carrying in OpenWrt, I re-wrote the way mounting the
> > rootfs from UBI in OpenWrt/LEDE works. The main requirement I face
> > which cannot be easily addressed using other means which are already
> > available in the kernel is the fact that UBIFS and squashfs-on-UBI
> > require different parameters to be set on the cmdline, e.g.
> > for UBIFS: ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs
> > for squashfs: ubi.mtd=ubi ubiblock=0,1 root=/dev/ubiblock0_1 rootfstype=squashfs
> >  
> 
> Can you help me understand the problem you are solving here?
> 
> So you currently need to do:
> 
> * for UBIFS: ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs
> * for squashfs: ubi.mtd=ubi ubi.block=0,1 root=/dev/ubiblock0_1
> rootfstype=squashfs
> 
> [..]
> >
> > With those changes, a single set of cmdline parameters is
> > sufficient to mount either UBIFS or any other block filesystem
> > by creating a ubiblock device:
> > ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs,squashfs
> >  
> 
> And you would like to do:
> 
> * for UBIFS: ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs
> * for squashfs: ubi.mtd=ubi root=/dev/ubiblock0_1 rootfstype=squashfs

I think Daniel wants something like:

ubi.mtd=1 root=ubi0:rootfs

or

ubi.mtd=1 root=/dev/ubiblock0_1

to work for both the UBIFS and squashfs cases.

> 
> So the only thing you are trying to acomplish, is removal
> of the ubi.block parameter needed to create ubi block devices.
> 
> Is that correct?
> 
> Thanks,




More information about the linux-mtd mailing list