[OpenWrt-Devel] [PATCH 3/8] mvebu: image: drop empty variables from default profile

Adrian Schmutzler mail at adrianschmutzler.de
Fri Jan 31 10:56:58 EST 2020


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> Behalf Of Tomasz Maciej Nowak
> Sent: Freitag, 31. Januar 2020 16:46
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH 3/8] mvebu: image: drop empty variables from
> default profile
> 
> These variables are already initialized within DEVICE_VARS. Just move
> DEVICE_VARS to make sure they are set before default profile.

I've just played around with this in ath79 for some other reason, and found that
DEVICE_VARS _won't_ set the variables to empty values. It will just make sure
that the variables can be _set_ per device (e.g. DEVICE_DTS_DIR vs. DTS_DIR). If
you do not set the variable for one device, it will just have the value from the
previous device(!).
So, setting the variables to "" in the default definition actually makes sure
that they really are zero for those devices where they are not set. (Of course,
typically those are the devices where they aren't evaluated anyway.)

Best

Adrian



> 
> Signed-off-by: Tomasz Maciej Nowak <tomek_n at o2.pl>
> ---
>  target/linux/mvebu/image/Makefile | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/target/linux/mvebu/image/Makefile
> b/target/linux/mvebu/image/Makefile
> index aeabffdca2..d9e4b1acce 100644
> --- a/target/linux/mvebu/image/Makefile
> +++ b/target/linux/mvebu/image/Makefile
> @@ -75,6 +75,7 @@ define Build/uDPU-firmware
>  	(cd $@-fw; $(TAR) -cvzf $(KDIR_TMP)/$(IMAGE_PREFIX)-firmware.tgz .)
>  endef
> 
> +DEVICE_VARS += BOOT_SCRIPT UBOOT
>  define Device/Default
>    PROFILES := Default
>    DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
> @@ -86,10 +87,7 @@ define Device/Default
>    IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
>    SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
>    UBINIZE_OPTS := -E 5
> -  UBOOT :=
> -  BOOT_SCRIPT :=
>  endef
> -DEVICE_VARS += BOOT_SCRIPT UBOOT
> 
>  define Device/Default-arm64
>    BOOT_SCRIPT := generic-arm64
> --
> 2.25.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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



More information about the openwrt-devel mailing list