From: Richard Weinberger <richard@nod.at>
To: Daniel Golle <daniel@makrotopia.org>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
dedekind1@gmail.com, Hauke Mehrtens <hauke@hauke-m.de>,
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 15:19:38 +0200 [thread overview]
Message-ID: <57669BEA.5030306@nod.at> (raw)
In-Reply-To: <20160619130514.GB820@makrotopia.org>
Daniel,
Am 19.06.2016 um 15:05 schrieb Daniel Golle:
>>> The same kernel gets used on many devices having different $vendor
>>> mtd-partition layouts. A way other than the kernel cmdline allows
>>> to specify the default behaviour without restricting the user to
>>> manually use those cmdline options.
>>
>> You can put the cmdline into the per-device device tree.
>> This is the concept of a multi-device kernel. One kernel and
>> many device trees.
>
> Exactly true. However, as the mtd partitions are defined in the tree
> itself rather than using 'mtdparts=...' in the cmdline built-into the
> device-tree, it'd be nice to also select that a specific partition
> should be ubiattached.
DT already offer all you need and nothing hinders you from
using mtdparts=.
>>
>>>>
>>>>> 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.
>>>>
>>>
>>> Same arguments as above. In addition, we do not want to hard-code the
>>> filesystem type used for the rootfs volume, as it can either be UBIFS
>>> or a read-only filesystem needing a ubiblock device. Thus we would
>>> need the bootloader to know which filesystem *type* is being used and
>>> then decide wether to pass 'rootfs=ubiX:Y' or
>>> 'ubiblock=... rootfs=/dev/ubiblock0'.
>>
>> What is wrong with having a very minimal initramfs to do such an
>> auto discovery logic?
>
> Sorry, but we are not talking about traditional desktop or server
> systems. OpenWrt/LEDE runs on devices with as little as 32 MB of RAM
> and 4 MB of Flash. Devices with UBI will typically have at least
> 32 MB of NAND Flash, but still not necessarily a lot of RAM.
> Have a look at
> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/lantiq/dts/BTHOMEHUBV2B.dts
> for a good example of the type of hardware we are talking about.
I didn't recommend adding glibc+systemd in the initramfs. It can be very, very small
and trivial.
At least it would be much more clean than your pile of not so fancy MTD/UBI patches.
> Apart from that we already automatically generate initramfs-based
> images for devices to be used in situations where you cannot or don't
> want to touch the devices' flash.
The initramfs can be part of the kernel image. No additional file needed.
>> This is something you need to discuss wit DT folks.
>> I'm not per se against UBI DT bindings it just does not feel right
>> and contradicts my understanding of it.
>
> I agree with your view when it comes to describing UBI volumes
> in the device tree. That's wrong just as it would be wrong to add
> DT bindings for LVM2.
> As said previously, the situation is different for flash chips having
> partitions defined for use with UBI on some boards.
Everything can be done with the existing framework. DT binding maybe be nice
for your use case but I fear it is not applicable.
Thanks,
//richard
WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: Daniel Golle <daniel@makrotopia.org>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
dedekind1@gmail.com, Hauke Mehrtens <hauke@hauke-m.de>,
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 15:19:38 +0200 [thread overview]
Message-ID: <57669BEA.5030306@nod.at> (raw)
In-Reply-To: <20160619130514.GB820@makrotopia.org>
Daniel,
Am 19.06.2016 um 15:05 schrieb Daniel Golle:
>>> The same kernel gets used on many devices having different $vendor
>>> mtd-partition layouts. A way other than the kernel cmdline allows
>>> to specify the default behaviour without restricting the user to
>>> manually use those cmdline options.
>>
>> You can put the cmdline into the per-device device tree.
>> This is the concept of a multi-device kernel. One kernel and
>> many device trees.
>
> Exactly true. However, as the mtd partitions are defined in the tree
> itself rather than using 'mtdparts=...' in the cmdline built-into the
> device-tree, it'd be nice to also select that a specific partition
> should be ubiattached.
DT already offer all you need and nothing hinders you from
using mtdparts=.
>>
>>>>
>>>>> 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.
>>>>
>>>
>>> Same arguments as above. In addition, we do not want to hard-code the
>>> filesystem type used for the rootfs volume, as it can either be UBIFS
>>> or a read-only filesystem needing a ubiblock device. Thus we would
>>> need the bootloader to know which filesystem *type* is being used and
>>> then decide wether to pass 'rootfs=ubiX:Y' or
>>> 'ubiblock=... rootfs=/dev/ubiblock0'.
>>
>> What is wrong with having a very minimal initramfs to do such an
>> auto discovery logic?
>
> Sorry, but we are not talking about traditional desktop or server
> systems. OpenWrt/LEDE runs on devices with as little as 32 MB of RAM
> and 4 MB of Flash. Devices with UBI will typically have at least
> 32 MB of NAND Flash, but still not necessarily a lot of RAM.
> Have a look at
> https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/lantiq/dts/BTHOMEHUBV2B.dts
> for a good example of the type of hardware we are talking about.
I didn't recommend adding glibc+systemd in the initramfs. It can be very, very small
and trivial.
At least it would be much more clean than your pile of not so fancy MTD/UBI patches.
> Apart from that we already automatically generate initramfs-based
> images for devices to be used in situations where you cannot or don't
> want to touch the devices' flash.
The initramfs can be part of the kernel image. No additional file needed.
>> This is something you need to discuss wit DT folks.
>> I'm not per se against UBI DT bindings it just does not feel right
>> and contradicts my understanding of it.
>
> I agree with your view when it comes to describing UBI volumes
> in the device tree. That's wrong just as it would be wrong to add
> DT bindings for LVM2.
> As said previously, the situation is different for flash chips having
> partitions defined for use with UBI on some boards.
Everything can be done with the existing framework. DT binding maybe be nice
for your use case but I fear it is not applicable.
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2016-06-19 13:20 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 [this message]
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=57669BEA.5030306@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.