mbox

[RFC,0/2] Add bbclass to generate build configuration from snippets

Message ID 20210809102645.17414-1-Quirin.Gylstorff@siemens.com
State RFC
Headers show

Message

Quirin Gylstorff Aug. 9, 2021, 2:26 a.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This patchset adds the `build-config-snippets.bbclass`. This class can be used
to generate package dependencies according to the used build configuration.

It is in use as 'kconfig-snippets.bbclass' in [1] for the swupdate configuration.


[1]: https://gitlab.com/cip-project/cip-core/isar-cip-core/

Quirin Gylstorff (2):
  Add build-config-snippet class
  Add example for build-config-snippets

 doc/technical_overview.md                     | 33 +++++++
 meta-isar/conf/local.conf.sample              |  2 +-
 .../example-build-config_0.1.bb               | 32 +++++++
 .../example-build-config/files/build.snippet  |  1 +
 .../example-build-config/files/build_config   |  1 +
 meta/classes/build-config-snippets.bbclass    | 87 +++++++++++++++++++
 6 files changed, 155 insertions(+), 1 deletion(-)
 create mode 100644 meta-isar/recipes-app/example-build-config/example-build-config_0.1.bb
 create mode 100644 meta-isar/recipes-app/example-build-config/files/build.snippet
 create mode 100644 meta-isar/recipes-app/example-build-config/files/build_config
 create mode 100644 meta/classes/build-config-snippets.bbclass

Comments

Jan Kiszka Aug. 9, 2021, 12:58 p.m. UTC | #1
On 09.08.21 12:26, Q. Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> This patchset adds the `build-config-snippets.bbclass`. This class can be used
> to generate package dependencies according to the used build configuration.
> 
> It is in use as 'kconfig-snippets.bbclass' in [1] for the swupdate configuration.
> 

Yeah, but working around the anti-distro properties of that packages. A
proper SWUpdate would build against all features and be configurable
during runtime.

Given that this is an anti pattern, I'm still not sure about what to do
with it. We are carrying it for SWUpdate for quite a while but that's
still the only user. Do we really see others? Or should we better invest
in fixing SWUpdate so that we can use its original Debian package, one day?

Jan
Quirin Gylstorff Aug. 9, 2021, 1:46 p.m. UTC | #2
On 8/9/21 2:58 PM, Jan Kiszka wrote:
> On 09.08.21 12:26, Q. Gylstorff wrote:
>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>
>> This patchset adds the `build-config-snippets.bbclass`. This class can be used
>> to generate package dependencies according to the used build configuration.
>>
>> It is in use as 'kconfig-snippets.bbclass' in [1] for the swupdate configuration.
>>
> 
> Yeah, but working around the anti-distro properties of that packages. A
> proper SWUpdate would build against all features and be configurable
> during runtime.
> 

We have the bootloader feature which is exclusive selected. So u-boot or 
grub or efibootguard.

> Given that this is an anti pattern, I'm still not sure about what to do
> with it. We are carrying it for SWUpdate for quite a while but that's
> still the only user. Do we really see others? Or should we better invest
> in fixing SWUpdate so that we can use its original Debian package, one day?
> 

I don't see others at the moment. The alternative would be make one 
config for everything and only add the bootloader as configuration snippet.


> Jan
>

Quirin
Quirin Gylstorff Aug. 9, 2021, 2:05 p.m. UTC | #3
On 8/9/21 3:46 PM, Gylstorff Quirin wrote:
> 
> 
> On 8/9/21 2:58 PM, Jan Kiszka wrote:
>> On 09.08.21 12:26, Q. Gylstorff wrote:
>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>
>>> This patchset adds the `build-config-snippets.bbclass`. This class 
>>> can be used
>>> to generate package dependencies according to the used build 
>>> configuration.
>>>
>>> It is in use as 'kconfig-snippets.bbclass' in [1] for the swupdate 
>>> configuration.
>>>
>>
>> Yeah, but working around the anti-distro properties of that packages. A
>> proper SWUpdate would build against all features and be configurable
>> during runtime.
>>
> 
> We have the bootloader feature which is exclusive selected. So u-boot or 
> grub or efibootguard.
> 

I forgot the embedded lua code.

>> Given that this is an anti pattern, I'm still not sure about what to do
>> with it. We are carrying it for SWUpdate for quite a while but that's
>> still the only user. Do we really see others? Or should we better invest
>> in fixing SWUpdate so that we can use its original Debian package, one 
>> day?
>>
> 
> I don't see others at the moment. The alternative would be make one 
> config for everything and only add the bootloader as configuration snippet.
> 
> 
>> Jan
>>
> 
> Quirin
>
Quirin