[yocto] RFC: Post build configuration

Venkata ramana gollamudi ramana.gollamudi at huawei.com
Fri Mar 29 05:17:12 PDT 2013


This is in reference to my previous post regarding post build configuration, with few points re-iterating to set the ground.
 https://lists.yoctoproject.org/pipermail/yocto/2012-November/012867.html



"Post build" configuration and need for configuration platform/model:



    There have been several discussions regarding need for image format, file system and disk configuration, network, users addition etc. Most are of these features are configurable in other distributions like opensuse, fedora during the image installation on the target. Considering the Embedded Linux distribution scenario, these features can be configured offline and the generated image can be directly deployed on the target.



Example configuration options that can be supported include
    Configure the users/passwords
    Configure the network
    Configure the host name
    Select the services to be started by default
    Security related configuration
    Configure image formats ramfs/ext3/... paritions,disk management etc
    Serial port configuration
    etc..

Also a userscenario include
    Offline Binary Configuration, which allows a binary image customization before making a final target image. This case will be more evident in larger companies, where platform teams, product teams, application teams are distributed and Linux build from source will be owned and lab tested by a single team, like platform team. Other teams just configure to use it for product variants from same platform build.



As configuration needs and options vary based on packages/features selected during for the distribution, so there is a need for a configuration platform/model

1) which allows new configuration options can be added easily and each package/distribution knows how it can be configured, so that selection of package or feature will expose those configuration options to the user.

2) Tools like HOB and Webhob also need a clean configuration interface to configure the image.
3) This can be extended to support Generic configuration UI like kernel menuconfig.





Considering the above Post build configuration in mind, I like to put forward a model (high level flow) detailing

1. How the configuration functions/logic are maintained in poky?

2. How is configuration functions shipped along with image?

3. How configuration functions are used by configuration tool(s) to apply them over binary image, based on user configuration inputs?



1. How the configuration functions/logic are maintained in poky?

-----------------------------------------------------------------------------------



    Various configuration functions supporting the distribution configuration needs are maintained in current poky layers.
    a) Configuration functions include Image level and package level configuration functions. Where package level configuration functions kept along with package recipe(say pkgname_version.cfg).
    b) Package level configuration functions can override the image level configuration functions.
        Example: Useradd logic need to be different, if busybox is selected or if pwdutils package is selected.
    c) Each layer can override configuration functions, just like bb files.
    d) Menu Definition Information contains the metadata about configuration functions and their parameters allowing it to represent it in Generic UI, is also kept along with configuration functions. Menu definition Information can be represented in Menu Definition Language (MDL, say xml based).



2. How is configuration functions shipped along with image?

-----------------------------------------------------------------------------

   Configuration Library (ConfigLib) is created from configuration functions and MDL (from step1) during the package build time. ConfigLib is based on build time packages and features selected. This configuration Library is added to package feed.



3. How configuration functions are used by configuration tool(s) to apply them over binary image, based on user input/need?

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

   New tool can be created or existing tool(s) can be extended to support Post build package selection, image generation and configuration. Its functionality includes

    a) Selection of packages from package feed.
    b) Install the selected packages to relocatable rootfs.
    c) Copy configuration functions corresponding to selected packages from ConfigLib to SelectedConfigLib.
    d) User can configure the image by
        - Manually modifying offline configuration file (oct.conf)
        - Using a generic configuration UI which generates offline configuration file (oct.conf)
    e) Tool reads the offline configuration file(oct.conf) and maps the user configuration inputs to configuration functions in SelectedConfigLib.
       It applies the configuration options on the extracted rootfs by executing respective configuration functions.

We are in the process of initial design and prototyping this model, soon it will be shared. Looking forward this feature as part of yocto1.5.



Note: This RFC specifically discuss about "post build binary configuration", but not pre-build or build level configurations.


Regards,

Ramana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130329/9ace0cc7/attachment.html>


More information about the yocto mailing list