* Add TARGET_MACHINE to /etc/os-release [not found] <mailman.11506.1542344002.668.openbmc@lists.ozlabs.org> @ 2018-11-16 17:30 ` Joseph Reynolds 2018-11-28 18:36 ` Brad Bishop 0 siblings, 1 reply; 6+ messages in thread From: Joseph Reynolds @ 2018-11-16 17:30 UTC (permalink / raw) To: openbmc > 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Add TARGET_MACHINE to /etc/os-release 2018-11-16 17:30 ` Add TARGET_MACHINE to /etc/os-release Joseph Reynolds @ 2018-11-28 18:36 ` Brad Bishop 2018-11-29 8:02 ` Alexander A. Filippov 2018-11-29 23:03 ` Joseph Reynolds 0 siblings, 2 replies; 6+ messages in thread From: Brad Bishop @ 2018-11-28 18:36 UTC (permalink / raw) To: Joseph Reynolds; +Cc: openbmc Hi Joseph > On Nov 16, 2018, at 12:30 PM, Joseph Reynolds <joseph-reynolds@charter.net> wrote: > > > 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. Just FYI - MACHINE winds up in uname -a: root@palmetto:/var/lib/systemd# uname -a Linux palmetto 4.18.12-b29e57c654b8d7cfa15d632fbc0ebfe0897b8203 #1 Thu Nov 15 21:52:09 UTC 2018 armv5tejl GNU/Linux Perhaps this meets your need without additional code? -brad ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Add TARGET_MACHINE to /etc/os-release 2018-11-28 18:36 ` Brad Bishop @ 2018-11-29 8:02 ` Alexander A. Filippov 2018-11-29 19:29 ` Brad Bishop 2018-11-29 23:03 ` Joseph Reynolds 1 sibling, 1 reply; 6+ messages in thread From: Alexander A. Filippov @ 2018-11-29 8:02 UTC (permalink / raw) To: openbmc Hi all, On Wed, Nov 28, 2018 at 01:36:37PM -0500, Brad Bishop wrote: > > Just FYI - MACHINE winds up in uname -a: > > root@palmetto:/var/lib/systemd# uname -a > Linux palmetto 4.18.12-b29e57c654b8d7cfa15d632fbc0ebfe0897b8203 #1 Thu Nov 15 21:52:09 UTC 2018 armv5tejl GNU/Linux > > Perhaps this meets your need without additional code? > > -brad Brad, it is the hostname. For example in my case it looks like this: root@malevich:~# uname -a Linux malevich.dev.yadro.com 4.18.20-d608acfd4ac3fe17f3081bee8fcd4dcd896c2ffa #1 Thu Nov 29 07:19:11 UTC 2018 armv5tejl GNU/Linux -- Cheers, Alexander ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Add TARGET_MACHINE to /etc/os-release 2018-11-29 8:02 ` Alexander A. Filippov @ 2018-11-29 19:29 ` Brad Bishop 0 siblings, 0 replies; 6+ messages in thread From: Brad Bishop @ 2018-11-29 19:29 UTC (permalink / raw) To: Alexander A. Filippov, Joseph Reynolds; +Cc: OpenBMC Maillist > On Nov 29, 2018, at 3:02 AM, Alexander A. Filippov <a.filippov@yadro.com> wrote: >> On Wed, Nov 28, 2018 at 01:36:37PM -0500, Brad Bishop wrote: >> >> Just FYI - MACHINE winds up in uname -a: >> >> root@palmetto:/var/lib/systemd# uname -a >> Linux palmetto 4.18.12-b29e57c654b8d7cfa15d632fbc0ebfe0897b8203 #1 Thu Nov 15 21:52:09 UTC 2018 armv5tejl GNU/Linux >> >> Perhaps this meets your need without additional code? >> >> -brad > > Brad, it is the hostname. For example in my case it looks like this: > > root@malevich:~# uname -a > Linux malevich.dev.yadro.com 4.18.20-d608acfd4ac3fe17f3081bee8fcd4dcd896c2ffa #1 Thu Nov 29 07:19:11 UTC 2018 armv5tejl GNU/Linux > heh. oops. Thanks for pointing that out Alexander :-) Joseph - ignore my suggestion please. -brad ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Add TARGET_MACHINE to /etc/os-release 2018-11-28 18:36 ` Brad Bishop 2018-11-29 8:02 ` Alexander A. Filippov @ 2018-11-29 23:03 ` Joseph Reynolds 2018-12-05 23:13 ` Joseph Reynolds 1 sibling, 1 reply; 6+ messages in thread From: Joseph Reynolds @ 2018-11-29 23:03 UTC (permalink / raw) To: openbmc > Proposal to add TARGET_MACHINE to /etc/os-release. I've updated the details to explain why the uname command is unsatisfactory. > > 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. The "uname" command options -m (machine) and -i (hardware platform) will continue to refer to the BMC and not its host. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Add TARGET_MACHINE to /etc/os-release 2018-11-29 23:03 ` Joseph Reynolds @ 2018-12-05 23:13 ` Joseph Reynolds 0 siblings, 0 replies; 6+ messages in thread From: Joseph Reynolds @ 2018-12-05 23:13 UTC (permalink / raw) To: openbmc On 2018-11-29 17:03, Joseph Reynolds wrote: >> Proposal to add TARGET_MACHINE to /etc/os-release. > I've pushed this as gerrit review 16489. https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-phosphor/+/16489/ > I've updated the details to explain why the uname command is > unsatisfactory. > >> >> 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. > > The "uname" command options -m (machine) and -i (hardware platform) > will continue to refer to the BMC and not its host. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-12-05 23:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <mailman.11506.1542344002.668.openbmc@lists.ozlabs.org> 2018-11-16 17:30 ` Add TARGET_MACHINE to /etc/os-release Joseph Reynolds 2018-11-28 18:36 ` 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
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.