From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC DTC PATCH] dtc: add symlink (-L) output to dtbs
Date: Tue, 12 Nov 2013 11:38:47 -0700 [thread overview]
Message-ID: <528275B7.6050209@wwwdotorg.org> (raw)
In-Reply-To: <CAL_Jsq+mAoN2Lbg+uqfLMTZBvgz28E-EioiaU4BUSL_7rS5JjA@mail.gmail.com>
On 11/12/2013 08:29 AM, Rob Herring wrote:
> On Mon, Nov 11, 2013 at 3:24 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 11/11/2013 01:29 PM, Jason Cooper wrote:
>>> Consumers of the Linux kernel's build products are beginning to hardcode
>>> the filenames of the dtbs generated. Since the dtb filenames are
>>> currently the dts filename s/dts/dtb/, this prevents the kernel
>>> community from renaming dts files as needed.
>>
>> My take is that the DTB filenames are part of the ABI, and therefore the
>> DTS filenames are also part of the ABI. Why would we want to rename them?
>
> I agree with the ABI part, but for long term I think compatible
> strings are a better choice for the ABI than filenames. A link
> provides for a way to transition.
But this change isn't making the compatible value be the ABI, it's still
keeping the filename as the ABI, but creating a different way of
choosing the filename.
In other words, if the compatible value is the ABI, then the algorithm is:
* Search for all available DTBs
* Parse each DTB to find one with a matching compatible value
Whereas if the filename is the ABI, the algorithm is:
* Calculate the filename
* Load that one specific file, without looking at its content
Some additional thoughts:
* The filename is only relevant to the bootloader (or whatever
locates/selects a DTB). The kernel/OS just gets a single DTB passed to
it and uses it, without any naming metadata[1].
* Perhaps different bootloaders work different ways. For example, I've
set up U-Boot on all Tegra devices so that if U-Boot expands the string
"${soc}-${board}.dtb" using its environment, it'll generate the correct
DTB filename.
* Other boot-loaders might like "${compatible_parsed_from_the_dtb}" to
be the filename; that's Jason's proposal.
* Other SW (which I mention in [1]) might want to locate DTBs based on
ARM machine ID rather than compatible value.
* As such, we're really talking about an indexing process when
installing/packaging/searching DTBs. Shouldn't this file renaming happen
as part of that process, not the build process?
* When we create symlinks or any kind of index, I think we want to
create links for all entries in the compatible property (or other index
source). Consider if we have two boards:
Cardhu revision A02
Cardhu revision A04
Initially we think they're the same because we didn't read the
schematics well enough, but then later we split them. That means we'll
start out with one file:
nvidia,tegra30-cardhu.dtb
then later have instead:
nvidia,tegra30-cardhu-a02.dtb
nvidia,tegra30-cardhu-a04.dtb
Similarly, perhaps one DTB is (initially thought to be?) suitable for
multiple ARM machine IDs, etc.
So, bootloaders would have to search for $vendor,$soc-$board-$rev.dtb
then fall back to $vendor,$soc-$board.dtb (both those values are in the
compatible properties in those DTBs).
But then "nvidia,tegra30" is in the compatible property for many boards.
I wonder how we resolve that?
[1] I'm ignoring the idea that was proposed of passing n DTBs to the
kernel and having it select one based on machine ID. So by "the kernel"
I mean the code that runs after the DTB is selected.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [RFC DTC PATCH] dtc: add symlink (-L) output to dtbs
Date: Tue, 12 Nov 2013 11:38:47 -0700 [thread overview]
Message-ID: <528275B7.6050209@wwwdotorg.org> (raw)
In-Reply-To: <CAL_Jsq+mAoN2Lbg+uqfLMTZBvgz28E-EioiaU4BUSL_7rS5JjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 11/12/2013 08:29 AM, Rob Herring wrote:
> On Mon, Nov 11, 2013 at 3:24 PM, Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote:
>> On 11/11/2013 01:29 PM, Jason Cooper wrote:
>>> Consumers of the Linux kernel's build products are beginning to hardcode
>>> the filenames of the dtbs generated. Since the dtb filenames are
>>> currently the dts filename s/dts/dtb/, this prevents the kernel
>>> community from renaming dts files as needed.
>>
>> My take is that the DTB filenames are part of the ABI, and therefore the
>> DTS filenames are also part of the ABI. Why would we want to rename them?
>
> I agree with the ABI part, but for long term I think compatible
> strings are a better choice for the ABI than filenames. A link
> provides for a way to transition.
But this change isn't making the compatible value be the ABI, it's still
keeping the filename as the ABI, but creating a different way of
choosing the filename.
In other words, if the compatible value is the ABI, then the algorithm is:
* Search for all available DTBs
* Parse each DTB to find one with a matching compatible value
Whereas if the filename is the ABI, the algorithm is:
* Calculate the filename
* Load that one specific file, without looking at its content
Some additional thoughts:
* The filename is only relevant to the bootloader (or whatever
locates/selects a DTB). The kernel/OS just gets a single DTB passed to
it and uses it, without any naming metadata[1].
* Perhaps different bootloaders work different ways. For example, I've
set up U-Boot on all Tegra devices so that if U-Boot expands the string
"${soc}-${board}.dtb" using its environment, it'll generate the correct
DTB filename.
* Other boot-loaders might like "${compatible_parsed_from_the_dtb}" to
be the filename; that's Jason's proposal.
* Other SW (which I mention in [1]) might want to locate DTBs based on
ARM machine ID rather than compatible value.
* As such, we're really talking about an indexing process when
installing/packaging/searching DTBs. Shouldn't this file renaming happen
as part of that process, not the build process?
* When we create symlinks or any kind of index, I think we want to
create links for all entries in the compatible property (or other index
source). Consider if we have two boards:
Cardhu revision A02
Cardhu revision A04
Initially we think they're the same because we didn't read the
schematics well enough, but then later we split them. That means we'll
start out with one file:
nvidia,tegra30-cardhu.dtb
then later have instead:
nvidia,tegra30-cardhu-a02.dtb
nvidia,tegra30-cardhu-a04.dtb
Similarly, perhaps one DTB is (initially thought to be?) suitable for
multiple ARM machine IDs, etc.
So, bootloaders would have to search for $vendor,$soc-$board-$rev.dtb
then fall back to $vendor,$soc-$board.dtb (both those values are in the
compatible properties in those DTBs).
But then "nvidia,tegra30" is in the compatible property for many boards.
I wonder how we resolve that?
[1] I'm ignoring the idea that was proposed of passing n DTBs to the
kernel and having it select one based on machine ID. So by "the kernel"
I mean the code that runs after the DTB is selected.
--
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
next prev parent reply other threads:[~2013-11-12 18:38 UTC|newest]
Thread overview: 191+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 20:29 [RFC DTC PATCH] dtc: add symlink (-L) output to dtbs Jason Cooper
2013-11-11 20:29 ` Jason Cooper
[not found] ` < 1385062552-9882-1-git-send-email-jason@lakedaemon.net>
[not found] ` < 653B066B-5B24-4817-86EF-D4D9F129123D@codeaurora.org>
[not found] ` < 52814AFB.3070600@wwwdotorg.org>
[not found] ` < CAL_Jsq+mAoN2Lbg+uqfLMTZBvgz28E-EioiaU4BUSL_7rS5JjA@mail.gmail.com>
[not found] ` < 528275B7.6050209@wwwdotorg.org>
[not found] ` < 1384896475-8744-1-git-send-email-jason@lakedaemon.net>
[not found] ` < 1385942188-21831-1-git-send-email-jason@lakedaemon.net>
[not found] ` < 20131115121215.901EFC40885@trevor.secretlab.ca>
2013-11-11 21:24 ` Stephen Warren
2013-11-11 21:24 ` Stephen Warren
2013-11-12 14:51 ` Jason Cooper
2013-11-12 14:51 ` Jason Cooper
2013-11-12 15:29 ` Rob Herring
2013-11-12 15:29 ` Rob Herring
2013-11-12 18:38 ` Stephen Warren [this message]
2013-11-12 18:38 ` Stephen Warren
2013-11-12 19:30 ` Jason Cooper
2013-11-12 19:30 ` Jason Cooper
2013-11-12 19:40 ` Andrew Lunn
2013-11-12 19:40 ` Andrew Lunn
2013-11-12 20:08 ` Jason Cooper
2013-11-12 20:08 ` Jason Cooper
2013-11-12 20:15 ` Stephen Warren
2013-11-12 20:15 ` Stephen Warren
2013-11-14 16:28 ` Jason Cooper
2013-11-14 16:28 ` Jason Cooper
2013-11-14 19:00 ` Stephen Warren
2013-11-14 19:00 ` Stephen Warren
2013-11-14 19:16 ` Jason Gunthorpe
2013-11-14 19:16 ` Jason Gunthorpe
2013-11-14 19:34 ` Russell King - ARM Linux
2013-11-14 19:34 ` Russell King - ARM Linux
2013-11-14 21:37 ` Stephen Warren
2013-11-14 21:37 ` Stephen Warren
2013-11-14 22:12 ` Matt Sealey
2013-11-14 22:12 ` Matt Sealey
2013-11-15 16:14 ` Grant Likely
2013-11-15 16:14 ` Grant Likely
2013-11-14 19:26 ` Russell King - ARM Linux
2013-11-14 19:26 ` Russell King - ARM Linux
2013-11-15 15:23 ` Jason Cooper
2013-11-15 15:23 ` Jason Cooper
2013-11-15 17:09 ` Javier Martinez Canillas
2013-11-15 17:09 ` Javier Martinez Canillas
2013-11-15 21:38 ` Jason Cooper
2013-11-15 21:38 ` Jason Cooper
2013-11-15 12:12 ` Grant Likely
2013-11-15 12:12 ` Grant Likely
2013-11-15 15:21 ` Jason Cooper
2013-11-15 15:21 ` Jason Cooper
2013-11-18 12:56 ` Grant Likely
2013-11-18 12:56 ` Grant Likely
2013-11-18 18:38 ` [RFC PATCH V2 0/2] Add 'make dtbs_install' Jason Cooper
2013-11-18 18:38 ` Jason Cooper
2013-11-18 18:38 ` [RFC PATCH V2 1/2] dtc: add 'compat' output option, prints board string Jason Cooper
2013-11-18 18:38 ` Jason Cooper
2013-11-18 19:01 ` Stephen Warren
2013-11-18 19:01 ` Stephen Warren
2013-11-18 19:21 ` Jason Cooper
2013-11-18 19:21 ` Jason Cooper
2013-11-18 20:24 ` Jason Cooper
2013-11-18 20:24 ` Jason Cooper
2013-11-18 18:38 ` [RFC PATCH V2 2/2] kbuild: dtbs_install: new make target Jason Cooper
2013-11-18 18:38 ` Jason Cooper
2013-11-18 19:09 ` Stephen Warren
2013-11-18 19:09 ` Stephen Warren
2013-11-18 19:19 ` Jason Cooper
2013-11-18 19:19 ` Jason Cooper
2013-11-18 19:23 ` Stephen Warren
2013-11-18 19:23 ` Stephen Warren
2013-11-18 19:28 ` Jason Cooper
2013-11-18 19:28 ` Jason Cooper
2013-11-18 19:38 ` Stephen Warren
2013-11-18 19:38 ` Stephen Warren
2013-11-18 19:52 ` Jason Cooper
2013-11-18 19:52 ` Jason Cooper
[not found] ` < 528A98C8.9040803@wwwdotorg.org>
2013-11-18 22:46 ` Stephen Warren
2013-11-18 22:46 ` Stephen Warren
[not found] ` <20131119122801. GL16735@n2100.arm.linux.org.uk>
2013-11-19 12:28 ` Russell King - ARM Linux
2013-11-19 12:28 ` Russell King - ARM Linux
2013-11-19 14:23 ` Jason Cooper
2013-11-19 14:23 ` Jason Cooper
[not found] ` < 20131119150212.GM16735@n2100.arm.linux.org.uk>
2013-11-19 15:02 ` Russell King - ARM Linux
2013-11-19 15:02 ` Russell King - ARM Linux
[not found] ` <20131119152047. GB28859@titan.lakedaemon.net>
2013-11-19 15:20 ` Jason Cooper
2013-11-19 15:20 ` Jason Cooper
2013-11-19 15:21 ` Russell King - ARM Linux
2013-11-19 15:21 ` Russell King - ARM Linux
[not found] ` < 20131119192246.GP16735@n2100.arm.linux.org.uk>
2013-11-19 19:22 ` Russell King - ARM Linux
2013-11-19 19:22 ` Russell King - ARM Linux
2013-11-19 19:54 ` Jason Cooper
2013-11-19 19:54 ` Jason Cooper
2013-11-20 13:10 ` Grant Likely
2013-11-20 13:10 ` Grant Likely
2013-11-20 13:56 ` Russell King - ARM Linux
2013-11-20 13:56 ` Russell King - ARM Linux
2013-11-21 7:50 ` Grant Likely
2013-11-21 7:50 ` Grant Likely
2013-11-20 16:38 ` Jason Cooper
2013-11-20 16:38 ` Jason Cooper
2013-11-19 18:40 ` Stephen Warren
2013-11-19 18:40 ` Stephen Warren
2013-11-19 18:43 ` Jason Cooper
2013-11-19 18:43 ` Jason Cooper
2013-11-19 18:42 ` Stephen Warren
2013-11-19 18:42 ` Stephen Warren
2013-11-19 18:52 ` Russell King - ARM Linux
2013-11-19 18:52 ` Russell King - ARM Linux
2013-11-19 19:27 ` Stephen Warren
2013-11-19 19:27 ` Stephen Warren
2013-11-19 19:53 ` Russell King - ARM Linux
2013-11-19 19:53 ` Russell King - ARM Linux
2013-11-19 18:57 ` Jason Cooper
2013-11-19 18:57 ` Jason Cooper
2013-11-19 19:53 ` Stephen Warren
2013-11-19 19:53 ` Stephen Warren
2013-11-19 20:39 ` Jason Cooper
2013-11-19 20:39 ` Jason Cooper
2013-11-19 21:06 ` Stephen Warren
2013-11-19 21:06 ` Stephen Warren
2013-11-20 13:18 ` Grant Likely
2013-11-20 13:18 ` Grant Likely
2013-11-18 21:21 ` [RFC PATCH V3 0/2] Add 'make dtbs_install' Jason Cooper
2013-11-18 21:21 ` Jason Cooper
2013-11-18 21:21 ` [RFC PATCH V3 1/2] scripts: dtc: build fdtget for extracting properties from dtbs Jason Cooper
2013-11-18 21:21 ` Jason Cooper
2013-11-18 22:54 ` Stephen Warren
2013-11-18 22:54 ` Stephen Warren
2013-11-19 14:17 ` Grant Likely
2013-11-19 14:17 ` Grant Likely
2013-11-18 21:21 ` [RFC PATCH V3 2/2] kbuild: dtbs_install: new make target Jason Cooper
2013-11-18 21:21 ` Jason Cooper
[not found] ` <cover. 1384798508.git.jason@lakedaemon.net>
[not found] ` < 728deb9bbeab491a728da077aa5e47c0e01bccf8.1384798508.git.jason@lakedaemon. net>
[not found] ` <728deb9bbeab491a728da077aa5e47c0e01bccf8.1384798508.git.jason@lakedaemon.n et>
2013-11-19 13:58 ` [RFC PATCH V2 1/2] dtc: add 'compat' output option, prints board string Grant Likely
2013-11-19 13:58 ` Grant Likely
[not found] ` <cover. 1384809305.git.jason@lakedaemon.net>
[not found] ` < 13f06582c166343c055b8793305d4b9a00b2172e.1384809305.git.jason@lakedaemon. net>
[not found] ` <13f06582c166343c055b8793305d4b9a00b2172e.1384809305.git.jason@lakedaemon.n et>
2013-11-19 14:22 ` [RFC PATCH V3 2/2] kbuild: dtbs_install: new make target Grant Likely
2013-11-19 14:22 ` Grant Likely
2013-11-19 21:27 ` [PATCH V4] " Jason Cooper
2013-11-19 21:27 ` Jason Cooper
2013-11-19 21:58 ` Stephen Warren
2013-11-19 21:58 ` Stephen Warren
2013-11-20 13:21 ` Grant Likely
2013-11-20 13:21 ` Grant Likely
2013-11-20 17:22 ` Jason Cooper
2013-11-20 17:22 ` Jason Cooper
2013-11-20 17:08 ` Jason Cooper
2013-11-20 17:08 ` Jason Cooper
2013-11-20 17:21 ` Stephen Warren
2013-11-20 17:21 ` Stephen Warren
2013-11-21 7:48 ` Grant Likely
2013-11-21 7:48 ` Grant Likely
2013-11-21 19:35 ` [PATCH V5] " Jason Cooper
2013-11-21 19:35 ` Jason Cooper
2013-11-21 19:55 ` Stephen Warren
2013-11-21 19:55 ` Stephen Warren
2013-11-21 23:31 ` Kumar Gala
2013-11-21 23:31 ` Kumar Gala
2013-11-21 23:36 ` Olof Johansson
2013-11-21 23:36 ` Olof Johansson
2013-11-22 7:42 ` Grant Likely
2013-11-22 7:42 ` Grant Likely
2013-11-22 13:31 ` Jason Cooper
2013-11-22 13:31 ` Jason Cooper
2013-11-22 13:19 ` Jason Cooper
2013-11-22 13:19 ` Jason Cooper
2013-12-01 23:40 ` Jason Cooper
2013-12-01 23:40 ` Jason Cooper
2013-11-22 7:44 ` Grant Likely
2013-11-22 7:44 ` Grant Likely
2013-11-22 13:33 ` Jason Cooper
2013-11-22 13:33 ` Jason Cooper
2013-12-01 23:56 ` [PATCH V6] " Jason Cooper
2013-12-01 23:56 ` Jason Cooper
2013-12-03 17:37 ` Stephen Warren
2013-12-03 17:37 ` Stephen Warren
2013-12-03 17:41 ` Russell King - ARM Linux
2013-12-03 17:41 ` Russell King - ARM Linux
2014-01-10 18:29 ` Jason Cooper
2014-01-10 18:29 ` Jason Cooper
2014-02-04 12:40 ` Grant Likely
2014-02-04 12:40 ` Grant Likely
2014-02-04 12:41 ` [PATCH] " Grant Likely
2015-03-28 13:23 ` [PATCH V6] " Russell King - ARM Linux
2015-03-28 13:23 ` Russell King - ARM Linux
2015-03-28 13:37 ` [PATCH] dtbsinstall: don't move target directory out of the way Russell King
2015-03-28 13:37 ` Russell King
2015-03-28 13:37 ` Russell King
2015-03-28 15:59 ` Jason Cooper
2015-03-28 15:59 ` Jason Cooper
2015-03-28 15:59 ` Jason Cooper
2015-03-28 15:58 ` [PATCH V6] kbuild: dtbs_install: new make target Jason Cooper
2015-03-28 15:58 ` Jason Cooper
2015-03-29 20:34 ` Olof Johansson
2015-03-29 20:34 ` Olof Johansson
2015-03-29 20:58 ` Russell King - ARM Linux
2015-03-29 20:58 ` Russell King - ARM Linux
2015-03-29 21:04 ` Jason Cooper
2015-03-29 21:04 ` Jason Cooper
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=528275B7.6050209@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=linux-arm-kernel@lists.infradead.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.