From: Uwe Geuder <jrswdnan22@snkmail.com>
To: yocto@yoctoproject.org
Subject: creating your own distro layer
Date: Fri, 20 Apr 2018 20:32:06 +0300 [thread overview]
Message-ID: <874lk57pih.fsf@snkmail.com> (raw)
Hi!
I have inherited our custom distro layer (heavily based on poky),
but I am not sure whether it has been coded correctly. It produces
working images, but certain weird symptoms when working with bitbake
made me to double-check the code.
I'm reading
https://www.yoctoproject.org/docs/2.4.2/mega-manual/mega-manual.html#creating-your-own-distribution
It says:
> Create the distribution configuration file: The distribution
> configuration file needs to be created in the conf/distro directory
> of your layer. You need to name it using your distribution name
> (e.g. mydistro.conf).
That seems clear to me.
It continues:
> Note: The DISTRO variable in your local.conf file determines the
> name of your distribution.
I find that statement somewhat ambiguous. Didn't we just read above
that the name of the distro is determined by the distro/<name>.conf
file? And in general case you have several of them.
So at least I would find it easier to understand if the note read
something like
The DISTRO variable in your local.conf file selects which
distro to build.
The wording in the manual might make sense if you think of the
distribution as a build product. But it doesn't make any sense to me
when thinking about distro metadata. And that's what the reader of that
section is likely to look at/edit in this moment.
Or do I miss something here?
The confusion continues. The manual says
> Your configuration file needs to set the following required variables:
> DISTRO_NAME
> DISTRO_VERSION
If I look into
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-poky/conf/distro/poky-tiny.conf?h=rocko
it does not set a DISTRO_NAME.
Well, it gets a DISTRO_NAME from
> require conf/distro/poky.conf
So assuming that poky-tiny and poky are diffferent distros, should
they really share the same name?
Maybe there is something like a distro and a distro variant, but I
could not find any such concept in the manual. Sometimes I see
references to a poky-based distro, though.
I assume the DISTRO_NAME is mostly cosmetic / for humans. So not that
much to worry about? But the DISTRO variable seems to be central for the
build process.
There is a test in script yocto-check-layer that the distro config
file does not set the DISTRO variable.
When running yocto-check-layer on our own distro layer I got a failure
for setting DISTRO. So I treid to remove the variable setting. But that
results in my DISTRO variable ending up being set to "yocto".
I think it goes like this
1.) my local.conf sets DISTRO to my own one
2.) in consequence my own distro conf file gets processed
3.) it does "require" of yocto.conf and that resets the DISTRO
value to "yocto"
4.) (originally our own distro config file reset the value to
our own name after the "require". So the name was "correct" in the
end. But yocto-check-layer did not like that)
So what is wrong here? Why does the poky code violate the
test condition of not setting DISTRO? Or is nobody supposed
to "require" poky.conf? I could of course copy the contents,
but copying code is usually not a good idea.
Thanks for reading until here, couldn't formulate it shorter...
Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
uwe.gexder@neuroeventlabs.com (Bot check: fix one obvious typo)
reply other threads:[~2018-04-20 17:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lk57pih.fsf@snkmail.com \
--to=jrswdnan22@snkmail.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.