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

Paul Spooren mail at aparcar.org
Fri Sep 20 05:51:11 EDT 2019


On 17.09.19 00:25, Jonas Gorski wrote:
> On Sun, 15 Sep 2019 at 12:49, Paul Spooren <mail at 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


_______________________________________________
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