From: Joseph Reynolds <joseph-reynolds@charter.net>
To: openbmc@lists.ozlabs.org
Subject: Add TARGET_MACHINE to /etc/os-release
Date: Fri, 16 Nov 2018 11:30:34 -0600 [thread overview]
Message-ID: <966f717c-59a9-7f88-7b37-91edb9d72276@charter.net> (raw)
In-Reply-To: <mailman.11506.1542344002.668.openbmc@lists.ozlabs.org>
> Send openbmc mailing list submissions to
> openbmc@lists.ozlabs.org
Proposal to add TARGET_MACHINE to /etc/os-release.
In an OpenBMC image, the /etc/os-release file includes distro
("openbmc-phosphor") and version (as a git tag or commit). It should
also include the target machine (the kind of device the OpenBMC image is
intended to control). This is needed to be able to track the image back
to its source code: the distro and version indicate the exact source
code that was used, and the target says which Bitbake layer
configuration within that source was used.
Specifically, the proposal is to enhance the generated /etc/os-release
file with a new OS identification parameter like:
OPENBMC_PHOSPHOR_TARGET_MACHINE="$MACHINE"
where MACHINE="romulus", for example.
All OpenBMC images should define this os-release parameter.
Proposed documentation for the new parameter: Indicates the kind of
device the OpenBMC image is targeted to control.
... tl;dr details follow ... snip ...
The MACHINE is set in
openbmc/meta-COMPANY/meta-MACHINE/conf/local.conf.sample. (This is
where TEMPLATECONF points to.)
Note MACHINE is not guaranteed to be unique across all future OpenBMC
layer configurations. (That is, meta-A/meta-B/conf and
meta-X/meta-Y/conf may inadvertently define the same machine name.) To
guarantee uniqueness, an alternate design would be to use the
TEMPLATECONF parameter as the machine name. (e.g.,
"meta-ibm/meta-romulus/conf"). In practice I expect the machine name
will be sufficiently unique: as unique as different company's brand and
model names.
The manual page for "os-release" recommends prefixing the parameter name
with the distro name. Ideas for alternate parameter names are welcome
("OBMC_TARGET_HARDWARE" anyone?). See
https://www.freedesktop.org/software/systemd/man/os-release.html.
The os-release file is generated by the os-release.bb and
os-release.bbappend recipes.
next parent reply other threads:[~2018-11-16 17:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.11506.1542344002.668.openbmc@lists.ozlabs.org>
2018-11-16 17:30 ` Joseph Reynolds [this message]
2018-11-28 18:36 ` Add TARGET_MACHINE to /etc/os-release Brad Bishop
2018-11-29 8:02 ` Alexander A. Filippov
2018-11-29 19:29 ` Brad Bishop
2018-11-29 23:03 ` Joseph Reynolds
2018-12-05 23:13 ` Joseph Reynolds
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=966f717c-59a9-7f88-7b37-91edb9d72276@charter.net \
--to=joseph-reynolds@charter.net \
--cc=openbmc@lists.ozlabs.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.