diff options
Diffstat (limited to 'meta-yadro/meta-nicole/recipes-phosphor')
21 files changed, 344 insertions, 44 deletions
diff --git a/meta-yadro/meta-nicole/recipes-phosphor/cli/obmc-yadro-cli_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/cli/obmc-yadro-cli_%.bbappend new file mode 100644 index 000000000..760a12aa9 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/cli/obmc-yadro-cli_%.bbappend @@ -0,0 +1,10 @@ +RDEPENDS_${PN}_append = " \ + obmc-yadro-backup \ + obmc-yadro-lsinventory \ + op-proc-control \ + openpower-esel-parser \ + phosphor-debug-collector \ + phosphor-led-manager-ledmanager \ + phosphor-mapper \ + phosphor-state-manager \ +" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/cli/obmc-yadro-cli_git.bb b/meta-yadro/meta-nicole/recipes-phosphor/cli/obmc-yadro-cli_git.bb deleted file mode 100644 index 0f1bc3aad..000000000 --- a/meta-yadro/meta-nicole/recipes-phosphor/cli/obmc-yadro-cli_git.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Command-line interface" -DESCRIPTION = "YADRO OpenBMC Command Line Interface for end users" -HOMEPAGE = "https://github.com/YADRO-KNS/obmc-yadro-cli" -PR = "r1" -PV = "1.0+git${SRCPV}" - -# License info -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -# Dependencies -DEPENDS = "phosphor-user-manager" -RDEPENDS_${PN} = "sudo bash" - -# Besides executable file we also have shared help -FILES_${PN} += "${datadir}/cli.help" - -# Custom installation procedure -do_install() { - ${B}/install.sh \ - --dir ${D} \ - --machine ${MACHINE} \ - --admin priv-admin \ - --operator priv-operator \ - --user priv-user -} - -# Source code repository -S = "${WORKDIR}/git" -SRC_URI = "git://github.com/YADRO-KNS/obmc-yadro-cli" -SRCREV = "406688be909c702cbaecdf06147dc3b832c37f99" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/configuration/nicole-yaml-config/nicole-ipmi-sensors.yaml b/meta-yadro/meta-nicole/recipes-phosphor/configuration/nicole-yaml-config/nicole-ipmi-sensors.yaml index 2c056f9a1..20b3a4ea2 100644 --- a/meta-yadro/meta-nicole/recipes-phosphor/configuration/nicole-yaml-config/nicole-ipmi-sensors.yaml +++ b/meta-yadro/meta-nicole/recipes-phosphor/configuration/nicole-yaml-config/nicole-ipmi-sensors.yaml @@ -189,14 +189,14 @@ Value: Offsets: 255: - type: int64_t + type: double multiplierM: 5 mutability: Mutability::Write|Mutability::Read offsetB: 0 path: /xyz/openbmc_project/sensors/temperature/dimm0_temp rExp: -1 readingType: readingData - scale: -3 + scale: 0 sensorNamePattern: nameLeaf sensorReadingType: 1 sensorType: 1 @@ -490,14 +490,14 @@ Value: Offsets: 255: - type: int64_t + type: double multiplierM: 5 mutability: Mutability::Write|Mutability::Read offsetB: 0 path: /xyz/openbmc_project/sensors/temperature/p0_core0_temp rExp: -1 readingType: readingData - scale: -3 + scale: 0 sensorNamePattern: nameLeaf sensorReadingType: 1 sensorType: 1 diff --git a/meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control/0001-Stop-and-send-SRESET-for-one-thread-only.patch b/meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control/0001-Stop-and-send-SRESET-for-one-thread-only.patch new file mode 100644 index 000000000..c763e67de --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control/0001-Stop-and-send-SRESET-for-one-thread-only.patch @@ -0,0 +1,60 @@ +From 53241d7be35fba23079504468090d770d4116831 Mon Sep 17 00:00:00 2001 +From: Artem Senichev <a.senichev@yadro.com> +Date: Tue, 28 Jul 2020 17:38:17 +0300 +Subject: [PATCH] Stop and send SRESET for one thread only + +Fixes bugs preventing the host from creating a crash dump. + +Stopping all threads leads to errors in skiboot: +[ 163.237293219,3] Could not stop thread 0:0:1: Thread is quiesced already. +If the kernel has xmon support, exiting the debugger causes the kernel +to hang: +[ 235.694220] watchdog: CPU 97 TB:187362511366, last heartbeat TB:159120095297 (55160ms ago) +[ 235.694276] watchdog: CPU 101 Hard LOCKUP + +Sending SRESET to all threads causes kernel panic: +[ 50.495727] Kernel panic - not syncing: Unrecoverable nested System Reset + +Signed-off-by: Artem Senichev <a.senichev@yadro.com> +--- + nmi_interface.cpp | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/nmi_interface.cpp b/nmi_interface.cpp +index fcce451..d022d7e 100644 +--- a/nmi_interface.cpp ++++ b/nmi_interface.cpp +@@ -38,7 +38,7 @@ void NMI::nMI() + using InternalFailure = + sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; + +- struct pdbg_target* target; ++ struct pdbg_target* target = nullptr; + + pdbg_for_each_class_target("thread", target) + { +@@ -51,11 +51,19 @@ void NMI::nMI() + report<InternalFailure>(); + return; + } ++ break; + } + +- if (thread_sreset_all() < 0) ++ if (!target) + { +- log<level::ERR>("Failed to sreset all threads"); ++ log<level::ERR>("Thread not found"); ++ report<InternalFailure>(); ++ return; ++ } ++ ++ if (thread_sreset(target) < 0) ++ { ++ log<level::ERR>("Failed to sreset thread"); + report<InternalFailure>(); + } + } +-- +2.27.0 + diff --git a/meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control_%.bbappend new file mode 100644 index 000000000..ed1cec767 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += "file://0001-Stop-and-send-SRESET-for-one-thread-only.patch" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/images/obmc-phosphor-image.bbappend index 8f69024d1..75dc1399a 100644 --- a/meta-yadro/meta-nicole/recipes-phosphor/images/obmc-phosphor-image.bbappend +++ b/meta-yadro/meta-nicole/recipes-phosphor/images/obmc-phosphor-image.bbappend @@ -1,8 +1,8 @@ OBMC_IMAGE_EXTRA_INSTALL_append = " \ admin-account \ first-boot-set-hostname \ - first-boot-set-mac \ mboxd \ obmc-yadro-cli \ openpower-fru-vpd \ " +IMAGE_FEATURES_remove_nicole = "obmc-user-mgmt-ldap" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/interfaces/bmcweb_%.bbappend new file mode 100644 index 000000000..0f663ddc0 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -0,0 +1,3 @@ +EXTRA_OECMAKE_append = " \ + -DBMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION=OFF \ +" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend new file mode 100644 index 000000000..466f42f0b --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +inherit systemd + +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils}" +SYSTEMD_SERVICE_${PN} = "${BPN}.service" +SRC_URI_append = " \ + file://${BPN}-set-device-id.sh \ + file://${BPN}.service \ +" + +S = "${WORKDIR}" +do_install_append() { + install -d ${D}${bindir} ${D}${systemd_system_unitdir} + install ${BPN}-set-device-id.sh ${D}${bindir}/ + install -m 0644 ${BPN}.service ${D}${systemd_system_unitdir}/ +} + +FILES_${PN}_append = " \ + ${bindir}/${BPN}-set-device-id.sh \ +" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json new file mode 100644 index 000000000..63e1fa7e3 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json @@ -0,0 +1,178 @@ +{ + "0" : { + "name" : "IPMB", + "is_valid" : true, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "ipmb", + "protocol_type" : "ipmb-1.0", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "1" : { + "name" : "eth0", + "is_valid" : true, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "lan-802.3", + "protocol_type" : "ipmb-1.0", + "session_supported" : "multi-session", + "is_ipmi" : true + } + }, + "2" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "lan-802.3", + "protocol_type" : "ipmb-1.0", + "session_supported" : "multi-session", + "is_ipmi" : true + } + }, + "3" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "4" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "5" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "6" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "7" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "8" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "oem", + "protocol_type" : "oem", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "9" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "10" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "11" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "12" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "13" : { + "name" : "RESERVED", + "is_valid" : false, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "reserved", + "protocol_type" : "na", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "14" : { + "name" : "SELF", + "is_valid" : true, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "ipmb", + "protocol_type" : "ipmb-1.0", + "session_supported" : "session-less", + "is_ipmi" : true + } + }, + "15" : { + "name" : "SMS", + "is_valid" : true, + "active_sessions" : 0, + "channel_info" : { + "medium_type" : "system-interface", + "protocol_type" : "kcs", + "session_supported" : "session-less", + "is_ipmi" : true + } + } +} diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json new file mode 100644 index 000000000..9cad55573 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/dev_id.json @@ -0,0 +1,7 @@ +{ + "id": 0, + "revision": 1, + "addn_dev_support": 0, + "manuf_id": 49769, + "prod_id": 11 +} diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh new file mode 100755 index 000000000..6600ced4a --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config-set-device-id.sh @@ -0,0 +1,5 @@ +#!/bin/sh -eu + +BMCPOS=$(awk -v RS=" " '/^bmcposition=/{print substr($0,13)}' /proc/cmdline) +sed -r "s/\"id\"\s*:\s*[0-9]+\s*,/\"id\": ${BMCPOS:-0},/" -i \ + /usr/share/ipmi-providers/dev_id.json diff --git a/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service new file mode 100644 index 000000000..647138054 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/ipmi/phosphor-ipmi-config/phosphor-ipmi-config.service @@ -0,0 +1,12 @@ +[Unit] +Description=Set DeviceID for ipmi-host +Before=phosphor-ipmi-host.service + +[Service] +Type=oneshot +TimeoutSec=0 +RemainAfterExit=yes +ExecStart=/usr/bin/env phosphor-ipmi-config-set-device-id.sh + +[Install] +RequiredBy=phosphor-ipmi-host.service diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/first-boot-set-mac_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/network/first-boot-set-mac_%.bbappend deleted file mode 100644 index 29d23c8c4..000000000 --- a/meta-yadro/meta-nicole/recipes-phosphor/network/first-boot-set-mac_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -SYSTEMD_SERVICE_${PN} += "first-boot-set-mac@eth0.service" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network/config.json b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network/config.json new file mode 100644 index 000000000..52280a4e6 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network/config.json @@ -0,0 +1,3 @@ +{ + "eth0":"ethernet" +} diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend new file mode 100644 index 000000000..e71ba71a3 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/phosphor-network_%.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +EXTRA_OECONF_append = " --enable-sync-mac " +SRC_URI_append = " file://config.json " +FILES_${PN} += "${datadir}/network/*.json" + +do_install_append() { + install -d ${D}${datadir}/network/ + install -m 0644 ${WORKDIR}/config.json ${D}${datadir}/network/ +} diff --git a/meta-yadro/meta-nicole/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend index 26e64be50..61bf12e06 100644 --- a/meta-yadro/meta-nicole/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend +++ b/meta-yadro/meta-nicole/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend @@ -1,10 +1,7 @@ RDEPENDS_${PN}-inventory_append = " openpower-occ-control" RDEPENDS_${PN}-extras_append = " \ phosphor-hostlogger \ - openpower-esel-parser \ - obmc-yadro-lssensors \ " RDEPENDS_${PN}-software_append = " \ obmc-yadro-fwupdate \ - phosphor-image-signing \ " diff --git a/meta-yadro/meta-nicole/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon-battery.conf b/meta-yadro/meta-nicole/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon-battery.conf index 290a72252..a6065805c 100644 --- a/meta-yadro/meta-nicole/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon-battery.conf +++ b/meta-yadro/meta-nicole/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon-battery.conf @@ -1,5 +1,5 @@ LABEL_in1=vbat -GAIN_in1=2.25 +GAIN_in1=0.00225 # GPIOP2 needs to be pulled high for battery voltage reading GPIOCHIP_in1=0 diff --git a/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager/bootmailbox.override.yml b/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager/bootmailbox.override.yml new file mode 100644 index 000000000..e4e5745f4 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager/bootmailbox.override.yml @@ -0,0 +1,16 @@ +--- +/xyz/openbmc_project/control/host0/boot/mailbox: + - Interface: xyz.openbmc_project.Control.Boot.Mailbox + Properties: + Supported: + Default: 'true' + IANAEnterpriseNumber: + # This is IBM's IANA Enterprise number expected by petitboot + Default: 2 + Data: + # The mailbox must be no smaller that 5 blocks. That is 80 bytes. + # This array does NOT include the 3-byte IANA enterprise number. + # So the minimum is 77 bytes. 512 bytes look enough to accomodate + # all boot settings, yet not too big to waste space. + # 512 - 3 = 509 + Default: 'std::vector<uint8_t>(509)' diff --git a/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager/time-sync-method.override.yml b/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager/time-sync-method.override.yml new file mode 100644 index 000000000..696919e9e --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager/time-sync-method.override.yml @@ -0,0 +1,5 @@ +/xyz/openbmc_project/time/sync_method: + - Interface: xyz.openbmc_project.Time.Synchronization + Properties: + TimeSyncMethod: + Default: Synchronization::Method::Manual diff --git a/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager_%.bbappend b/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager_%.bbappend new file mode 100644 index 000000000..848bf4e5b --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/settings/phosphor-settings-manager_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend_nicole := "${THISDIR}/${PN}:" +SRC_URI_append_nicole = " \ + file://bootmailbox.override.yml \ + file://time-sync-method.override.yml \ +" diff --git a/meta-yadro/meta-nicole/recipes-phosphor/users/admin-account.bb b/meta-yadro/meta-nicole/recipes-phosphor/users/admin-account.bb index d94952e1f..c6be7e067 100644 --- a/meta-yadro/meta-nicole/recipes-phosphor/users/admin-account.bb +++ b/meta-yadro/meta-nicole/recipes-phosphor/users/admin-account.bb @@ -18,14 +18,12 @@ GROUP_ADMIN = "priv-admin" GROUP_OPERATOR = "priv-operator" GROUP_USER = "priv-user" GROUP_IPMI = "ipmi" -GROUP_SUDO = "sudo" # Default administrative account (login: admin, password: admin) ADMIN_LOGIN = "admin" ADMIN_PASSW = "\$1\$Fze0kFe8\$sylEANC01t.osF8OewyB/1" USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--gid ${GROUP_ADMIN} \ - --groups ${GROUP_ADMIN},${GROUP_OPERATOR},${GROUP_USER},${GROUP_IPMI},${GROUP_SUDO} \ +USERADD_PARAM_${PN} = "--groups ${GROUP_ADMIN},${GROUP_IPMI} \ --password '${ADMIN_PASSW}' \ ${ADMIN_LOGIN}" |