[PATCH v1 27/30] configure: Add conditional platform builds
Brett Grandbois
brett.grandbois at opengear.com
Tue Jul 31 08:58:35 AEST 2018
On 31/07/18 05:36, Geoff Levand wrote:
> Hi Brett,
>
> On 07/29/2018 08:30 PM, Brett Grandbois wrote:
>> I like the direction this is going. One suggestion I might make is that as platforms are effectively independent modules anyway with their own registration interface, maybe also have an explicit 'use these platform files' configure option? Then it would be easy for developers to add in their custom platforms at build time without having to modify configure/makefiles.
>>
>> So on the command line something like:
>>
>> configure --enable-explicit-platforms=foo,/some/abs/path/bar.c --enable-explicit-platform-libs=baz
>>
>> eventually turns into something like this:
>>
>> discover_platform_ro_SOURCES += discover/platform-foo.c /some/abs/path/bar.c
>>
>> discover_platform_ro_LDFLAGS += -lbaz
>>
>> After a bit more configure/Makefile magic that I know I'm glossing over, but this is just to illustrate the idea for comment.
>>
>> The libs is of course if your platform module requires something outside the main lib list, depending on how far to take this.
> What you suggest does not lend itself to autoconf/automake.
I would disagree with that. Autotools just sits on top of bash (or some
shell) at the end of the day so doing text processing wouldn't be an
issue. In this particular case look at the signed-boot configure input
processing, which takes input strings and makes decisions based on
them. Once you get a string you can easily separate it via whatever
delimiters you specify and then they can be exported into whatever make
variables you need. Now whether you want to do that or not is a
different discussion, which is below.
> I don't think there would be enough use of it to warrant
> creating a custom config system. See:
Now that is more of the crux of the discussion. What is the intended
use case here? Is there not enough demand for this sort of thing
because there currently isn't a simple mechanism to achieve it? Is it a
case of 'if you build it, they will come'? Or are you correct and
there's a limited audience for this? I don't know the answers to those
questions, I can just make observations based on how I'm using it or
intending to use it. My vision of the platforms is sort of the
petitboot equivalent of external kernel modules. They give an adopter a
means to customize the configuration to fit their particular application
so a simpler way to achieve that would mean to me then simpler means for
developers to adopt petitboot to fit their platform.
So if the decision is not to go this sort of route, I'm OK with that,
I'm just making some feature suggestions. In either case it wouldn't
need to be part of this patch series anyway as it goes above and beyond
the intent here.
>
> https://www.gnu.org/software/autoconf/manual/autoconf.html#Site-Configuration
>
> -Geoff
More information about the Petitboot
mailing list