cpb- / yocto-cooker

Meta buildtool for Yocto Project based Linux embedded systems
GNU General Public License v2.0
43 stars 22 forks source link

Support for custom distro #151

Closed PierreLoupG closed 5 months ago

PierreLoupG commented 5 months ago

I have the same problem as Romain had in the issue 97 , using a custom distro.

I read the discussion and the commit ea103b6 that closed the issue. Importing a distro class from a python file next to the menu file, as you suggested, is the solution but not completely implemented. This PR implements this part.

But I'm not quite fan of creating a python file with a distro class while all other configurations are in the menu file. The override distro fields are more suited, but limited to base_directory, build_script and template_conf. Why not define all distro fields in base_distribution , with default values from the PokyDistro class ?

Something like:

"base-distribution": [
    "distro-name": "foo",
    "layer-conf-name": "LCONF_VERSION",
    "layer-conf-version": "6",
]

Will override the PokyDistro class value to create a custom distro class. Thus, for a complete custom distro all fields must be filled in as in the python file.

I leave this PR as a draft.