build: optionally disable target name in filenames
authorPaul Spooren <[email protected]>
Sun, 23 Aug 2020 08:23:00 +0000 (22:23 -1000)
committerPaul Spooren <[email protected]>
Mon, 29 Mar 2021 23:49:11 +0000 (13:49 -1000)
commit38e37963cc6cf8df22bf2d56cbc2759608535272
tree76e8e23e8075c13656c62021149e3b505f3f6a10
parent120d89f24b0265b27ed93cefa6d21bd84b120127
build: optionally disable target name in filenames

The target/subtarget is included in all image filenames by default. This
is useful if the same profile exists in multiple targets or
developers/users want an obvious related of images to targets.

However this information can also be confusing at it adds a lengthy
string to sysupgrade images containing an information which is likely
unknown to regular users: The target/subtarget.

This commit therefore adds the new image option called
CONFIG_TARGET_FILENAMES to make the target/subtarget filename part
optional. It is ENABLED by default. To archive this the target/subtarget
is added if CONFIG_VERSIONOPT is disabled  and CONFIG_TARGET_FILENAMES
default to `y`. This keeps the current behaviour for OpenWrt &
downstream projects while making the target/subtarget inclusion still
optional.

Newly produced files would with enabled CONFIG_VERSIONOPT and disabled
CONFIG_TARGET_FILENAMES look like the following:

* openwrt-linksys_wrt3200acm-initramfs-kernel.bin
* openwrt-linksys_wrt3200acm.manifest
* openwrt-linksys_wrt3200acm-squashfs-factory.img
* openwrt-linksys_wrt3200acm-squashfs-sysupgrade.bin

ImageBuilder and SDK archive file names are generated individually and
not influenced by the option.

Signed-off-by: Paul Spooren <[email protected]>
include/image.mk
package/base-files/image-config.in