[PATCH] build: put DT "compatible" value as "board_name" in profiles.json

Rafał Miłecki rafal at milecki.pl
Thu Jul 9 05:12:07 EDT 2020


On 2020-07-09 10:49, Daniel Golle wrote:
> On Wed, Jul 08, 2020 at 11:32:43PM +0200, Rafał Miłecki wrote:
>> On 08.07.2020 21:34, Paul Spooren wrote:
>> > I think there is a policy for new DT devices to use the compatible string as profile.
>> >
>> > Multiple targets contain the following line in the target Makefile, which automatically adds the profile name as supported device:
>> >
>> > SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
>> >
>> > So ideally for all devices using DT, the profile and compatible string are the same except for '_' replaced by ','.
>> >
>> > For instance, the "Linksys WRT3200ACM" has the profile ID `linksys_wrt3200acm` and the automatically added compatible string `linksys,wrt3200acm`. So if that device wanted to search the `mvebu/cortexa9/profiles.json` for available sysupgrades, it takes the first entry from /proc/device-tree/compatible, replaces ',' with '_' find images in profiles.json['profiles']['linksys_wrt3200acm']['images'].
>> >
>> > For cases where DT compatible and OpenWrt profile ID/name where different either one was patched[0].
>> 
>> There are still few exceptions like:
>> linksys-ea9500 vs. compatible = "linksys,panamera"
>> luxul-xwr-3150 vs. compatible = "luxul,xwr-3150-v1"
>> luxul-xbr-4500 vs. compatible = "luxul,xbr-4500-v1"
>> 
>> This is a bit of problem because:
>> 1. I can't change "panamera" to "ea9500" as I was explicitly asked to
>>    stick to "panamera" by Imre when upstreaming that DTS
> 
> I agree we should respect the artistic preferences of contributors to
> some degree.
> However, in this case, is there any reason for that somehow secretive
> naming scheme beyond personal preference?
> Having a consistent and easy to understand codebase also weights a bit
> higher than that to me.

For Linksys, as said, I was told by Imre to use that magic "paramera"
string. The only explanation I got was that it was "discussed for other
platforms". For reference, see:

[PATCH] ARM: dts: BCM5301X: Add basic DT for Linksys EA9500
https://patchwork.kernel.org/patch/9588095/

For Luxul devices "-v1" suffix was initially used (during development)
and later it was decided V2 won't ever appear. So filename got
simplified.



More information about the openwrt-devel mailing list