All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Richard Weinberger <richard@nod.at>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	dedekind1@gmail.com, Hauke Mehrtens <hauke@hauke-m.de>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	robh+dt@kernel.org, linux-mtd@lists.infradead.org,
	computersforpeace@gmail.com, dwmw2@infradead.org
Subject: Re: [PATCH 1/2] ubi: mount partitions specified in device tree
Date: Sun, 19 Jun 2016 18:13:36 +0200	[thread overview]
Message-ID: <20160619161334.GH820@makrotopia.org> (raw)
In-Reply-To: <5766BAB8.9090707@nod.at>

Hi Richard,

On Sun, Jun 19, 2016 at 05:31:04PM +0200, Richard Weinberger wrote:
> Am 19.06.2016 um 17:24 schrieb Daniel Golle:
> >> You mean marking a MTD partition in DT and UBI will attach from it?
> >> That makes sense.
> > 
> > Yes. Currently we just use a naming convention (the first MTD partition
> > named 'ubi' will be auto-attached), that's obviously not very clean...
> 
> I was about to reply to my own mail that you can still attach by name.
> Boris reminded me of that, I forgot that feature.^^
> Why is it not clean?

That's nice and I also didn't know that.
It's still not perfect because I got to add it to the cmdline (in DT),
and should have it only on devices where a partition with that given
name actually exists. A flag for the mtd partition would still be
nicer.

> 
> >>
> >> To sum up, I asked a lot of questions to understand your use case(s).
> >> Everything you described can be done with existing facilities.
> >> But I agree that at least some UBI DT machinery would be nice to have
> >> although we need to check with DT folks first.
> >> At least marking an MTD partition should be fine, hopefully.
> > 
> > Great. That'd already greatly improve things.
> 
> How is that better than attach by name? You mark the to be attached
> MTD by its name...

See above. We'd then still need to have that ubi.mtd=name in the
cmdline for NAND devices using UBI and *not* have it for other devices
within the same family which may use SPI or NOR flash without UBI.
I'd prefer to have one place inside the device-tree for everything
flash-storage related, eg.
&nand {
	status = "okay";
	partition@0 {
		label = "boot";
		reg = <0x00000000 0x00e00000>;
		read-only;
	};

	partition@e00000 {
		label = "data";
		compatible = "ubi,device";
		reg = <0x00e00000 0x07200000>;
	};
};

> 
> > I can see that sooner or later we will need some way to reference UBI
> > volumes in DT, independently of the whole rootfs selection. Vendors do
> > use UBI volumes also for things like WiFi EEPROM data. Currentlhy, we
> > extract that in user-space and save a copy in /lib/firmware/... for
> > things more crazy than plain offsets inside MTD partitions.
> 
> Really, please append a decent root= kernel parameter.

Maybe we just focus to solve one problem at a time :)
Anyway, it'd be great if 'root=' was possible and flexible enough.
However, as we support several filesystem types (ubifs vs. squashfs)
this is not straight forward.

ubi.mtd=mtdname root=ubiX:volname rootfstype=ubifs
vs.
ubi.mtd=mtdname ubiblock=... root=/dev/ubiblockX_Y

And we wouldn't want two seperate DT files for those cases nor can we
rely in bootloader support or any other means to differentiate them.

That was part of the initial motivation for having those
not-so-fancy patches in first place... (And yes, others have initramfs
pre-init systems, things like real_root=... in their cmdline and other
also not-that-fancy solutions to the problem)


Cheers


Daniel

> 
> Thanks,
> //richard

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Golle <daniel-g5gK2j5usbvCyp4qypjU+w@public.gmane.org>
To: Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>
Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>,
	Boris Brezillon
	<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org
Subject: Re: [PATCH 1/2] ubi: mount partitions specified in device tree
Date: Sun, 19 Jun 2016 18:13:36 +0200	[thread overview]
Message-ID: <20160619161334.GH820@makrotopia.org> (raw)
In-Reply-To: <5766BAB8.9090707-/L3Ra7n9ekc@public.gmane.org>

Hi Richard,

On Sun, Jun 19, 2016 at 05:31:04PM +0200, Richard Weinberger wrote:
> Am 19.06.2016 um 17:24 schrieb Daniel Golle:
> >> You mean marking a MTD partition in DT and UBI will attach from it?
> >> That makes sense.
> > 
> > Yes. Currently we just use a naming convention (the first MTD partition
> > named 'ubi' will be auto-attached), that's obviously not very clean...
> 
> I was about to reply to my own mail that you can still attach by name.
> Boris reminded me of that, I forgot that feature.^^
> Why is it not clean?

That's nice and I also didn't know that.
It's still not perfect because I got to add it to the cmdline (in DT),
and should have it only on devices where a partition with that given
name actually exists. A flag for the mtd partition would still be
nicer.

> 
> >>
> >> To sum up, I asked a lot of questions to understand your use case(s).
> >> Everything you described can be done with existing facilities.
> >> But I agree that at least some UBI DT machinery would be nice to have
> >> although we need to check with DT folks first.
> >> At least marking an MTD partition should be fine, hopefully.
> > 
> > Great. That'd already greatly improve things.
> 
> How is that better than attach by name? You mark the to be attached
> MTD by its name...

See above. We'd then still need to have that ubi.mtd=name in the
cmdline for NAND devices using UBI and *not* have it for other devices
within the same family which may use SPI or NOR flash without UBI.
I'd prefer to have one place inside the device-tree for everything
flash-storage related, eg.
&nand {
	status = "okay";
	partition@0 {
		label = "boot";
		reg = <0x00000000 0x00e00000>;
		read-only;
	};

	partition@e00000 {
		label = "data";
		compatible = "ubi,device";
		reg = <0x00e00000 0x07200000>;
	};
};

> 
> > I can see that sooner or later we will need some way to reference UBI
> > volumes in DT, independently of the whole rootfs selection. Vendors do
> > use UBI volumes also for things like WiFi EEPROM data. Currentlhy, we
> > extract that in user-space and save a copy in /lib/firmware/... for
> > things more crazy than plain offsets inside MTD partitions.
> 
> Really, please append a decent root= kernel parameter.

Maybe we just focus to solve one problem at a time :)
Anyway, it'd be great if 'root=' was possible and flexible enough.
However, as we support several filesystem types (ubifs vs. squashfs)
this is not straight forward.

ubi.mtd=mtdname root=ubiX:volname rootfstype=ubifs
vs.
ubi.mtd=mtdname ubiblock=... root=/dev/ubiblockX_Y

And we wouldn't want two seperate DT files for those cases nor can we
rely in bootloader support or any other means to differentiate them.

That was part of the initial motivation for having those
not-so-fancy patches in first place... (And yes, others have initramfs
pre-init systems, things like real_root=... in their cmdline and other
also not-that-fancy solutions to the problem)


Cheers


Daniel

> 
> Thanks,
> //richard
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-06-19 16:14 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18 19:17 [PATCH 1/2] ubi: mount partitions specified in device tree Hauke Mehrtens
2016-06-18 19:17 ` Hauke Mehrtens
2016-06-18 19:17 ` [PATCH 2/2] ubi: open volumes define " Hauke Mehrtens
2016-06-18 19:17   ` Hauke Mehrtens
2016-06-18 23:36   ` Daniel Golle
2016-06-18 23:36     ` Daniel Golle
2016-06-19 21:21     ` Hauke Mehrtens
2016-06-19 21:21       ` Hauke Mehrtens
2016-06-24 18:45   ` Ezequiel Garcia
2016-06-24 18:45     ` Ezequiel Garcia
2016-06-25 20:24     ` Hauke Mehrtens
2016-06-25 20:24       ` Hauke Mehrtens
2016-06-18 19:30 ` [PATCH 1/2] ubi: mount partitions specified " Richard Weinberger
2016-06-18 19:30   ` Richard Weinberger
2016-06-18 19:35   ` Hauke Mehrtens
2016-06-18 19:35     ` Hauke Mehrtens
2016-06-18 19:46     ` Richard Weinberger
2016-06-18 19:46       ` Richard Weinberger
2016-06-18 22:54       ` Hauke Mehrtens
2016-06-18 22:54         ` Hauke Mehrtens
2016-06-19  8:41         ` Richard Weinberger
2016-06-19  8:41           ` Richard Weinberger
2016-06-18 23:20     ` Daniel Golle
2016-06-18 23:20       ` Daniel Golle
2016-06-19  8:53       ` Richard Weinberger
2016-06-19  8:53         ` Richard Weinberger
2016-06-19  9:16         ` Richard Weinberger
2016-06-19  9:16           ` Richard Weinberger
2016-06-19 11:25         ` Daniel Golle
2016-06-19 11:25           ` Daniel Golle
2016-06-19 12:02           ` Richard Weinberger
2016-06-19 12:02             ` Richard Weinberger
2016-06-19 13:05             ` Daniel Golle
2016-06-19 13:05               ` Daniel Golle
2016-06-19 13:19               ` Richard Weinberger
2016-06-19 13:19                 ` Richard Weinberger
2016-06-19 14:09                 ` Daniel Golle
2016-06-19 14:09                   ` Daniel Golle
2016-06-19 14:35                   ` Richard Weinberger
2016-06-19 14:35                     ` Richard Weinberger
2016-06-19 15:24                     ` Daniel Golle
2016-06-19 15:24                       ` Daniel Golle
2016-06-19 15:31                       ` Richard Weinberger
2016-06-19 15:31                         ` Richard Weinberger
2016-06-19 16:13                         ` Daniel Golle [this message]
2016-06-19 16:13                           ` Daniel Golle
2016-06-19 16:53                           ` Boris Brezillon
2016-06-19 16:53                             ` Boris Brezillon
2016-06-19 19:42                             ` Daniel Golle
2016-06-19 19:42                               ` Daniel Golle
2016-06-19 20:14                               ` Boris Brezillon
2016-06-19 20:14                                 ` Boris Brezillon
2016-06-19 21:48                                 ` Daniel Golle
2016-06-19 21:48                                   ` Daniel Golle
2016-06-19 22:21                                   ` Hauke Mehrtens
2016-06-19 22:21                                     ` Hauke Mehrtens
2016-06-20  8:09                                     ` Arnd Bergmann
2016-06-20  8:09                                       ` Arnd Bergmann
2016-06-20  8:26                                       ` Richard Weinberger
2016-06-20  8:26                                         ` Richard Weinberger
2016-06-20 15:08                                         ` Arnd Bergmann
2016-06-20 15:08                                           ` Arnd Bergmann
2016-06-20 17:24                                           ` Brian Norris
2016-06-20 17:24                                             ` Brian Norris
2016-06-20 19:57                                           ` Richard Weinberger
2016-06-20 19:57                                             ` Richard Weinberger
2016-06-20 21:18                                             ` Hauke Mehrtens
2016-06-20 21:18                                               ` Hauke Mehrtens
2016-06-20 17:05                                       ` Brian Norris
2016-06-20 17:05                                         ` Brian Norris
2016-06-19 15:43                       ` Boris Brezillon
2016-06-19 15:43                         ` Boris Brezillon
2016-06-19 16:23                         ` Daniel Golle
2016-06-19 16:23                           ` Daniel Golle
2016-06-20 17:03                   ` Brian Norris
2016-06-20 17:03                     ` Brian Norris
2016-06-24 18:28     ` Ezequiel Garcia
2016-06-24 18:28       ` Ezequiel Garcia
2016-06-25 20:20       ` Hauke Mehrtens
2016-06-25 20:20         ` Hauke Mehrtens
2016-06-25 20:33         ` Richard Weinberger
2016-06-25 20:33           ` Richard Weinberger
2016-06-18 23:56 ` Daniel Golle
2016-06-18 23:56   ` Daniel Golle
2016-06-19 21:36   ` Hauke Mehrtens
2016-06-19 21:36     ` Hauke Mehrtens
2016-06-19 21:52     ` Daniel Golle
2016-06-19 21:52       ` Daniel Golle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160619161334.GH820@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=hauke@hauke-m.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.