Hi,

> I saw similar behavior when variables were set but not added to DEVICE_VARS.
> From the tests I've done before sending, the produced images looked fine, but
> I'll re-test that to make sure.

When variables are set, but are _not_ added to DEVICE_VARS, the variables will 
have _one_ single value for _all_ devices, i.e. the one set for the last device.

When variables are _not_ set, but are added to DEVICE_VARS, the variables will 
have the last value set to any device before (i.e. the last device setting it). 
Note that Device/Default counts like an include to the current device there.

I've tested this for a bunch of tplink-safeloader devices in ath79 by adding 
the following line to the Build/tplink-safeloader definition:
printf "$(DEVICE_TITLE) l$(LOADER_TYPE) x$(TPLINK_HWID) y$(TPLINK_HWREV) 
z$(TPLINK_HWREVADD)'\n" >> /data/openwrt/safeloadercheck.txt

Best

Adrian

> 
> > 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
> >
> 
> Regards
> 
> >
> >
> >>
> >> Signed-off-by: Tomasz Maciej Nowak <[email protected]>
> >> ---
> >>  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
> >> [email protected]
> >> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> >
> 
> 
> --
> TMN


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to