From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=charter.net (client-ip=68.114.190.30; helo=mtaout005-public.msg.strl.va.charter.net; envelope-from=joseph-reynolds@charter.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=charter.net Received: from mtaout005-public.msg.strl.va.charter.net (mtaout005-public.msg.strl.va.charter.net [68.114.190.30]) by lists.ozlabs.org (Postfix) with ESMTP id 42xQHc0p4MzF3n4 for ; Sat, 17 Nov 2018 04:30:50 +1100 (AEDT) Received: from impout001 ([68.114.189.16]) by mtaout005.msg.strl.va.charter.net (InterMail vM.9.00.023.01 201-2473-194) with ESMTP id <20181116173046.PJV3846.mtaout005.msg.strl.va.charter.net@impout001> for ; Fri, 16 Nov 2018 11:30:46 -0600 Received: from [192.168.2.4] ([97.86.254.207]) by impout001 with charter.net id 0hWm1z0034VFKzV01hWm3P; Fri, 16 Nov 2018 11:30:46 -0600 X-Authority-Analysis: v=2.2 cv=ffHd8wYF c=1 sm=1 tr=0 a=TxbYGM+zWkYih0pDanbSSw==:117 a=TxbYGM+zWkYih0pDanbSSw==:17 a=IkcTkHD0fZMA:10 a=voM4FWlXAAAA:8 a=e5mUnYsNAAAA:8 a=cJru5folLtsxqiqH7rcA:9 a=QEXdDO2ut3YA:10 a=N6PBoGjP6LMA:10 a=2_lZy0vNFpoA:10 a=IC2XNlieTeVoXbcui8wp:22 a=Vxmtnl_E_bksehYqCbjh:22 X-Auth-id: am9zZXBoLXJleW5vbGRzQGNoYXJ0ZXIubmV0 Subject: Add TARGET_MACHINE to /etc/os-release To: openbmc@lists.ozlabs.org References: From: Joseph Reynolds Message-ID: <966f717c-59a9-7f88-7b37-91edb9d72276@charter.net> Date: Fri, 16 Nov 2018 11:30:34 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 17:30:53 -0000 > 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.