summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/common/recipes-phosphor
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2017-04-28 16:05:39 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-05-19 15:22:26 +0000
commitf20b3aa32c07af4fdc7db6935444aa101d3b383a (patch)
treecd32cc1fff4d07cbe9c9b8800c10930f6fd119cd /meta-openbmc-machines/meta-openpower/common/recipes-phosphor
parentbea7ab535e8ae6fc1ff2b730f254532dc1667139 (diff)
downloadtalos-openbmc-f20b3aa32c07af4fdc7db6935444aa101d3b383a.tar.gz
talos-openbmc-f20b3aa32c07af4fdc7db6935444aa101d3b383a.zip
openpower-pnor-code-mgmt: Initial recipe
Create recipe for the openpower-pnor-code-mgmt repo. Move the pnor-specific service files from the phosphor layer to the open-power one. Add the new openpower-software-manager to packagegroups. Change-Id: Iab47b82e6872f7f92aed6260c51eaf0acf744aeb Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/common/recipes-phosphor')
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb37
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service14
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service8
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service11
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service13
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb1
6 files changed, 84 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb
new file mode 100644
index 000000000..f824835b3
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager.bb
@@ -0,0 +1,37 @@
+SUMMARY = "OpenPower Software Management"
+DESCRIPTION = "OpenPower Software Manager provides a set of host software \
+management daemons. It is suitable for use on a wide variety of OpenPower \
+platforms."
+HOMEPAGE = "https://github.com/openbmc/openpower-pnor-code-mgmt"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+
+DEPENDS += " \
+ autoconf-archive-native \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ "
+
+RDEPENDS_${PN} += " \
+ mtd-utils-ubifs \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ sdbusplus \
+ "
+
+DBUS_SERVICE_${PN} += "org.open_power.Software.Host.Updater.service"
+SYSTEMD_SERVICE_${PN} += " \
+ obmc-flash-bios-ubiattach.service \
+ obmc-flash-bios-ubimount@.service \
+ obmc-flash-bios-squashfsmount@.service \
+ "
+
+SRC_URI += "git://github.com/openbmc/openpower-pnor-code-mgmt"
+SRCREV = "1e9b7163913b1e64766a4263bc47e6cff5af3120"
+
+S = "${WORKDIR}/git"
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service
new file mode 100644
index 000000000..1bf15bfd4
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Mount SquashFS image pnor-ro-%I
+Requires=obmc-flash-bios-ubiattach.service
+After=obmc-flash-bios-ubiattach.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/sh -c '{sbindir}/ubimkvol /dev/ubi0 -N pnor-ro-%i -s 32MiB --type=static; \
+ mkdir /media/pnor-ro-%i; \
+ volumeid%i=`ubinfo -d 0 -N pnor-ro-%i | grep "Volume ID" | sed -e "s|Volume ID:||" -e "s/^ *//" | grep -o "^\S*"`; \
+ ubiblock --create /dev/ubi0_$volumeid%i; \
+ ubiupdatevol /dev/ubi0_$volumeid%i /tmp/images/%i/pnor.xz.squashfs; \
+ mount -t squashfs -o ro /dev/ubiblock0_$volumeid%i /media/pnor-ro-%i'
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service
new file mode 100644
index 000000000..90013ff1e
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiattach.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Attach the PNOR mtd device to UBI
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/sh -c 'grep pnor /proc/mtd |cut -c 4 |xargs {sbindir}/ubiattach /dev/ubi_ctrl -m'
+ExecStop=/bin/sh -c 'grep pnor /proc/mtd |cut -c 4 |xargs {sbindir}/ubidetach /dev/ubi_ctrl -m'
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service
new file mode 100644
index 000000000..5abab7f21
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubimount@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Mount UBIFS volume pnor-rw-%I
+Requires=obmc-flash-bios-ubiattach.service
+After=obmc-flash-bios-ubiattach.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/sh -c '{sbindir}/ubimkvol /dev/ubi0 -N pnor-rw-%i -s 1MiB; \
+ mkdir /media/pnor-rw-%i; \
+ mount -t ubifs ubi0:pnor-rw-%i /media/pnor-rw-%i'
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service
new file mode 100644
index 000000000..d0519da07
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/org.open_power.Software.Host.Updater.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenPower Software Update Manager
+Wants=xyz.openbmc_project.Software.Version.service
+Before=xyz.openbmc_project.Software.Version.service
+
+[Service]
+ExecStart={sbindir}/openpower-update-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
index b4ff9ab20..8e6901255 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
@@ -52,6 +52,7 @@ RDEPENDS_${PN}-flash = " \
obmc-mgr-download \
obmc-op-flasher \
obmc-control-bmc \
+ openpower-software-manager \
"
SUMMARY_${PN}-system = "OpenPOWER System"
OpenPOWER on IntegriCloud