Bug 5043 - Extend the layer creation documentation with own bblayers sample creation
Summary: Extend the layer creation documentation with own bblayers sample creation
Status: RESOLVED OBSOLETE
Alias: None
Product: General Docs
Classification: Documentation
Component: docs-general (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Low enhancement
Target Milestone: Future
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-08-23 13:09 UTC by Laszlo Papp
Modified: 2017-06-15 16:13 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Papp 2013-08-23 13:09:25 UTC
The current documentation does not contain much information about how to add bblayers.conf samples to the own bsp/distribution layer so that when the developers of the project source the open embedded init script, those files get automatically generated with the right content without the developers, CI, and so forth doing it manually all the time when there is a fresh build.

Looking at the ./scripts/oe-setup-builddir script, there is this line which seems to be responsible for it: TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}

This variable is undocumented. Furthermore, I have been told on IRC there is also a OECORELAYERCONF.

This is confusing now, and it would be nice to clarify with the documentation how to create your own layer including the sample for this.

What is happening currently is that my sample is not taken into account, but the $buildfolder/conf/bblayers.conf is generated based upon the meta-yocto layer as it is the default apparently for the TEMPLATECONF.

When it is created like that as a fallback, I am getting the following error message which should not happen if I could override all this easily with a proper purposeful documentation:

Pseudo is not present but is required, building this first before the main build
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Please set a valid MACHINE in your local.conf or environment
Your version of bblayers.conf was generated from an older/newer version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.
Matching the version numbers will remove this message.
"meld conf/bblayers.conf /home/lpapp/Projects/Yocto/poky-dylan-9.0.1/meta*/conf/bblayers.conf.sample" is a good way to visualise the changes.
DISTRO 'foo' not found. Please set a valid DISTRO in your local.conf

ERROR: Execution of event handler 'check_sanity_eventhandler' failed
Comment 1 Laszlo Papp 2013-08-23 14:33:30 UTC
I think the problem is that with those two variables that they are necessary for the open embedded init script, meanwhile the rest of the configuration would probably be in the local.conf.

Hence, it might make more sense to have an option for this in there. If such an option already exists, I am just unaware of it, and it would be nice to get documented.
Comment 2 Laszlo Papp 2013-08-23 14:41:01 UTC
Of course, that would not be enough itself as in, bitbake would need to check for that particular variable if it needs to rerun and update the generated file accordingly based on the desired sample.

local.conf is a usual way out there to check the same file into the repository so things just work out of the box for the developers, and also for the CI.

That is the reason why I am leaning towards a local.conf entry. This would not of course have too much impact on people who would not like to use this feature as they would just skip the setting of such a variable.

Sure, there would be a minor overhead for its check, but most likely not much noticeable. Of course, it would also possible for everyone to build a small script on top of the open embedded init script, but then it is getting farther from the vanilla operation somewhat, so I would not mind the local.conf alternative respectively.
Comment 3 Jessica 2013-08-29 14:42:14 UTC
This may tide to we need to enhance our layer template
Comment 4 Scott Rifenbark 2013-09-10 22:47:24 UTC
Hi, 

I need to wait to see what changes are made to layer template as noted by Jessica.

Thanks, 
Scott
Comment 5 Richard Purdie 2013-09-18 22:41:08 UTC
We certainly need to make it more easily available for layers to customize the wrapping of OE-Core. The meta-yocto layer currently does this for its template files but its a bit ugly and we should complete the work started a long time ago to finally resolve this.
Comment 6 Richard Purdie 2017-06-15 15:30:22 UTC
I believe we did change the way this works so that layers could be extended. If there are specific issues that still need to be addressed please open specific bugs for those.
Comment 7 Scott Rifenbark 2017-06-15 16:13:54 UTC
Great - I am turning the doc flag off then. 

Thanks, 
Scott