diff mbox series

[OpenWrt-Devel] treewide: add Generic subtarget if missing

Message ID 20190823090237.9471-1-mail@aparcar.org
State Superseded
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel] treewide: add Generic subtarget if missing | expand

Commit Message

Paul Spooren Aug. 23, 2019, 9:02 a.m. UTC
As in 853e4dd OpenWrt should follow a unified structure, where every
device has a target/subtarget combination, if there is only one
subtarget, call it "Generic". This introduces predictable filenames.

CC: Alexander Couzens <lynxis@fe80.eu>
CC: Felix Fietkau <nbd@nbd.name>
CC: Jason Wu <jason.wu.misc@gmail.com>
CC: John Crispin <john@phrozen.org>
CC: Luka Perkov <luka@openwrt.org>
CC: Roman Yeryomin <roman@advem.lv>
CC: Sergey Ryazanov <ryazanov.s.a@gmail.com>
CC: Tim Harvey <tharvey@gateworks.com>
CC: Tomasz Maciej Nowak <tomek_n@o2.pl>

Signed-off-by: Paul Spooren <mail@aparcar.org>
---
 target/linux/ath25/Makefile              | 1 +
 target/linux/ath25/generic/target.mk     | 1 +
 target/linux/cns3xxx/Makefile            | 1 +
 target/linux/cns3xxx/generic/target.mk   | 1 +
 target/linux/gemini/Makefile             | 1 +
 target/linux/gemini/generic/target.mk    | 1 +
 target/linux/imx6/Makefile               | 1 +
 target/linux/imx6/generic/target.mk      | 1 +
 target/linux/kirkwood/Makefile           | 1 +
 target/linux/kirkwood/generic/target.mk  | 1 +
 target/linux/octeon/Makefile             | 1 +
 target/linux/octeon/generic/target.mk    | 1 +
 target/linux/octeontx/Makefile           | 1 +
 target/linux/octeontx/generic/target.mk  | 1 +
 target/linux/omap/Makefile               | 1 +
 target/linux/omap/generic/target.mk      | 1 +
 target/linux/pistachio/Makefile          | 1 +
 target/linux/pistachio/generic/target.mk | 1 +
 target/linux/rb532/Makefile              | 1 +
 target/linux/rb532/generic/target.mk     | 1 +
 target/linux/tegra/Makefile              | 1 +
 target/linux/tegra/generic/target.mk     | 1 +
 target/linux/zynq/Makefile               | 1 +
 target/linux/zynq/generic/target.mk      | 1 +
 24 files changed, 24 insertions(+)
 create mode 100644 target/linux/ath25/generic/target.mk
 create mode 100644 target/linux/cns3xxx/generic/target.mk
 create mode 100644 target/linux/gemini/generic/target.mk
 create mode 100644 target/linux/imx6/generic/target.mk
 create mode 100644 target/linux/kirkwood/generic/target.mk
 create mode 100644 target/linux/octeon/generic/target.mk
 create mode 100644 target/linux/octeontx/generic/target.mk
 create mode 100644 target/linux/omap/generic/target.mk
 create mode 100644 target/linux/pistachio/generic/target.mk
 create mode 100644 target/linux/rb532/generic/target.mk
 create mode 100644 target/linux/tegra/generic/target.mk
 create mode 100644 target/linux/zynq/generic/target.mk

Comments

Paul Spooren Sept. 12, 2019, 7:18 a.m. UTC | #1
I posted this a while ago could somebody please apply this?

On 22.08.19 23:02, Paul Spooren wrote:
> As in 853e4dd OpenWrt should follow a unified structure, where every
> device has a target/subtarget combination, if there is only one
> subtarget, call it "Generic". This introduces predictable filenames.
>
> CC: Alexander Couzens <lynxis@fe80.eu>
> CC: Felix Fietkau <nbd@nbd.name>
> CC: Jason Wu <jason.wu.misc@gmail.com>
> CC: John Crispin <john@phrozen.org>
> CC: Luka Perkov <luka@openwrt.org>
> CC: Roman Yeryomin <roman@advem.lv>
> CC: Sergey Ryazanov <ryazanov.s.a@gmail.com>
> CC: Tim Harvey <tharvey@gateworks.com>
> CC: Tomasz Maciej Nowak <tomek_n@o2.pl>
>
> Signed-off-by: Paul Spooren <mail@aparcar.org>
> ---
>   target/linux/ath25/Makefile              | 1 +
>   target/linux/ath25/generic/target.mk     | 1 +
>   target/linux/cns3xxx/Makefile            | 1 +
>   target/linux/cns3xxx/generic/target.mk   | 1 +
>   target/linux/gemini/Makefile             | 1 +
>   target/linux/gemini/generic/target.mk    | 1 +
>   target/linux/imx6/Makefile               | 1 +
>   target/linux/imx6/generic/target.mk      | 1 +
>   target/linux/kirkwood/Makefile           | 1 +
>   target/linux/kirkwood/generic/target.mk  | 1 +
>   target/linux/octeon/Makefile             | 1 +
>   target/linux/octeon/generic/target.mk    | 1 +
>   target/linux/octeontx/Makefile           | 1 +
>   target/linux/octeontx/generic/target.mk  | 1 +
>   target/linux/omap/Makefile               | 1 +
>   target/linux/omap/generic/target.mk      | 1 +
>   target/linux/pistachio/Makefile          | 1 +
>   target/linux/pistachio/generic/target.mk | 1 +
>   target/linux/rb532/Makefile              | 1 +
>   target/linux/rb532/generic/target.mk     | 1 +
>   target/linux/tegra/Makefile              | 1 +
>   target/linux/tegra/generic/target.mk     | 1 +
>   target/linux/zynq/Makefile               | 1 +
>   target/linux/zynq/generic/target.mk      | 1 +
>   24 files changed, 24 insertions(+)
>   create mode 100644 target/linux/ath25/generic/target.mk
>   create mode 100644 target/linux/cns3xxx/generic/target.mk
>   create mode 100644 target/linux/gemini/generic/target.mk
>   create mode 100644 target/linux/imx6/generic/target.mk
>   create mode 100644 target/linux/kirkwood/generic/target.mk
>   create mode 100644 target/linux/octeon/generic/target.mk
>   create mode 100644 target/linux/octeontx/generic/target.mk
>   create mode 100644 target/linux/omap/generic/target.mk
>   create mode 100644 target/linux/pistachio/generic/target.mk
>   create mode 100644 target/linux/rb532/generic/target.mk
>   create mode 100644 target/linux/tegra/generic/target.mk
>   create mode 100644 target/linux/zynq/generic/target.mk
>
> diff --git a/target/linux/ath25/Makefile b/target/linux/ath25/Makefile
> index cb8b7ec1be..a253b4ceb3 100644
> --- a/target/linux/ath25/Makefile
> +++ b/target/linux/ath25/Makefile
> @@ -10,6 +10,7 @@ ARCH:=mips
>   BOARD:=ath25
>   BOARDNAME:=Atheros AR231x/AR5312
>   FEATURES:=squashfs low_mem small_flash
> +SUBTARGETS:=generic
>   MAINTAINER:=Sergey Ryazanov <ryazanov.s.a@gmail.com>
>   
>   KERNEL_PATCHVER:=4.14
> diff --git a/target/linux/ath25/generic/target.mk b/target/linux/ath25/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/ath25/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/cns3xxx/Makefile b/target/linux/cns3xxx/Makefile
> index f21ad06248..7930b959b6 100644
> --- a/target/linux/cns3xxx/Makefile
> +++ b/target/linux/cns3xxx/Makefile
> @@ -12,6 +12,7 @@ BOARDNAME:=Cavium Networks Econa CNS3xxx
>   FEATURES:=squashfs fpu gpio pcie usb usbgadget
>   CPU_TYPE:=mpcore
>   CPU_SUBTYPE:=vfp
> +SUBTARGETS:=generic
>   MAINTAINER:=Felix Fietkau <nbd@nbd.name>, \
>   	    Koen Vandeputte <koen.vandeputte@ncentric.com>
>   KERNEL_PATCHVER:=4.19
> diff --git a/target/linux/cns3xxx/generic/target.mk b/target/linux/cns3xxx/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/cns3xxx/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/gemini/Makefile b/target/linux/gemini/Makefile
> index 3afc643023..1f1486f0c5 100644
> --- a/target/linux/gemini/Makefile
> +++ b/target/linux/gemini/Makefile
> @@ -11,6 +11,7 @@ BOARD:=gemini
>   BOARDNAME:=Cortina Systems CS351x
>   FEATURES:=squashfs pci rtc usb dt gpio display ext4 rootfs-part boot-part
>   CPU_TYPE:=fa526
> +SUBTARGETS:=generic
>   MAINTAINER:=Roman Yeryomin <roman@advem.lv>
>   
>   KERNEL_PATCHVER:=4.19
> diff --git a/target/linux/gemini/generic/target.mk b/target/linux/gemini/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/gemini/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile
> index ac4300f7eb..570898cb9c 100644
> --- a/target/linux/imx6/Makefile
> +++ b/target/linux/imx6/Makefile
> @@ -12,6 +12,7 @@ BOARDNAME:=Freescale i.MX 6
>   FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part
>   CPU_TYPE:=cortex-a9
>   CPU_SUBTYPE:=neon
> +SUBTARGETS:=generic
>   MAINTAINER:=Luka Perkov <luka@openwrt.org>
>   
>   KERNEL_PATCHVER:=4.19
> diff --git a/target/linux/imx6/generic/target.mk b/target/linux/imx6/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/imx6/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile
> index adc7a496e1..e185eca093 100644
> --- a/target/linux/kirkwood/Makefile
> +++ b/target/linux/kirkwood/Makefile
> @@ -11,6 +11,7 @@ BOARD:=kirkwood
>   BOARDNAME:=Marvell Kirkwood
>   FEATURES:=usb nand squashfs ramdisk
>   CPU_TYPE:=xscale
> +SUBTARGETS:=generic
>   MAINTAINER:=Luka Perkov <luka@openwrt.org>
>   
>   KERNEL_PATCHVER:=4.14
> diff --git a/target/linux/kirkwood/generic/target.mk b/target/linux/kirkwood/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/kirkwood/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/octeon/Makefile b/target/linux/octeon/Makefile
> index aa73b0e5c0..e965cb83fd 100644
> --- a/target/linux/octeon/Makefile
> +++ b/target/linux/octeon/Makefile
> @@ -11,6 +11,7 @@ BOARD:=octeon
>   BOARDNAME:=Cavium Networks Octeon
>   FEATURES:=squashfs ramdisk pci usb
>   CPU_TYPE:=octeonplus
> +SUBTARGETS:=generic
>   MAINTAINER:=John Crispin <john@phrozen.org>
>   
>   KERNEL_PATCHVER:=4.19
> diff --git a/target/linux/octeon/generic/target.mk b/target/linux/octeon/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/octeon/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile
> index e7f6b2d3c4..dee0f9ec54 100644
> --- a/target/linux/octeontx/Makefile
> +++ b/target/linux/octeontx/Makefile
> @@ -10,6 +10,7 @@ ARCH:=aarch64
>   BOARD:=octeontx
>   BOARDNAME:=Octeon-TX
>   FEATURES:=targz pcie gpio rtc usb fpu
> +SUBTARGETS:=generic
>   
>   MAINTAINER:=Tim Harvey <tharvey@gateworks.com>
>   
> diff --git a/target/linux/octeontx/generic/target.mk b/target/linux/octeontx/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/octeontx/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile
> index 3e5c921d61..fadc312892 100644
> --- a/target/linux/omap/Makefile
> +++ b/target/linux/omap/Makefile
> @@ -13,6 +13,7 @@ BOARDNAME:=TI OMAP3/4/AM33xx
>   FEATURES:=usb usbgadget ext4 targz fpu audio display nand squashfs
>   CPU_TYPE:=cortex-a8
>   CPU_SUBTYPE:=vfpv3
> +SUBTARGETS:=generic
>   
>   KERNEL_PATCHVER:=4.14
>   
> diff --git a/target/linux/omap/generic/target.mk b/target/linux/omap/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/omap/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/pistachio/Makefile b/target/linux/pistachio/Makefile
> index dab7f0d62b..0920036982 100644
> --- a/target/linux/pistachio/Makefile
> +++ b/target/linux/pistachio/Makefile
> @@ -12,6 +12,7 @@ BOARDNAME:=MIPS pistachio
>   FEATURES:=fpu usb usbgadget squashfs targz nand
>   CPU_TYPE:=24kc
>   CPU_SUBTYPE:=24kf
> +SUBTARGETS:=generic
>   MAINTAINER:=
>   
>   KERNEL_PATCHVER:=4.14
> diff --git a/target/linux/pistachio/generic/target.mk b/target/linux/pistachio/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/pistachio/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/rb532/Makefile b/target/linux/rb532/Makefile
> index 5aa8a6dc55..2b65b9bcd3 100644
> --- a/target/linux/rb532/Makefile
> +++ b/target/linux/rb532/Makefile
> @@ -10,6 +10,7 @@ ARCH:=mipsel
>   BOARD:=rb532
>   BOARDNAME:=Mikrotik RouterBoard 532
>   FEATURES:=pci targz squashfs minor nand
> +SUBTARGETS:=generic
>   MAINTAINER:=Roman Yeryomin <roman@advem.lv>
>   
>   KERNEL_PATCHVER:=4.14
> diff --git a/target/linux/rb532/generic/target.mk b/target/linux/rb532/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/rb532/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/tegra/Makefile b/target/linux/tegra/Makefile
> index db58bf53d1..a5b533af25 100644
> --- a/target/linux/tegra/Makefile
> +++ b/target/linux/tegra/Makefile
> @@ -12,6 +12,7 @@ BOARDNAME := NVIDIA Tegra
>   FEATURES := audio boot-part display ext4 fpu gpio pci pcie rootfs-part rtc squashfs usb
>   CPU_TYPE := cortex-a9
>   CPU_SUBTYPE := vfpv3
> +SUBTARGETS:=generic
>   MAINTAINER := Tomasz Maciej Nowak <tomek_n@o2.pl>
>   
>   KERNEL_PATCHVER := 4.19
> diff --git a/target/linux/tegra/generic/target.mk b/target/linux/tegra/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/tegra/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
> diff --git a/target/linux/zynq/Makefile b/target/linux/zynq/Makefile
> index bcd36ffe2c..3566464450 100644
> --- a/target/linux/zynq/Makefile
> +++ b/target/linux/zynq/Makefile
> @@ -12,6 +12,7 @@ BOARDNAME:=Xilinx Zynq 7000 SoCs
>   FEATURES:=fpu gpio rtc usb usbgadget boot-part rootfs-part squashfs
>   CPU_TYPE:=cortex-a9
>   CPU_SUBTYPE:=neon
> +SUBTARGETS:=generic
>   MAINTAINER:=Jason Wu <jason.wu.misc@gmail.com>
>   
>   # future support SUBTARGETS: for both zynq and zynqmp
> diff --git a/target/linux/zynq/generic/target.mk b/target/linux/zynq/generic/target.mk
> new file mode 100644
> index 0000000000..f5cb1fb19b
> --- /dev/null
> +++ b/target/linux/zynq/generic/target.mk
> @@ -0,0 +1 @@
> +BOARDNAME:=Generic
Jonas Gorski Sept. 14, 2019, 9:54 a.m. UTC | #2
On Fri, 23 Aug 2019 at 11:04, Paul Spooren <mail@aparcar.org> wrote:
> As in 853e4dd OpenWrt should follow a unified structure, where every
> device has a target/subtarget combination, if there is only one
> subtarget, call it "Generic". This introduces predictable filenames.

If it's about (I assume generated) filenames, wouldn't it be easier to
just use "Generic" for the subtarget part of the filename if there are
no subtargets? I'm not really a fan of unnecessary code fluff without
any real function, especially if it means additional, mainly empty
files.

Regards
Jonas
Adrian Schmutzler Sept. 15, 2019, 10:40 a.m. UTC | #3
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Jonas Gorski
> Sent: Samstag, 14. September 2019 11:54
> To: Paul Spooren <mail@aparcar.org>
> Cc: Sergey Ryazanov <ryazanov.s.a@gmail.com>; Tomasz Maciej Nowak
> <tomek_n@o2.pl>; Roman Yeryomin <roman@advem.lv>; Tim Harvey
> <tharvey@gateworks.com>; Luka Perkov <luka@openwrt.org>; Jason Wu
> <jason.wu.misc@gmail.com>; Alexander Couzens <lynxis@fe80.eu>; John
> Crispin <john@phrozen.org>; OpenWrt Development List <openwrt-
> devel@lists.openwrt.org>; Felix Fietkau <nbd@nbd.name>
> Subject: Re: [OpenWrt-Devel] [PATCH] treewide: add Generic subtarget if
> missing
> 
> On Fri, 23 Aug 2019 at 11:04, Paul Spooren <mail@aparcar.org> wrote:
> > As in 853e4dd OpenWrt should follow a unified structure, where every
> > device has a target/subtarget combination, if there is only one
> > subtarget, call it "Generic". This introduces predictable filenames.
> 
> If it's about (I assume generated) filenames, wouldn't it be easier to just use
> "Generic" for the subtarget part of the filename if there are no subtargets?
> I'm not really a fan of unnecessary code fluff without any real function,
> especially if it means additional, mainly empty files.

What you suggest is about what we have right now. This kind of creates a misleading situation where for some targets subtargets are present, while for others paths and image names are "fixed" in several places to include a "generic". The reason for Paul's patch was to get rid of the fixes at individual places (which was/is applied somewhat inconsistently) by just making all targets apply to the same logic (i.e. that there is at least one subtarget).
So, the empty files are introduced to make the process of building and creating images afterwards simpler (to follow/understand).

I was suffering from the same problem when I dealt with OpenWrt-derived firmware, where I suddenly encountered a target without subtargets and had to implement extra code to work around that.

However, I also wondered whether one couldn't code around the necessity of the empty file, and just add the SUBTARGET/SUBTARGETS variables here...

Best

Adrian

> 
> Regards
> Jonas
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Paul Spooren Sept. 15, 2019, 10:49 a.m. UTC | #4
> What you suggest is about what we have right now. This kind of creates a misleading situation where for some targets subtargets are present, while for others paths and image names are "fixed" in several places to include a "generic". The reason for Paul's patch was to get rid of the fixes at individual places (which was/is applied somewhat inconsistently) by just making all targets apply to the same logic (i.e. that there is at least one subtarget).
> So, the empty files are introduced to make the process of building and creating images afterwards simpler (to follow/understand).
>
> I was suffering from the same problem when I dealt with OpenWrt-derived firmware, where I suddenly encountered a target without subtargets and had to implement extra code to work around that.
>
> However, I also wondered whether one couldn't code around the necessity of the empty file, and just add the SUBTARGET/SUBTARGETS variables here...

Thanks for commenting, that's very much my point!

Maybe the easiest solution is to add `SUBTARGET ?= generic` to 
include/image.mk instead of introducing empty files. Will try that tomorrow.

Best,
Paul
Jonas Gorski Sept. 17, 2019, 10:25 a.m. UTC | #5
On Sun, 15 Sep 2019 at 12:49, Paul Spooren <mail@aparcar.org> wrote:
> > What you suggest is about what we have right now. This kind of creates a misleading situation where for some targets subtargets are present, while for others paths and image names are "fixed" in several places to include a "generic". The reason for Paul's patch was to get rid of the fixes at individual places (which was/is applied somewhat inconsistently) by just making all targets apply to the same logic (i.e. that there is at least one subtarget).
> > So, the empty files are introduced to make the process of building and creating images afterwards simpler (to follow/understand).
> >
> > I was suffering from the same problem when I dealt with OpenWrt-derived firmware, where I suddenly encountered a target without subtargets and had to implement extra code to work around that.
> >
> > However, I also wondered whether one couldn't code around the necessity of the empty file, and just add the SUBTARGET/SUBTARGETS variables here...
>
> Thanks for commenting, that's very much my point!
>
> Maybe the easiest solution is to add `SUBTARGET ?= generic` to
> include/image.mk instead of introducing empty files. Will try that tomorrow.

Thanks, this is what I meant, providing some sensible default value(s).

I have to admit, even after reading your changelog and Adrian's email
twice, I still don't quite grasp what issue this change is trying to
fix. An example might be nice in the changelog.


Regards
Jonas
Paul Spooren Sept. 20, 2019, 9:51 a.m. UTC | #6
On 17.09.19 00:25, Jonas Gorski wrote:
> On Sun, 15 Sep 2019 at 12:49, Paul Spooren <mail@aparcar.org> wrote:
>>> What you suggest is about what we have right now. This kind of creates a misleading situation where for some targets subtargets are present, while for others paths and image names are "fixed" in several places to include a "generic". The reason for Paul's patch was to get rid of the fixes at individual places (which was/is applied somewhat inconsistently) by just making all targets apply to the same logic (i.e. that there is at least one subtarget).
>>> So, the empty files are introduced to make the process of building and creating images afterwards simpler (to follow/understand).
>>>
>>> I was suffering from the same problem when I dealt with OpenWrt-derived firmware, where I suddenly encountered a target without subtargets and had to implement extra code to work around that.
>>>
>>> However, I also wondered whether one couldn't code around the necessity of the empty file, and just add the SUBTARGET/SUBTARGETS variables here...
>> Thanks for commenting, that's very much my point!
>>
>> Maybe the easiest solution is to add `SUBTARGET ?= generic` to
>> include/image.mk instead of introducing empty files. Will try that tomorrow.
> Thanks, this is what I meant, providing some sensible default value(s).
>
> I have to admit, even after reading your changelog and Adrian's email
> twice, I still don't quite grasp what issue this change is trying to
> fix. An example might be nice in the changelog.

The idea is to have always the same naming pattern for images:

<distro>-<release>-<target>-<subtarget>-<profile>

This allows you to be certain to find an image (or related files) at the 
excepted place, instead of guessing if the generic "subtarget" actually 
appears in the filename or not.

To illustrate: I'm trying to create an index with all created images. 
The index maps images and device titels to make it easier finding the 
right firmware. The more variation in the openwrt buildroot, the more I 
have to work around it.

I created an updated PR here[0] which also adds the new subtargets to uboot.

Regards
Paul

[0]: https://github.com/openwrt/openwrt/pull/2431
diff mbox series

Patch

diff --git a/target/linux/ath25/Makefile b/target/linux/ath25/Makefile
index cb8b7ec1be..a253b4ceb3 100644
--- a/target/linux/ath25/Makefile
+++ b/target/linux/ath25/Makefile
@@ -10,6 +10,7 @@  ARCH:=mips
 BOARD:=ath25
 BOARDNAME:=Atheros AR231x/AR5312
 FEATURES:=squashfs low_mem small_flash
+SUBTARGETS:=generic
 MAINTAINER:=Sergey Ryazanov <ryazanov.s.a@gmail.com>
 
 KERNEL_PATCHVER:=4.14
diff --git a/target/linux/ath25/generic/target.mk b/target/linux/ath25/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/ath25/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/cns3xxx/Makefile b/target/linux/cns3xxx/Makefile
index f21ad06248..7930b959b6 100644
--- a/target/linux/cns3xxx/Makefile
+++ b/target/linux/cns3xxx/Makefile
@@ -12,6 +12,7 @@  BOARDNAME:=Cavium Networks Econa CNS3xxx
 FEATURES:=squashfs fpu gpio pcie usb usbgadget
 CPU_TYPE:=mpcore
 CPU_SUBTYPE:=vfp
+SUBTARGETS:=generic
 MAINTAINER:=Felix Fietkau <nbd@nbd.name>, \
 	    Koen Vandeputte <koen.vandeputte@ncentric.com>
 KERNEL_PATCHVER:=4.19
diff --git a/target/linux/cns3xxx/generic/target.mk b/target/linux/cns3xxx/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/cns3xxx/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/gemini/Makefile b/target/linux/gemini/Makefile
index 3afc643023..1f1486f0c5 100644
--- a/target/linux/gemini/Makefile
+++ b/target/linux/gemini/Makefile
@@ -11,6 +11,7 @@  BOARD:=gemini
 BOARDNAME:=Cortina Systems CS351x
 FEATURES:=squashfs pci rtc usb dt gpio display ext4 rootfs-part boot-part
 CPU_TYPE:=fa526
+SUBTARGETS:=generic
 MAINTAINER:=Roman Yeryomin <roman@advem.lv>
 
 KERNEL_PATCHVER:=4.19
diff --git a/target/linux/gemini/generic/target.mk b/target/linux/gemini/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/gemini/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile
index ac4300f7eb..570898cb9c 100644
--- a/target/linux/imx6/Makefile
+++ b/target/linux/imx6/Makefile
@@ -12,6 +12,7 @@  BOARDNAME:=Freescale i.MX 6
 FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part
 CPU_TYPE:=cortex-a9
 CPU_SUBTYPE:=neon
+SUBTARGETS:=generic
 MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 KERNEL_PATCHVER:=4.19
diff --git a/target/linux/imx6/generic/target.mk b/target/linux/imx6/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/imx6/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile
index adc7a496e1..e185eca093 100644
--- a/target/linux/kirkwood/Makefile
+++ b/target/linux/kirkwood/Makefile
@@ -11,6 +11,7 @@  BOARD:=kirkwood
 BOARDNAME:=Marvell Kirkwood
 FEATURES:=usb nand squashfs ramdisk
 CPU_TYPE:=xscale
+SUBTARGETS:=generic
 MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 KERNEL_PATCHVER:=4.14
diff --git a/target/linux/kirkwood/generic/target.mk b/target/linux/kirkwood/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/kirkwood/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/octeon/Makefile b/target/linux/octeon/Makefile
index aa73b0e5c0..e965cb83fd 100644
--- a/target/linux/octeon/Makefile
+++ b/target/linux/octeon/Makefile
@@ -11,6 +11,7 @@  BOARD:=octeon
 BOARDNAME:=Cavium Networks Octeon
 FEATURES:=squashfs ramdisk pci usb
 CPU_TYPE:=octeonplus
+SUBTARGETS:=generic
 MAINTAINER:=John Crispin <john@phrozen.org>
 
 KERNEL_PATCHVER:=4.19
diff --git a/target/linux/octeon/generic/target.mk b/target/linux/octeon/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/octeon/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile
index e7f6b2d3c4..dee0f9ec54 100644
--- a/target/linux/octeontx/Makefile
+++ b/target/linux/octeontx/Makefile
@@ -10,6 +10,7 @@  ARCH:=aarch64
 BOARD:=octeontx
 BOARDNAME:=Octeon-TX
 FEATURES:=targz pcie gpio rtc usb fpu
+SUBTARGETS:=generic
 
 MAINTAINER:=Tim Harvey <tharvey@gateworks.com>
 
diff --git a/target/linux/octeontx/generic/target.mk b/target/linux/octeontx/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/octeontx/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile
index 3e5c921d61..fadc312892 100644
--- a/target/linux/omap/Makefile
+++ b/target/linux/omap/Makefile
@@ -13,6 +13,7 @@  BOARDNAME:=TI OMAP3/4/AM33xx
 FEATURES:=usb usbgadget ext4 targz fpu audio display nand squashfs
 CPU_TYPE:=cortex-a8
 CPU_SUBTYPE:=vfpv3
+SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=4.14
 
diff --git a/target/linux/omap/generic/target.mk b/target/linux/omap/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/omap/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/pistachio/Makefile b/target/linux/pistachio/Makefile
index dab7f0d62b..0920036982 100644
--- a/target/linux/pistachio/Makefile
+++ b/target/linux/pistachio/Makefile
@@ -12,6 +12,7 @@  BOARDNAME:=MIPS pistachio
 FEATURES:=fpu usb usbgadget squashfs targz nand
 CPU_TYPE:=24kc
 CPU_SUBTYPE:=24kf
+SUBTARGETS:=generic
 MAINTAINER:=
 
 KERNEL_PATCHVER:=4.14
diff --git a/target/linux/pistachio/generic/target.mk b/target/linux/pistachio/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/pistachio/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/rb532/Makefile b/target/linux/rb532/Makefile
index 5aa8a6dc55..2b65b9bcd3 100644
--- a/target/linux/rb532/Makefile
+++ b/target/linux/rb532/Makefile
@@ -10,6 +10,7 @@  ARCH:=mipsel
 BOARD:=rb532
 BOARDNAME:=Mikrotik RouterBoard 532
 FEATURES:=pci targz squashfs minor nand
+SUBTARGETS:=generic
 MAINTAINER:=Roman Yeryomin <roman@advem.lv>
 
 KERNEL_PATCHVER:=4.14
diff --git a/target/linux/rb532/generic/target.mk b/target/linux/rb532/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/rb532/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/tegra/Makefile b/target/linux/tegra/Makefile
index db58bf53d1..a5b533af25 100644
--- a/target/linux/tegra/Makefile
+++ b/target/linux/tegra/Makefile
@@ -12,6 +12,7 @@  BOARDNAME := NVIDIA Tegra
 FEATURES := audio boot-part display ext4 fpu gpio pci pcie rootfs-part rtc squashfs usb
 CPU_TYPE := cortex-a9
 CPU_SUBTYPE := vfpv3
+SUBTARGETS:=generic
 MAINTAINER := Tomasz Maciej Nowak <tomek_n@o2.pl>
 
 KERNEL_PATCHVER := 4.19
diff --git a/target/linux/tegra/generic/target.mk b/target/linux/tegra/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/tegra/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic
diff --git a/target/linux/zynq/Makefile b/target/linux/zynq/Makefile
index bcd36ffe2c..3566464450 100644
--- a/target/linux/zynq/Makefile
+++ b/target/linux/zynq/Makefile
@@ -12,6 +12,7 @@  BOARDNAME:=Xilinx Zynq 7000 SoCs
 FEATURES:=fpu gpio rtc usb usbgadget boot-part rootfs-part squashfs
 CPU_TYPE:=cortex-a9
 CPU_SUBTYPE:=neon
+SUBTARGETS:=generic
 MAINTAINER:=Jason Wu <jason.wu.misc@gmail.com>
 
 # future support SUBTARGETS: for both zynq and zynqmp
diff --git a/target/linux/zynq/generic/target.mk b/target/linux/zynq/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/zynq/generic/target.mk
@@ -0,0 +1 @@ 
+BOARDNAME:=Generic