On 01.07.22 10:48, Kari Argillander wrote:
> Hello.
>
> I'm thinking what should be right way to generate config without human
> interaction.
> We use KAS menu for selecting different projects / targets / machines.
> This is all handy
> when human does it, but I'm struggling to figure out how CI system
> should do this.
> When I do this in kernel I use kernel scripts/config tool to enable some
> parameters what
> I'm interested and then generate default config based on those.
>
> With Kas I do not know how to auto generate these. Right now I manually
> generate
> each config with Kas menu and save generated config to directory and CI
> use these.
> Does any of you guys have any better idea how to do this.
kas menu was designed as kind of a replacement for "kas build
kas.yaml:opt1.yaml:opt2:yaml:...". So, if you want to run specific
selections of the menu resulting in a .config.yaml in CI, you just need
to translate the inclusion in that .config.yaml back to a kas build
command line.
Example:
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/.gitlab-ci.yml
Granted, that will not work that easily for free-text values entered in
the menu. Those would require a special yaml file to inject them - or
pick them up from CI-defined environment variable.
>
> Also can KAS select multiple targets same time with menu? I think some
> version KAS
> did support list for targets, but I'm not really sure. Yocto does
> support multiple targets,
> but I have not manage to do this with KAS. I use version 3.0.2.
Yes, you can, see e.g.
https://github.com/siemens/jailhouse-images/blob/master/Kconfig
https://github.com/siemens/jailhouse-images/blob/master/.gitlab-ci.yml
Also this works:
kas build kas.yaml --target mc:multiconf1 --target mc:multiconf2 ...
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux