summaryrefslogtreecommitdiffstats
path: root/meta-phosphor
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-06-09 22:22:46 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2016-06-15 11:00:31 -0400
commit65b40a80454bc22d0e4e1f4fafcd43d33a7167b8 (patch)
tree7fb8e2a547f3f5fbf070c936a88ad7715cb2f066 /meta-phosphor
parenta9a69fa5572d95eb2a9041e8fd2bcbdf024a332d (diff)
downloadtalos-openbmc-65b40a80454bc22d0e4e1f4fafcd43d33a7167b8.tar.gz
talos-openbmc-65b40a80454bc22d0e4e1f4fafcd43d33a7167b8.zip
Add virtual workbook / config-in-skeleton classes
This patch introduces a new abstraction 'skeleton-workbook' for representing a system configuration. At present it is pulled in by the skeleton recipe so the requirement on what is implemented by a package providing obmc-phosphor-workbook is something compatible with the existing System.py python modules in skeleton. Additionally this patch adds a new recipe for each system using a configuration file from skeleton today, and a class for common configuration. This enables a couple of things: - No need to patch skeleton.service for each system. - New systems don't have to put their configuration in the skeleton repository. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/classes/config-in-skeleton.bbclass28
-rw-r--r--meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb10
-rwxr-xr-xmeta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service2
3 files changed, 35 insertions, 5 deletions
diff --git a/meta-phosphor/classes/config-in-skeleton.bbclass b/meta-phosphor/classes/config-in-skeleton.bbclass
new file mode 100644
index 000000000..33266be69
--- /dev/null
+++ b/meta-phosphor/classes/config-in-skeleton.bbclass
@@ -0,0 +1,28 @@
+# In general this class should only be used by board layers
+# that keep their machine-readable-workbook in the skeleton repository.
+
+inherit allarch
+inherit setuptools
+
+SRC_URI += "git://github.com/openbmc/skeleton;subpath=configs"
+S = "${WORKDIR}/configs"
+
+python() {
+ machine = d.getVar('MACHINE', True).capitalize() + '.py'
+ d.setVar('_config_in_skeleton', machine)
+}
+
+do_make_setup() {
+ cp ${S}/${_config_in_skeleton} \
+ ${S}/obmc_system_config.py
+ cat <<EOF > ${S}/setup.py
+from distutils.core import setup
+
+setup(name='${BPN}',
+ version='${PR}',
+ py_modules=['obmc_system_config'],
+ )
+EOF
+}
+
+addtask make_setup after do_patch before do_configure
diff --git a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb
index eb45a406c..97627925e 100644
--- a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb
+++ b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton.bb
@@ -14,8 +14,10 @@ inherit obmc-phosphor-system-mgmt
inherit pythonnative
inherit python-dir
+VIRTUAL-RUNTIME_skeleton_workbook ?= ""
+
DEPENDS += "glib-2.0 systemd"
-RDEPENDS_${PN} += "python-subprocess python-compression libsystemd"
+RDEPENDS_${PN} += "python-subprocess python-compression libsystemd ${VIRTUAL-RUNTIME_skeleton_workbook}"
SRC_URI += "git://github.com/openbmc/skeleton"
FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*"
@@ -41,7 +43,7 @@ do_compile() {
do_install() {
oe_runmake -C git install \
- PYTHON=${PYTHON} \
- DESTDIR=${D} \
- PREFIX=/usr
+ PYTHON=${PYTHON} \
+ DESTDIR=${D} \
+ PREFIX=/usr
}
diff --git a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service
index b001abf3f..35b6e6c56 100755
--- a/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service
+++ b/meta-phosphor/common/recipes-phosphor/skeleton/skeleton/skeleton.service
@@ -3,7 +3,7 @@ Description=Temp placeholder for skeleton function
[Service]
Restart=always
-ExecStart=/usr/sbin/system_manager.py Palmetto
+ExecStart=/usr/sbin/system_manager.py
[Install]
WantedBy=multi-user.target
OpenPOWER on IntegriCloud