[PATCH] treewide: consistenly disable building of devices

mail at adrianschmutzler.de mail at adrianschmutzler.de
Mon Jul 27 07:21:10 EDT 2020


Hi Petr,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Petr Štetiar
> Sent: Montag, 27. Juli 2020 12:53
> To: openwrt-devel at lists.openwrt.org
> Cc: Petr Štetiar <ynezz at true.cz>
> Subject: [PATCH] treewide: consistenly disable building of devices

Typo: consistenly -> consistently

> 
> Since commit 7546be60074e ("build: allow overriding default selection state
> for devices") we can disable building of devices with `DEFAULT := n` construct
> which is prefered as those devices would still be available for use with Image
> Builder for example.

Generally, be aware that there are at least two reasons for devices being disabled:

1. The can't be built by buildbots because kernel/image gets too large
2. Device support is broken, e.g. after a kernel bump (That seems to be the case for tplink-archer-cx in bcm53xx)

I'm not sure whether it makes sense to use DEFAULT := n for all of the cases in category 2. E.g. I once disabled ath79/nand GL.inet images in 19.07 this way (by commenting out), as nand support for ath79 with 4.14 kernel is just broken and it simply does not make sense to build these devices there.

So, I generally think that there are cases where disabling a device by commenting it out makes sense. Unfortunately, following that idea would mean having to check the circumstances for all affected devices individually, i.e. much more work than needed for the current state of this PR.

I'm not sure yet whether my distinction between those two categories is really that much important, but I'd like to share these thoughts for discussion.

Best

Adrian



> 
> Signed-off-by: Petr Štetiar <ynezz at true.cz>
> ---
>  target/linux/at91/image/sam9x.mk      |  3 ++-
>  target/linux/ath25/image/Makefile     |  6 ++++--
>  target/linux/bcm47xx/image/mips74k.mk | 12 ++++++++----
>  target/linux/bcm53xx/image/Makefile   | 18 ++++++++++++------
>  4 files changed, 26 insertions(+), 13 deletions(-)
> 
> diff --git a/target/linux/at91/image/sam9x.mk
> b/target/linux/at91/image/sam9x.mk
> index 8fd6b4506f32..beff346725e6 100644
> --- a/target/linux/at91/image/sam9x.mk
> +++ b/target/linux/at91/image/sam9x.mk
> @@ -173,8 +173,9 @@ define Device/at91-q5xr5
>    DEVICE_VENDOR := Exegin
>    DEVICE_MODEL := Q5XR5
>    KERNEL_SIZE := 2048k
> +  DEFAULT := n
>  endef
> -#TARGET_DEVICES += at91-q5xr5
> +TARGET_DEVICES += at91-q5xr5
> 
>  define Device/wb45n
>    $(Device/evaluation-fit)
> diff --git a/target/linux/ath25/image/Makefile
> b/target/linux/ath25/image/Makefile
> index e1ebb159cda6..5bfbaa38e68e 100644
> --- a/target/linux/ath25/image/Makefile
> +++ b/target/linux/ath25/image/Makefile
> @@ -99,15 +99,17 @@ define Device/np25g
>    DEVICE_MODEL := NP25G
>    KERNEL := kernel-bin | gzip-kernel
>    IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 128k |
> mkmylofw np25g
> +  DEFAULT := n
>  endef
> -#TARGET_DEVICES += np25g
> +TARGET_DEVICES += np25g
> 
>  define Device/wpe53g
>    DEVICE_VENDOR := Compex
>    DEVICE_MODEL := WPE53G
>    KERNEL := kernel-bin | gzip-kernel
>    IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 128k |
> mkmylofw wpe53g
> +  DEFAULT := n
>  endef
> -#TARGET_DEVICES += wpe53g
> +TARGET_DEVICES += wpe53g
> 
>  $(eval $(call BuildImage))
> diff --git a/target/linux/bcm47xx/image/mips74k.mk
> b/target/linux/bcm47xx/image/mips74k.mk
> index 6ca4d21e1f30..fb3c594c03c2 100644
> --- a/target/linux/bcm47xx/image/mips74k.mk
> +++ b/target/linux/bcm47xx/image/mips74k.mk
> @@ -15,8 +15,9 @@ define Device/asus-rt-ac66u
>    DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES)
>    $(Device/asus)
>    PRODUCTID := RT-AC66U
> +  DEFAULT := n
>  endef
> -#  TARGET_DEVICES += asus-rt-ac66u
> +TARGET_DEVICES += asus-rt-ac66u
> 
>  define Device/asus-rt-n10
>    DEVICE_MODEL := RT-N10
> @@ -399,8 +400,9 @@ define Device/netgear-wndr3400-vcna
>    $(Device/netgear)
>    NETGEAR_BOARD_ID := U12H155T01_NETGEAR
>    NETGEAR_REGION := 2
> +  DEFAULT := n
>  endef
> -#  TARGET_DEVICES += netgear-wndr3400-vcna
> +TARGET_DEVICES += netgear-wndr3400-vcna
> 
>  define Device/netgear-wndr4000
>    DEVICE_MODEL := WNDR4000
> @@ -467,8 +469,9 @@ define Device/netgear-wnr3500u
>    $(Device/netgear)
>    NETGEAR_BOARD_ID := U12H136T00_NETGEAR
>    NETGEAR_REGION := 2
> +  DEFAULT := n
>  endef
> -#  TARGET_DEVICES += netgear-wnr3500u
> +TARGET_DEVICES += netgear-wnr3500u
> 
>  define Device/netgear-wnr3500-v2
>    DEVICE_MODEL := WNR3500
> @@ -487,7 +490,8 @@ define Device/netgear-wnr3500-v2-vc
>    $(Device/netgear)
>    NETGEAR_BOARD_ID := U12H127T70_NETGEAR
>    NETGEAR_REGION := 2
> +  DEFAULT := n
>  endef
> -#  TARGET_DEVICES += netgear-wnr3500-v2-vc
> +TARGET_DEVICES += netgear-wnr3500-v2-vc
> 
>  TARGET_DEVICES += standard standard-noloader-nodictionarylzma
> diff --git a/target/linux/bcm53xx/image/Makefile
> b/target/linux/bcm53xx/image/Makefile
> index 0e3779080233..90b3474fb885 100644
> --- a/target/linux/bcm53xx/image/Makefile
> +++ b/target/linux/bcm53xx/image/Makefile
> @@ -250,8 +250,9 @@ define Device/linksys-ea6300-v1
>    DEVICE_MODEL := EA6300
>    DEVICE_VARIANT := v1
>    DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
> +  DEFAULT := n
>  endef
> -# TARGET_DEVICES += linksys-ea6300-v1
> +TARGET_DEVICES += linksys-ea6300-v1
> 
>  define Device/linksys-ea6500-v2
>    DEVICE_VENDOR := Linksys
> @@ -266,16 +267,18 @@ define Device/linksys-ea9200
>    DEVICE_MODEL := EA9200
>    DEVICE_VARIANT := v1
>    DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES)
> +  DEFAULT := n
>  endef
> -# TARGET_DEVICES += linksys-ea9200
> +TARGET_DEVICES += linksys-ea9200
> 
>  define Device/linksys-ea9500
>    DEVICE_VENDOR := Linksys
>    DEVICE_MODEL := EA9500
>    DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
>    DEVICE_DTS := bcm47094-linksys-panamera
> +  DEFAULT := n
>  endef
> -# TARGET_DEVICES += linksys-ea9500
> +TARGET_DEVICES += linksys-ea9500
> 
>  define Device/luxul
>    DEVICE_VENDOR := Luxul
> @@ -370,8 +373,9 @@ define Device/netgear-r8500
>    DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(USB3_PACKAGES)
>    $(Device/netgear)
>    NETGEAR_BOARD_ID := U12H334T00_NETGEAR
> +  DEFAULT := n
>  endef
> -# TARGET_DEVICES += netgear-r8500
> +TARGET_DEVICES += netgear-r8500
> 
>  define Device/smartrg-sr400ac
>    DEVICE_VENDOR := SmartRG
> @@ -409,8 +413,9 @@ define Device/tplink-archer-c5-v2
>    IMAGES := bin
>    IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader
>    TPLINK_BOARD := ARCHER-C5-V2
> +  DEFAULT := n
>  endef
> -#TARGET_DEVICES += tplink-archer-c5-v2
> +TARGET_DEVICES += tplink-archer-c5-v2
> 
>  define Device/tplink-archer-c9-v1
>    DEVICE_VENDOR := TP-LINK
> @@ -420,7 +425,8 @@ define Device/tplink-archer-c9-v1
>    IMAGES := bin
>    IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader
>    TPLINK_BOARD := ARCHERC9
> +  DEFAULT := n
>  endef
> -#TARGET_DEVICES += tplink-archer-c9-v1
> +TARGET_DEVICES += tplink-archer-c9-v1
> 
>  $(eval $(call BuildImage))
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200727/8c7f2e55/attachment-0001.sig>


More information about the openwrt-devel mailing list