Hi,

> -----Original Message-----
> From: Tomasz Maciej Nowak [mailto:tome...@o2.pl]
> Sent: Dienstag, 10. Dezember 2019 14:39
> To: Adrian Schmutzler <freif...@adrianschmutzler.de>; openwrt-
> de...@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 <freif...@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
> b/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
https://github.com/openwrt/openwrt/commit/7a8d3432c739c6ff038295176e8b6324e92fc116
I had the impression that DEVICE_DTS and DEVICE_DTS_DIR are reserved keywords 
for a particular mechanism to append DTB.

Thus, and since the target has been using "custom" SUNXI_DTS variable so far, I 
decided to stick to that pattern.

> 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
> name.

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.

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.

Best

Adrian

Attachment: openpgp-digital-signature.asc
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to