diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor')
19 files changed, 903 insertions, 62 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Improve-initialization-of-I2C-sensors.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Improve-initialization-of-I2C-sensors.patch new file mode 100644 index 000000000..0ad78b69d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0002-Improve-initialization-of-I2C-sensors.patch @@ -0,0 +1,450 @@ +From abfcf2d0b849c1bdd82ff1112192fab28f68800a Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey <johnathanx.mantey@intel.com> +Date: Tue, 13 Oct 2020 15:00:51 -0700 +Subject: [PATCH] Improve initialization of I2C sensors + +After an AC cycle validation has witnessed some systems sensors are +missing. As Entity Manager begins the process of scanning for +sesnsors, and creating the hardware monitoring nodes, there are +occassionally some failures to correctly create the node. This +manifests itself by the 'dd' kernel driver emitting an -EBUSY error +message. Unfortunately the 'dd' driver also eats the error code, and +continues. This is by design. + +This commit modifies how the nodes are initialized. The steps taken: +1. Determine if the node is already present +2. Create the node if it is not +3. Set a timer, to give the kernel time to create the node +4. For those sensors that create a "hwmon" subdir, search for that +directory after the timer elapses. +5. If the subdir is not present, delete the device, and try again by +initiating another timer. +6. Continue until the subdir exists, or a retry count expires. + +Tested: +Ran AC cycles via a script. +After each cycle, wait for the SUT to DC on, and arrive at the EFI +Shell> propmt. +Issue "ipmitool sensor list", capturing the results +Search the list for all of the sensors that have been reported as +missing after AC cycles. + +Change-Id: I118df674162677d66e7d211b089430fce384086b +Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> +--- + include/devices.hpp | 133 +++++++++++++++++------------- + src/Overlay.cpp | 192 ++++++++++++++++++++++++++++++++++---------- + 2 files changed, 223 insertions(+), 102 deletions(-) + +diff --git a/include/devices.hpp b/include/devices.hpp +index 16d1822..8f484bc 100644 +--- a/include/devices.hpp ++++ b/include/devices.hpp +@@ -30,84 +30,101 @@ struct CmpStr + + struct ExportTemplate + { +- ExportTemplate(const char* params, const char* dev) : +- parameters(params), device(dev){}; ++ ExportTemplate(const char* params, const char* dev, const char* constructor, ++ const char* destructor, bool createsHWMon) : ++ parameters(params), ++ devicePath(dev), add(constructor), remove(destructor), ++ createsHWMon(createsHWMon){}; + const char* parameters; +- const char* device; ++ const char* devicePath; ++ const char* add; ++ const char* remove; ++ bool createsHWMon; + }; + + const boost::container::flat_map<const char*, ExportTemplate, CmpStr> + exportTemplates{ +- {{"24C02", ExportTemplate("24c02 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"24C64", ExportTemplate("24c64 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ {{"24C02", ++ ExportTemplate("24c02 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, ++ {"24C64", ++ ExportTemplate("24c64 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"ADM1272", +- ExportTemplate("adm1272 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"EEPROM", ExportTemplate("eeprom $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("adm1272 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, ++ {"EEPROM", ++ ExportTemplate("eeprom $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"EMC1413", +- ExportTemplate("emc1413 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"Gpio", ExportTemplate("$Index", "/sys/class/gpio/export")}, +- {"INA230", ExportTemplate("ina230 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("emc1413 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"Gpio", ExportTemplate("$Index", "/sys/class/gpio", "export", ++ "unexport", false)}, ++ {"INA230", ++ ExportTemplate("ina230 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"ISL68137", +- ExportTemplate("isl68137 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("isl68137 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX16601", +- ExportTemplate("max16601 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max16601 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX20730", +- ExportTemplate("max20730 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max20730 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX20734", +- ExportTemplate("max20734 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max20734 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX20796", +- ExportTemplate("max20796 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max20796 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX31725", +- ExportTemplate("max31725 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max31725 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX31730", +- ExportTemplate("max31730 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max31730 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX34451", +- ExportTemplate("max34451 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max34451 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"MAX6654", +- ExportTemplate("max6654 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("max6654 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"PCA9543Mux", +- ExportTemplate("pca9543 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9543 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9544Mux", +- ExportTemplate("pca9544 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9544 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9545Mux", +- ExportTemplate("pca9545 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9545 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9546Mux", +- ExportTemplate("pca9546 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9546 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, + {"PCA9547Mux", +- ExportTemplate("pca9547 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"SBTSI", ExportTemplate("sbtsi $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"pmbus", ExportTemplate("pmbus $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP112", ExportTemplate("tmp112 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP175", ExportTemplate("tmp175 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP421", ExportTemplate("tmp421 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, +- {"TMP441", ExportTemplate("tmp441 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}, ++ ExportTemplate("pca9547 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", false)}, ++ {"SBTSI", ++ ExportTemplate("sbtsi $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"pmbus", ++ ExportTemplate("pmbus $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP112", ++ ExportTemplate("tmp112 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP175", ++ ExportTemplate("tmp175 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP421", ++ ExportTemplate("tmp421 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, ++ {"TMP441", ++ ExportTemplate("tmp441 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}, + {"TMP75", +- ExportTemplate("tmp75 $Address", +- "/sys/bus/i2c/devices/i2c-$Bus/new_device")}}}; ++ ExportTemplate("tmp75 $Address", "/sys/bus/i2c/devices/i2c-$Bus", ++ "new_device", "delete_device", true)}}}; + } // namespace devices +diff --git a/src/Overlay.cpp b/src/Overlay.cpp +index edd00f7..32385c6 100644 +--- a/src/Overlay.cpp ++++ b/src/Overlay.cpp +@@ -20,6 +20,7 @@ + #include "devices.hpp" + + #include <boost/algorithm/string/predicate.hpp> ++#include <boost/asio/io_context.hpp> + #include <boost/container/flat_map.hpp> + #include <boost/container/flat_set.hpp> + #include <boost/process/child.hpp> +@@ -31,6 +32,8 @@ + #include <regex> + #include <string> + ++extern boost::asio::io_context io; ++ + constexpr const char* OUTPUT_DIR = "/tmp/overlays"; + constexpr const char* TEMPLATE_CHAR = "$"; + constexpr const char* HEX_FORMAT_STR = "0x"; +@@ -112,16 +115,150 @@ void linkMux(const std::string& muxName, size_t busIndex, size_t address, + } + } + ++static int deleteDevice(const std::string& devicePath, ++ std::shared_ptr<uint64_t> address, ++ const std::string& destructor) ++{ ++ if (!address) ++ { ++ return -1; ++ } ++ std::filesystem::path deviceDestructor(devicePath); ++ deviceDestructor /= destructor; ++ std::ofstream deviceFile(deviceDestructor); ++ if (!deviceFile.good()) ++ { ++ std::cerr << "Error writing " << deviceDestructor << "\n"; ++ return -1; ++ } ++ deviceFile << std::to_string(*address); ++ deviceFile.close(); ++ return 0; ++} ++ ++static int createDevice(const std::string& devicePath, ++ const std::string& parameters, ++ const std::string& constructor) ++{ ++ std::filesystem::path deviceConstructor(devicePath); ++ deviceConstructor /= constructor; ++ std::ofstream deviceFile(deviceConstructor); ++ if (!deviceFile.good()) ++ { ++ std::cerr << "Error writing " << deviceConstructor << "\n"; ++ return -1; ++ } ++ deviceFile << parameters; ++ deviceFile.close(); ++ ++ return 0; ++} ++ ++static bool deviceIsCreated(const std::string& devicePath, ++ std::shared_ptr<uint64_t> bus, ++ std::shared_ptr<uint64_t> address, ++ const bool retrying) ++{ ++ // Prevent the device from being created a second time. ++ if (bus && address) ++ { ++ std::ostringstream hex; ++ hex << std::hex << *address; ++ std::string addressHex = hex.str(); ++ std::string busStr = std::to_string(*bus); ++ ++ if (std::filesystem::is_directory(devicePath)) ++ { ++ for (const auto& path : ++ std::filesystem::directory_iterator(devicePath)) ++ { ++ if (!std::filesystem::is_directory(path)) ++ { ++ continue; ++ } ++ ++ const std::string& directoryName = path.path().filename(); ++ if (boost::starts_with(directoryName, busStr) && ++ boost::ends_with(directoryName, addressHex)) ++ { ++ if (retrying) ++ { ++ // subsequent attempts should find the hwmon subdir. ++ std::filesystem::path hwmonDir(devicePath); ++ hwmonDir /= directoryName; ++ hwmonDir /= "hwmon"; ++ bool dirFound = ++ (std::filesystem::is_directory(hwmonDir)); ++ return dirFound; ++ } ++ else ++ { ++ return true; ++ } ++ } ++ } ++ return false; ++ } ++ } ++ return false; ++} ++ ++constexpr size_t totalBuildDeviceRetries = 5; ++static int buildDevice(const std::string& devicePath, ++ const std::string& parameters, ++ std::shared_ptr<uint64_t> bus, ++ std::shared_ptr<uint64_t> address, ++ const std::string& constructor, ++ const std::string& destructor, const bool createsHWMon, ++ const size_t retries = totalBuildDeviceRetries) ++{ ++ bool tryAgain = false; ++ if (!retries) ++ { ++ return -1; ++ } ++ int retVal = 0; ++ ++ if (!deviceIsCreated(devicePath, bus, address, false)) ++ { ++ createDevice(devicePath, parameters, constructor); ++ tryAgain = true; ++ } ++ else if (createsHWMon && !deviceIsCreated(devicePath, bus, address, true)) ++ { ++ // device is present, hwmon subdir missing ++ deleteDevice(devicePath, address, destructor); ++ tryAgain = true; ++ } ++ ++ if (tryAgain) ++ { ++ std::shared_ptr<boost::asio::steady_timer> createTimer = ++ std::make_shared<boost::asio::steady_timer>(io); ++ createTimer->expires_after(std::chrono::milliseconds(500)); ++ createTimer->async_wait([createTimer, devicePath, parameters, bus, ++ address, constructor, destructor, createsHWMon, ++ retries](const boost::system::error_code&) { ++ buildDevice(devicePath, parameters, bus, address, constructor, ++ destructor, createsHWMon, retries - 1); ++ }); ++ } ++ return 0; ++} ++ + void exportDevice(const std::string& type, + const devices::ExportTemplate& exportTemplate, + const nlohmann::json& configuration) + { + + std::string parameters = exportTemplate.parameters; +- std::string device = exportTemplate.device; ++ std::string devicePath = exportTemplate.devicePath; ++ std::string constructor = exportTemplate.add; ++ std::string destructor = exportTemplate.remove; ++ bool createsHWMon = exportTemplate.createsHWMon; + std::string name = "unknown"; +- const uint64_t* bus = nullptr; +- const uint64_t* address = nullptr; ++ std::shared_ptr<uint64_t> bus = nullptr; ++ std::shared_ptr<uint64_t> address = nullptr; + const nlohmann::json::array_t* channels = nullptr; + + for (auto keyPair = configuration.begin(); keyPair != configuration.end(); +@@ -143,11 +280,13 @@ void exportDevice(const std::string& type, + + if (keyPair.key() == "Bus") + { +- bus = keyPair.value().get_ptr<const uint64_t*>(); ++ bus = std::make_shared<uint64_t>( ++ *keyPair.value().get_ptr<const uint64_t*>()); + } + else if (keyPair.key() == "Address") + { +- address = keyPair.value().get_ptr<const uint64_t*>(); ++ address = std::make_shared<uint64_t>( ++ *keyPair.value().get_ptr<const uint64_t*>()); + } + else if (keyPair.key() == "ChannelNames") + { +@@ -156,49 +295,14 @@ void exportDevice(const std::string& type, + } + boost::replace_all(parameters, TEMPLATE_CHAR + keyPair.key(), + subsituteString); +- boost::replace_all(device, TEMPLATE_CHAR + keyPair.key(), ++ boost::replace_all(devicePath, TEMPLATE_CHAR + keyPair.key(), + subsituteString); + } + +- // if we found bus and address we can attempt to prevent errors +- if (bus != nullptr && address != nullptr) +- { +- std::ostringstream hex; +- hex << std::hex << *address; +- const std::string& addressHex = hex.str(); +- std::string busStr = std::to_string(*bus); ++ int err = buildDevice(devicePath, parameters, bus, address, constructor, ++ destructor, createsHWMon); + +- std::filesystem::path devicePath(device); +- std::filesystem::path parentPath = devicePath.parent_path(); +- if (std::filesystem::is_directory(parentPath)) +- { +- for (const auto& path : +- std::filesystem::directory_iterator(parentPath)) +- { +- if (!std::filesystem::is_directory(path)) +- { +- continue; +- } +- +- const std::string& directoryName = path.path().filename(); +- if (boost::starts_with(directoryName, busStr) && +- boost::ends_with(directoryName, addressHex)) +- { +- return; // already exported +- } +- } +- } +- } +- +- std::ofstream deviceFile(device); +- if (!deviceFile.good()) +- { +- std::cerr << "Error writing " << device << "\n"; +- return; +- } +- deviceFile << parameters; +- deviceFile.close(); +- if (boost::ends_with(type, "Mux") && bus && address && channels) ++ if (!err && boost::ends_with(type, "Mux") && bus && address && channels) + { + linkMux(name, static_cast<size_t>(*bus), static_cast<size_t>(*address), + *channels); +-- +2.26.2 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend index f3f7d7ebe..212797329 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend @@ -3,4 +3,5 @@ SRC_URI = "git://github.com/openbmc/entity-manager.git" SRCREV = "e18edb5badc2e16181cfc464a6ccd0ef51dc4548" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://0001-Add-retries-to-mapper-calls.patch" +SRC_URI += "file://0001-Add-retries-to-mapper-calls.patch \ + file://0002-Improve-initialization-of-I2C-sensors.patch" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/0001-Ignore-SIG_QUIT-signal-in-obmc-console-server.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/0001-Ignore-SIG_QUIT-signal-in-obmc-console-server.patch new file mode 100644 index 000000000..b500fffc1 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console/0001-Ignore-SIG_QUIT-signal-in-obmc-console-server.patch @@ -0,0 +1,37 @@ +From 9560be9acd6baaf816c2f3cba37185a8c1d83131 Mon Sep 17 00:00:00 2001 +From: Kuiying Wang <kuiying.wang@intel.com> +Date: Wed, 28 Oct 2020 14:02:07 +0800 +Subject: [PATCH] Ignore SIG_QUIT signal in obmc-console-server. + +During long time AC cycle testing, there are 2 unexpected QUIT +signals in 1500 cycles. +Which cause obmc-console service restart as below: +"""""""" +intel-obmc systemd[1]:obmc-console@ttyS2.service: Main process exited, code=dumped, status=3/QUIT +intel-obmc systemd[1]:obmc-console@ttyS2.service: Failed with result 'core-dump'. +intel-obmc systemd[1]:obmc-console@ttyS2.service: Scheduled restart job, restart counter is at 1. +"""""""" + +Tested: +obmc-console service will not restart even send QUIT signal by kill command + +Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> +--- + console-server.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/console-server.c b/console-server.c +index 11d017b..f6ac09a 100644 +--- a/console-server.c ++++ b/console-server.c +@@ -703,6 +703,7 @@ int run_console(struct console *console) + int rc, timeout; + + sighandler_save = signal(SIGINT, sighandler); ++ signal(SIGQUIT,SIG_IGN); + + rc = 0; + +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend index 09510fec8..95b43e778 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/console/obmc-console_%.bbappend @@ -2,6 +2,7 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" OBMC_CONSOLE_HOST_TTY = "ttyS2" SRC_URI += "file://sol-option-check.sh \ file://obmc-console@.service \ + file://0001-Ignore-SIG_QUIT-signal-in-obmc-console-server.patch \ " inherit obmc-phosphor-systemd diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-add-sufficient-delay-to-create-fw-update-object.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-add-sufficient-delay-to-create-fw-update-object.patch index e6fd85f85..611d585bc 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-add-sufficient-delay-to-create-fw-update-object.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0014-add-sufficient-delay-to-create-fw-update-object.patch @@ -3,13 +3,13 @@ From: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> Date: Tue, 25 Aug 2020 15:44:35 +0000 Subject: [PATCH] add sufficient delay to create fw update object -Add support to increase timeoutTimeSeconds to 10 secs to allow firmware +Add support to increase timeoutTimeSeconds to 20 secs to allow firmware object to create successfully to proceed for firmware update. Tested: Redfish validator passed. -Updated the firmware using redfish for 16 times continuously. +Successfully updated the firmware using redfish for more than 10 times continuously. POST: https://<BMC_IP>/redfish/v1/UpdateService/ with <BMC_signed_cap> binary file firmware updated. @@ -22,6 +22,7 @@ firmware updated. } Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com> +Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> --- redfish-core/lib/update_service.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -35,7 +36,7 @@ index 9407d75..ec5ab8c 100644 std::shared_ptr<AsyncResp> asyncResp, const crow::Request& req, const std::string& url, const std::vector<std::string>& imgUriTargets, - int timeoutTimeSeconds = 5) -+ int timeoutTimeSeconds = 10) ++ int timeoutTimeSeconds = 20) { // Only allow one FW update at a time if (fwUpdateInProgress != false) diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0032-fix-for-duplicate-redfish-event-log-ID-s.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0032-fix-for-duplicate-redfish-event-log-ID-s.patch new file mode 100644 index 000000000..f4e1feea1 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0032-fix-for-duplicate-redfish-event-log-ID-s.patch @@ -0,0 +1,68 @@ +From 013530bbf14bf14f7772a24675abba15bfba6be8 Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Mon, 12 Oct 2020 20:10:31 +0530 +Subject: [PATCH] fix for duplicate redfish event log ID's + +Corrected the logic of reading redfish event +logs distributed across backup's files with +same time stamp. +When event logs with same timestamp is distributed +across redfish event log backup files, redfish event +log ID's calculation causes duplicate ID's. Corrected +the logic for avoiding duplicate ID's. + +Tested: + - Simulated duplicate ID's across backup files and + confirmed no duplicate ID's + +Change-Id: I94266a4396380f50c0df556f4a61426967d8e24a +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +--- + redfish-core/lib/log_services.hpp | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp +index e6090e5..e6a9022 100644 +--- a/redfish-core/lib/log_services.hpp ++++ b/redfish-core/lib/log_services.hpp +@@ -1265,6 +1265,9 @@ class JournalEventLogEntryCollection : public Node + uint64_t entryCount = 0; + std::string logEntry; + ++ // Reset the unique ID on the first entry ++ bool firstEntry = true; ++ + // Oldest logs are in the last file, so start there and loop backwards + for (auto it = redfishLogFiles.rbegin(); it < redfishLogFiles.rend(); + it++) +@@ -1275,8 +1278,6 @@ class JournalEventLogEntryCollection : public Node + continue; + } + +- // Reset the unique ID on the first entry +- bool firstEntry = true; + while (std::getline(logStream, logEntry)) + { + entryCount++; +@@ -1353,6 +1354,9 @@ class JournalEventLogEntry : public Node + getRedfishLogFiles(redfishLogFiles); + std::string logEntry; + ++ // Reset the unique ID on the first entry ++ bool firstEntry = true; ++ + // Oldest logs are in the last file, so start there and loop backwards + for (auto it = redfishLogFiles.rbegin(); it < redfishLogFiles.rend(); + it++) +@@ -1363,8 +1367,6 @@ class JournalEventLogEntry : public Node + continue; + } + +- // Reset the unique ID on the first entry +- bool firstEntry = true; + while (std::getline(logStream, logEntry)) + { + std::string idStr; +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0033-Redfish-validator-conformance-fix.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0033-Redfish-validator-conformance-fix.patch new file mode 100644 index 000000000..504e72663 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0033-Redfish-validator-conformance-fix.patch @@ -0,0 +1,121 @@ +From 7959553c906887b5dc9b3fdf020bbd1049007cb6 Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Mon, 12 Oct 2020 17:52:31 +0530 +Subject: [PATCH] Redfish validator conformance fix + +This commit fixes the issues reported in +redfish service validator conformance test. + - PCIeFunctions: Add empty checks for + not mandatory properties and skip them. + Also assign default if DeviceId exist and + DeviceClass is empty. + - Memory schema: Corrected the MemoryDeviceType + Value. + +Tested: + - Redfish validator passed. + +Change-Id: Ic32e0f3688a3c0d211b6da995ee86b225c256a92 +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +--- + redfish-core/lib/cpudimm.hpp | 12 +++++++++--- + redfish-core/lib/pcie.hpp | 21 ++++++++++++++------- + 2 files changed, 23 insertions(+), 10 deletions(-) + +diff --git a/redfish-core/lib/cpudimm.hpp b/redfish-core/lib/cpudimm.hpp +index e332a11..d15ae6b 100644 +--- a/redfish-core/lib/cpudimm.hpp ++++ b/redfish-core/lib/cpudimm.hpp +@@ -513,10 +513,16 @@ void getDimmDataByService(std::shared_ptr<AsyncResp> aResp, + std::get_if<std::string>(&property.second); + if (value != nullptr) + { +- aResp->res.jsonValue["MemoryDeviceType"] = *value; +- if (boost::starts_with(*value, "DDR")) ++ std::size_t found = value->find_last_of("."); ++ if (found != std::string::npos) + { +- aResp->res.jsonValue["MemoryType"] = "DRAM"; ++ std::string memDevType = value->substr(found + 1); ++ aResp->res.jsonValue["MemoryDeviceType"] = ++ memDevType; ++ if (boost::starts_with(memDevType, "DDR")) ++ { ++ aResp->res.jsonValue["MemoryType"] = "DRAM"; ++ } + } + } + } +diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp +index ac2a2f9..ee92429 100644 +--- a/redfish-core/lib/pcie.hpp ++++ b/redfish-core/lib/pcie.hpp +@@ -364,14 +364,14 @@ class SystemPCIeFunction : public Node + + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Function" + function + "DeviceId"]); +- property) ++ property && !property->empty()) + { + asyncResp->res.jsonValue["DeviceId"] = *property; + } + + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Function" + function + "VendorId"]); +- property) ++ property && !property->empty()) + { + asyncResp->res.jsonValue["VendorId"] = *property; + } +@@ -385,28 +385,35 @@ class SystemPCIeFunction : public Node + + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Function" + function + "DeviceClass"]); +- property) ++ property && !property->empty()) + { + asyncResp->res.jsonValue["DeviceClass"] = *property; + } ++ else ++ { ++ // DeviceClass is mandatory property. If DeviceId exist and ++ // DeviceClass is empty, Lets mark it 'UnassignedClass' so ++ // that user can lookup the DeviceId for actual class. ++ asyncResp->res.jsonValue["DeviceClass"] = "UnassignedClass"; ++ } + + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Function" + function + "ClassCode"]); +- property) ++ property && !property->empty()) + { + asyncResp->res.jsonValue["ClassCode"] = *property; + } + + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Function" + function + "RevisionId"]); +- property) ++ property && !property->empty()) + { + asyncResp->res.jsonValue["RevisionId"] = *property; + } + + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Function" + function + "SubsystemId"]); +- property) ++ property && !property->empty()) + { + asyncResp->res.jsonValue["SubsystemId"] = *property; + } +@@ -414,7 +421,7 @@ class SystemPCIeFunction : public Node + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Function" + function + + "SubsystemVendorId"]); +- property) ++ property && !property->empty()) + { + asyncResp->res.jsonValue["SubsystemVendorId"] = *property; + } +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-fix-bmcweb-crash-during-sol-communication.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-fix-bmcweb-crash-during-sol-communication.patch new file mode 100644 index 000000000..9c0d659b5 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-fix-bmcweb-crash-during-sol-communication.patch @@ -0,0 +1,75 @@ +From 8f990dfe45e41c8733f52b1a35575fe7bf749054 Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Fri, 13 Nov 2020 19:28:22 +0530 +Subject: [PATCH] fix bmcweb crash during sol communication + +After establishing the obmc_console socket +communication, If client closes the connection +abruptly, async read/write operation fails with +asio.ssl.stream error. To handle the error, it calls +closeHandler call back function and cleans the session +and socket. Any ongoing async read operation should +be discarded by checking socket handle. Read/Write message +from stream via async_read_some()/async_write_some() +without checking socket handle, causes the crash. +Added socket handle validation before performing any +read/write operation to avoid crash. + +Tested: + - Without fix, when sol connection closes abruptly, at times + saw the crash with below logs. +Nov 13 11:32:51 intel-obmc bmcweb[20169]: doRead error asio.ssl.stream:1 +Nov 13 11:32:51 intel-obmc systemd[1]: bmcweb.service: Main process exited, code=dumped, status=11/SEGV +Nov 13 11:32:51 intel-obmc systemd[1]: bmcweb.service: Failed with result 'core-dump'. + + - With fix, verified the case and no crashes seen. +Nov 13 12:55:04 intel-obmc bmcweb[24426]: (2020-11-13 12:55:04) [ERROR "websocket.h":207] doRead error asio.ssl.stream:1 +Nov 13 12:55:04 intel-obmc bmcweb[24426]: (2020-11-13 12:55:04) [ERROR "obmc_console.hpp":67] doread() - Socket closed + +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +Change-Id: I2afda509ca77a561651a8682e042c45ca7366642 +--- + include/obmc_console.hpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp +index 9e5e058..8608f5f 100644 +--- a/include/obmc_console.hpp ++++ b/include/obmc_console.hpp +@@ -36,6 +36,12 @@ void doWrite() + return; + } + ++ if (!host_socket) ++ { ++ BMCWEB_LOG_ERROR << "doWrite(): Socket closed."; ++ return; ++ } ++ + doingWrite = true; + host_socket->async_write_some( + boost::asio::buffer(inputBuffer.data(), inputBuffer.size()), +@@ -62,6 +68,12 @@ void doWrite() + + void doRead() + { ++ if (!host_socket) ++ { ++ BMCWEB_LOG_ERROR << "doRead(): Socket closed."; ++ return; ++ } ++ + BMCWEB_LOG_DEBUG << "Reading from socket"; + host_socket->async_read_some( + boost::asio::buffer(outputBuffer.data(), outputBuffer.size()), +@@ -125,6 +137,7 @@ void requestRoutes(CrowApp& app) + }) + .onclose( + [](crow::websocket::Connection& conn, const std::string& reason) { ++ BMCWEB_LOG_INFO << "Closing websocket. Reason: " << reason; + sessions.erase(&conn); + if (sessions.empty()) + { +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0037-Use-non-throw-version-of-remote_endpoint.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0037-Use-non-throw-version-of-remote_endpoint.patch new file mode 100644 index 000000000..e1171e182 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0037-Use-non-throw-version-of-remote_endpoint.patch @@ -0,0 +1,55 @@ +From 666b78c7599960a8ac8d1a90d389dd02e605a170 Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Tue, 24 Nov 2020 13:55:12 +0530 +Subject: [PATCH] Use non-throw version of remote_endpoint + +Using boost call to get the remote endpoint of +socket is not handled properly in code, causes +the bmcweb crash in some corner cases. + +Nov 23 18:48:07 intel-obmc bmcweb[19300]: terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>' +Nov 23 18:48:07 intel-obmc bmcweb[19300]: what(): remote_endpoint: Bad file descriptor + +Added non-throw version of remote_endpoint() +and handled the error code appropriately to avoid +the bmcweb crash. + +Tested: + - Sesisons URI show properly remote IP address + and no bmcweb crashes seen. + +Change-Id: Iafa9011dbc09235785cbb7d853e22d5fd752db89 +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +--- + redfish-core/lib/redfish_sessions.hpp | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp +index 267f98a..1a015f3 100644 +--- a/redfish-core/lib/redfish_sessions.hpp ++++ b/redfish-core/lib/redfish_sessions.hpp +@@ -230,12 +230,18 @@ class SessionCollection : public Node + auto socket = req.socket(); + if (socket) + { ++ boost::system::error_code ec; + #ifdef BMCWEB_ENABLE_SSL +- clientIp = +- (*socket).next_layer().remote_endpoint().address().to_string(); ++ boost::asio::ip::tcp::endpoint endpoint = ++ (*socket).next_layer().remote_endpoint(ec); + #else +- clientIp = (*socket).remote_endpoint().address().to_string(); ++ boost::asio::ip::tcp::endpoint endpoint = ++ (*socket).remote_endpoint(ec); + #endif ++ if (!ec) ++ { ++ clientIp = endpoint.address().to_string(); ++ } + } + // User is authenticated - create session + std::shared_ptr<crow::persistent_data::UserSession> session = +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0038-Change-Severity-for-ServiceFailure-redfish-event.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0038-Change-Severity-for-ServiceFailure-redfish-event.patch new file mode 100644 index 000000000..af2f05151 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0038-Change-Severity-for-ServiceFailure-redfish-event.patch @@ -0,0 +1,56 @@ +From 8c1be7323641010df618e8d6fc60829b1afa75c6 Mon Sep 17 00:00:00 2001 +From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +Date: Thu, 3 Dec 2020 18:33:43 +0000 +Subject: [PATCH] Change Severity for ServiceFailure redfish event + +During Ac cycle stress, at times some services may exit unsuccessfully. +This will not have any functionality impact. So updated Severity of +"ServiceFailure" redfish event to "Ok". + +Tested: +1. Redfish validator - passed for this with change +2. Killed couple of process and observed Redfish EventLog shows updated + Severity. +Redfish URI: +GET: https://<BMC IP>/redfish/v1/Systems/system/LogServices/EventLog + /Entries + { + "@odata.id": "/redfish/v1/Systems/system/LogServices/ + EventLog/Entries/1606938922", + "@odata.type": "#LogEntry.v1_4_0.LogEntry", + "Created": "2020-12-02T19:55:22+00:00", + "EntryType": "Event", + "Id": "1606938922", + "Message": "Service phosphor-ipmi-host.service has exited + unsuccessfully.", + "MessageArgs": [ + "phosphor-ipmi-host.service" + ], + "MessageId": "OpenBMC.0.1.ServiceFailure", + "Name": "System Event Log Entry", + "Severity": "OK" + } + +Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +--- + redfish-core/include/registries/openbmc_message_registry.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp +index 6f1fec3..522d783 100644 +--- a/redfish-core/include/registries/openbmc_message_registry.hpp ++++ b/redfish-core/include/registries/openbmc_message_registry.hpp +@@ -2281,8 +2281,8 @@ constexpr std::array<MessageEntry, 188> registry = { + { + "Indicates that a service has exited unsuccessfully.", + "Service %1 has exited unsuccessfully.", +- "Warning", +- "Warning", ++ "OK", ++ "OK", + 1, + {"string"}, + "None.", +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend index 38f0fe532..279b8bec4 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -46,8 +46,13 @@ SRC_URI += "file://0001-Firmware-update-support-for-StandBySpare.patch \ file://0029-Added-Validation-on-MessageId-and-RegistryPrefix.patch \ file://0030-Initialize-Event-Service-Config-on-bmcweb-restart.patch \ file://0031-get-on-crashdump-can-follow-redfish-privileges.patch \ + file://0032-fix-for-duplicate-redfish-event-log-ID-s.patch \ + file://0033-Redfish-validator-conformance-fix.patch \ file://0034-Avoid-using-deleted-Connection-in-Response.patch \ file://0035-EventService-Fix-hostname-resolve-issue.patch \ + file://0036-fix-bmcweb-crash-during-sol-communication.patch \ + file://0037-Use-non-throw-version-of-remote_endpoint.patch \ + file://0038-Change-Severity-for-ServiceFailure-redfish-event.patch \ " # Temporary downstream mirror of upstream patches, see telemetry\README for details diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/intrusionsensor-depend-on-networkd.conf b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/intrusionsensor-depend-on-networkd.conf new file mode 100644 index 000000000..6f0fd3ffc --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/intrusionsensor-depend-on-networkd.conf @@ -0,0 +1,3 @@ +[Unit] +After=systemd-networkd.service +Requires=systemd-networkd.service diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend index 68aa751db..ebb63ca19 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend @@ -1,11 +1,24 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +PROJECT_SRC_DIR := "${THISDIR}/${PN}" + SRCREV = "8aeffd91ff3434f7812e9fdb6b0b03c6119921dd" #SRC_URI = "git://github.com/openbmc/dbus-sensors.git" -DEPENDS_append = " libgpiod libmctp" +SRC_URI += "\ + file://intrusionsensor-depend-on-networkd.conf \ + " -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +DEPENDS_append = " libgpiod libmctp" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'disable-nvme-sensors', d)}" PACKAGECONFIG[disable-nvme-sensors] = "-DDISABLE_NVME=ON, -DDISABLE_NVME=OFF" SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'disable-nvme-sensors', '', 'xyz.openbmc_project.nvmesensor.service', d)}" + +do_install_append() { + svc="xyz.openbmc_project.intrusionsensor.service" + srcf="${WORKDIR}/intrusionsensor-depend-on-networkd.conf" + dstf="${D}/etc/systemd/system/${svc}.d/10-depend-on-networkd.conf" + mkdir -p "${D}/etc/systemd/system/${svc}.d" + install "${srcf}" "${dstf}" +} diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb index fc6e1034a..addd1ccb2 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog.bb @@ -5,20 +5,8 @@ DESCRIPTION = "BMC hardware watchdog service that is used to reset BMC \ inherit allarch inherit obmc-phosphor-systemd -RDEPENDS_${PN} = "bash" - LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" SYSTEMD_SERVICE_${PN} += "system-watchdog.service" SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/system-watchdog/system-watchdog.conf" - -SYSTEMD_SERVICE_${PN} += "watchdog-reset@.service" -SYSTEMD_SERVICE_${PN} += "watchdog-clear-failures.service" -SYSTEMD_SERVICE_${PN} += "watchdog-clear-failures.timer" -SRC_URI += "file://watchdog-reset.sh" - -do_install_append(){ - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/watchdog-reset.sh ${D}${bindir} -} diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.service b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.service deleted file mode 100644 index 801f4ed27..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Reset BMC Hardware Watchdog Failure Count - -[Service] -ExecStart=busctl call xyz.openbmc_project.U_Boot.Environment.Manager \ - /xyz/openbmc_project/u_boot/environment/mgr \ - xyz.openbmc_project.U_Boot.Environment.Manager \ - Write ss bootfailures 0 -Type=oneshot - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.timer b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.timer deleted file mode 100644 index 1abac4326..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-clear-failures.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Starts the clear watchdog serivce after 30 minutes - -[Timer] -OnBootSec=30min - -[Install] -WantedBy=timers.target diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh deleted file mode 100644 index 3413fdb9f..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -echo "Watchdog being started by $1" > /dev/kmsg - -if /sbin/fw_printenv bootfailures -n | grep -q 3; then - exit 0 # passed boot limit, user started again on purpose -fi - -if test -f "/tmp/nowatchdog"; then - echo "Not resetting due to nowatchdog file" > /dev/kmsg - exit 0 -fi - -echo "Log as follows:" > /dev/kmsg -journalctl -r -n 100 | while read line; do echo $line > /dev/kmsg; done - -systemctl stop system-watchdog.service -/sbin/watchdog -T 0 -F /dev/watchdog1 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service deleted file mode 100644 index 6b1ebc544..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/system-watchdog/watchdog-reset@.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Reset BMC Using Hardware Watchdog - -[Service] -ExecStart=/usr/bin/watchdog-reset.sh %i -Type=oneshot - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend index 9c4a3c879..46f4a28a9 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend @@ -1,4 +1,14 @@ SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2" FILESEXTRAPATHS_prepend_intel := "${THISDIR}/${PN}:" -SRCREV = "9db94c5d0e61c6cd5935e770c14a9ad6231da497" +SRCREV = "3b13f734a5f881b9b51346ba09fabea752b145f3" + +# Adding the code below as a workaround as +# favicon gets corrupted during emit due to issue with html-webpack-plugin. +# This workaround needs to be removed once this issue is fixed in the +# newer version of html-webpack-plugin +do_compile_append() { + rm -rf ${S}/dist/favicon.ico.gz + mv ${S}/dist/favicon.gz ${S}/dist/favicon.ico.gz + rm -rf ${S}/dist/app.bundle.js.LICENSE.txt.gz +} |