All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Daniel Golle <daniel@makrotopia.org>, Hauke Mehrtens <hauke@hauke-m.de>
Cc: dwmw2@infradead.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, dedekind1@gmail.com,
	robh+dt@kernel.org, linux-mtd@lists.infradead.org,
	computersforpeace@gmail.com
Subject: Re: [PATCH 1/2] ubi: mount partitions specified in device tree
Date: Sun, 19 Jun 2016 10:53:42 +0200	[thread overview]
Message-ID: <57665D96.1070804@nod.at> (raw)
In-Reply-To: <20160618232054.GB29476@makrotopia.org>

Am 19.06.2016 um 01:20 schrieb Daniel Golle:
> In MBR there used to be an 'active' flag stored for each partition.
> Maybe it'd be nice to introduce something similar to mark UBI volumes
> to be the default rootfs.
> Currently we solve this issue by convention: If a volume is named
> 'rootfs' it is automatically mounted during boot. Depending on the
> filesystem in use a ubiblock device has to be created as well.
> This is mostly just the continuation of the existing naming convention
> of mtd partitions, a patch OpenWrt is carrying around for a long
> while already.
> To support the same on UBI, another set of patches was made.

Sorry, I still have troubles to understand your use case.
Both of you seem to hate the kernel command line for reasons
I don't fully understand so far.

> I agree that there should be a way to pass this through the of_node
> of the mtd partition which is defined in the device tree.
> Selecting to-be-ubi-attached mtd partitions in device-tree would
> replace patch:
> 
> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch

What is the need of this? Use use the kernel command line to tell UBI from which MTD to attach.

> To auto-select the rootfs, we currently carry another bunch of patches
> 
> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/491-ubi-auto-create-ubiblock-device-for-rootfs.patch

Same question here.

> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch

Ditto.

> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch

Ditto.

> This is more or less filesystem-agnostic and works fine as long as
> there is only one volume called 'rootfs' and this volume is always
> used as rootfs.
> 
> Dual-boot setups will need some way to pass the active rootfs volume to
> the kernel. While I agree that this is possible by appending or
> prepending to the cmdline string passed to the kernel, this either
> limits the users' ability to manually specify the rootfs using the
> cmdline or becomes a more complex task to only append/prepend the
> cmdline in case the user-defined string doesn't already contain
> relevant parameters...

Sorry, but this is just a tooling problem and not to be addressed in the kernel.
There is also the possibility to use an initramfs (either as file or embedded in the kernel)
if the mount/attach logic becomes *really* complicated...

> Thus it'd be nicer to flag the default rootfs volume via the device-
> tree.

As I said, as far I'm informed device tree is for configuring Linux, it describes
the hardware. We also don't have LVM, DM or iSCSI bindings in DT. ;)
Maybe device tree folks will tell more...

Thanks,
//richard

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>
To: Daniel Golle <daniel-g5gK2j5usbvCyp4qypjU+w@public.gmane.org>,
	Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
Cc: dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 1/2] ubi: mount partitions specified in device tree
Date: Sun, 19 Jun 2016 10:53:42 +0200	[thread overview]
Message-ID: <57665D96.1070804@nod.at> (raw)
In-Reply-To: <20160618232054.GB29476-g5gK2j5usbvCyp4qypjU+w@public.gmane.org>

Am 19.06.2016 um 01:20 schrieb Daniel Golle:
> In MBR there used to be an 'active' flag stored for each partition.
> Maybe it'd be nice to introduce something similar to mark UBI volumes
> to be the default rootfs.
> Currently we solve this issue by convention: If a volume is named
> 'rootfs' it is automatically mounted during boot. Depending on the
> filesystem in use a ubiblock device has to be created as well.
> This is mostly just the continuation of the existing naming convention
> of mtd partitions, a patch OpenWrt is carrying around for a long
> while already.
> To support the same on UBI, another set of patches was made.

Sorry, I still have troubles to understand your use case.
Both of you seem to hate the kernel command line for reasons
I don't fully understand so far.

> I agree that there should be a way to pass this through the of_node
> of the mtd partition which is defined in the device tree.
> Selecting to-be-ubi-attached mtd partitions in device-tree would
> replace patch:
> 
> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch

What is the need of this? Use use the kernel command line to tell UBI from which MTD to attach.

> To auto-select the rootfs, we currently carry another bunch of patches
> 
> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/491-ubi-auto-create-ubiblock-device-for-rootfs.patch

Same question here.

> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/492-try-auto-mounting-ubi0-rootfs-in-init-do_mounts.c.patch

Ditto.

> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/generic/patches-4.4/493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch

Ditto.

> This is more or less filesystem-agnostic and works fine as long as
> there is only one volume called 'rootfs' and this volume is always
> used as rootfs.
> 
> Dual-boot setups will need some way to pass the active rootfs volume to
> the kernel. While I agree that this is possible by appending or
> prepending to the cmdline string passed to the kernel, this either
> limits the users' ability to manually specify the rootfs using the
> cmdline or becomes a more complex task to only append/prepend the
> cmdline in case the user-defined string doesn't already contain
> relevant parameters...

Sorry, but this is just a tooling problem and not to be addressed in the kernel.
There is also the possibility to use an initramfs (either as file or embedded in the kernel)
if the mount/attach logic becomes *really* complicated...

> Thus it'd be nicer to flag the default rootfs volume via the device-
> tree.

As I said, as far I'm informed device tree is for configuring Linux, it describes
the hardware. We also don't have LVM, DM or iSCSI bindings in DT. ;)
Maybe device tree folks will tell more...

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  8:54 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 [this message]
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
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=57665D96.1070804@nod.at \
    --to=richard@nod.at \
    --cc=computersforpeace@gmail.com \
    --cc=daniel@makrotopia.org \
    --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=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.