[OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from device node name and SOC
Tomasz Maciej Nowak
tomek_n at o2.pl
Fri Dec 13 08:16:15 EST 2019
W dniu 11.12.2019 o 11:42, Adrian Schmutzler pisze:
>> -----Original Message-----
>> From: Tomasz Maciej Nowak [mailto:tomek_n at o2.pl]
>> Sent: Dienstag, 10. Dezember 2019 14:39
>> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; openwrt-
>> devel at lists.openwrt.org
>> Subject: Re: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from
>> device node name and SOC
>> Hi Adrian.
>> W dniu 07.12.2019 o 23:28, Adrian Schmutzler pisze:
>>> The device part in the SUNXI_DTS variable always corresponds to
>>> device node name. This is another redundancy that can be removed
>>> by calculating the DTS name from a newly introduced SUNXI_SOC
>>> variable and the node name.
>>> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
>>> target/linux/sunxi/image/Makefile | 5 ++-
>>> target/linux/sunxi/image/cortex-a53.mk | 18 +++++++----
>>> target/linux/sunxi/image/cortex-a7.mk | 44 +++++++++++++-------------
>>> target/linux/sunxi/image/cortex-a8.mk | 13 ++++----
>>> 4 files changed, 45 insertions(+), 35 deletions(-)
>>> diff --git a/target/linux/sunxi/image/Makefile
>>> index 04e0abee49..929f4c70f9 100644
>>> --- a/target/linux/sunxi/image/Makefile
>>> +++ b/target/linux/sunxi/image/Makefile
>>> @@ -32,12 +32,15 @@ endef
>>> # why \x00\x00\x00\x00 for zImage-initramfs
>>> define Device/Default
>>> PROFILES := Default
>>> - DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
>>> + DEVICE_VARS := SUNXI_SOC SUNXI_DTS SUNXI_DTS_DIR SUNXI_UBOOT
>> Instead of adding new target speciffic variables, wouldn't using already
>> specified ones be better? We have DEVICE_DTS and DEVICE_DTS_DIR. Also the
> Based on
> I had the impression that DEVICE_DTS and DEVICE_DTS_DIR are reserved keywords for a particular mechanism to append DTB.
These are not reserved at all. Other targets use it.
> Thus, and since the target has been using "custom" SUNXI_DTS variable so far, I decided to stick to that pattern.
Looking at git history that variable precedes DEVICE_DTS, so I assume there was
no one bothered to convert it when global one was introduced. Now is best time
to do that.
>> SUNXI_SOC feels bit redundant since it needs to be specified for each device
>> and it could be replaced with DEVICE_DTS := sun50i-h5-$(1) or simply full dts
> No, because I need to cut down the device name, so it would be
> DEVICE_DTS := sun50i-h5-$(lastword $(subst _, ,$(1)))
> which I would not like to repeat over and over.
Yeah, forgot about replacing separator with dash.
> I admit that changing the DTS variable is the weakest part in my patchset. However, I think introducing the SUNXI_SOC and SUNXI_DTS_DIR will make the target more organized. Despite, by this it becomes more consistent with other targets where this has been reorganized recently (i.e. ath79 and ramips, where we use ATH_SOC and MTK_SOC to do the very same).
> At least I personally think that this is better that repeating the very same name again in the DTS definition.
Well, I've no strong feelings against using SUNXI_SOC, it's reasonable given
Your explanation, but SUNXI_DTS_DIR should be changed to global one.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel