summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format98
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt40
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json12
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp265
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch47
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch61
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend2
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh9
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend7
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch201
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch22
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch25
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch15
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch29
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch65
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch48
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch499
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch34
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend4
44 files changed, 877 insertions, 755 deletions
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 7819c90f6..60c9fdb67 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
@@ -1,6 +1,6 @@
# this is here just to bump faster than upstream
SRC_URI = "git://github.com/openbmc/entity-manager.git"
-SRCREV = "978fcadadc8320ff5356ed1a5dc25e3284e3745f"
+SRCREV = "7d807754cc9153b04b599804464edd9654d7a81e"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb
new file mode 100644
index 000000000..089aaf59f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync.bb
@@ -0,0 +1,26 @@
+
+SUMMARY = "PCH BMC time service"
+DESCRIPTION = "This service will read date/time from PCH device periodically, and set the BMC system time accordingly"
+
+SRC_URI = "\
+ file://CMakeLists.txt \
+ file://pch-time-sync.cpp \
+ "
+PV = "0.1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+S = "${WORKDIR}"
+
+SYSTEMD_SERVICE_${PN} = "pch-time-sync.service"
+
+inherit cmake
+inherit obmc-phosphor-systemd
+
+DEPENDS += " \
+ sdbusplus \
+ phosphor-logging \
+ boost \
+ i2c-tools \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format
new file mode 100644
index 000000000..dd2770837
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/.clang-format
@@ -0,0 +1,98 @@
+---
+Language: Cpp
+# BasedOnStyle: LLVM
+AccessModifierOffset: -2
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlinesLeft: false
+AlignOperands: true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: false
+BinPackArguments: true
+BinPackParameters: true
+BraceWrapping:
+ AfterClass: true
+ AfterControlStatement: true
+ AfterEnum: true
+ AfterFunction: true
+ AfterNamespace: true
+ AfterObjCDeclaration: true
+ AfterStruct: true
+ AfterUnion: true
+ BeforeCatch: true
+ BeforeElse: true
+ IndentBraces: false
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Custom
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializers: AfterColon
+ColumnLimit: 80
+CommentPragmas: '^ IWYU pragma:'
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: true
+PointerAlignment: Left
+DisableFormat: false
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: true
+ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
+IncludeBlocks: Regroup
+IncludeCategories:
+ - Regex: '^[<"](gtest|gmock)'
+ Priority: 5
+ - Regex: '^"config.h"'
+ Priority: -1
+ - Regex: '^".*\.hpp"'
+ Priority: 1
+ - Regex: '^<.*\.h>'
+ Priority: 2
+ - Regex: '^<.*'
+ Priority: 3
+ - Regex: '.*'
+ Priority: 4
+IndentCaseLabels: true
+IndentWidth: 4
+IndentWrappedFunctionNames: true
+KeepEmptyLinesAtTheStartOfBlocks: true
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBlockIndentWidth: 2
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakComment: 300
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 60
+PointerAlignment: Right
+ReflowComments: true
+SortIncludes: true
+SpaceAfterCStyleCast: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard: Cpp11
+TabWidth: 4
+UseTab: Never
+...
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt
new file mode 100644
index 000000000..a4cf8155f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
+project (pch-time-sync CXX)
+set (CMAKE_CXX_STANDARD 17)
+set (CMAKE_CXX_STANDARD_REQUIRED ON)
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti")
+
+include_directories (${CMAKE_CURRENT_SOURCE_DIR})
+
+# boost support
+find_package (Boost REQUIRED)
+# pkg_check_modules(Boost boost REQUIRED)
+include_directories (${Boost_INCLUDE_DIRS})
+add_definitions (-DBOOST_ERROR_CODE_HEADER_ONLY)
+add_definitions (-DBOOST_SYSTEM_NO_DEPRECATED)
+add_definitions (-DBOOST_ALL_NO_LIB)
+add_definitions (-DBOOST_NO_RTTI)
+add_definitions (-DBOOST_NO_TYPEID)
+add_definitions (-DBOOST_ASIO_DISABLE_THREADS)
+
+# import sdbusplus
+find_package (PkgConfig REQUIRED)
+pkg_check_modules (SDBUSPLUSPLUS sdbusplus REQUIRED)
+include_directories (${SDBUSPLUSPLUS_INCLUDE_DIRS})
+link_directories (${SDBUSPLUSPLUS_LIBRARY_DIRS})
+
+# import phosphor-logging
+find_package (PkgConfig REQUIRED)
+pkg_check_modules (LOGGING phosphor-logging REQUIRED)
+include_directories (${LOGGING_INCLUDE_DIRS})
+link_directories (${LOGGING_LIBRARY_DIRS})
+
+add_executable (pch-time-sync pch-time-sync.cpp)
+
+target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES})
+target_link_libraries (${PROJECT_NAME} ${SDBUSPLUSPLUS_LIBRARIES}
+ phosphor_logging)
+target_link_libraries (${PROJECT_NAME} i2c)
+
+install (TARGETS pch-time-sync DESTINATION bin)
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json
new file mode 100644
index 000000000..583c255a3
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/cmake-format.json
@@ -0,0 +1,12 @@
+{
+ "enum_char": ".",
+ "line_ending": "unix",
+ "bullet_char": "*",
+ "max_subargs_per_line": 99,
+ "command_case": "lower",
+ "tab_size": 4,
+ "line_width": 80,
+ "separate_fn_name_with_space": true,
+ "dangle_parens": true,
+ "separate_ctrl_name_with_space": true
+} \ No newline at end of file
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp
new file mode 100644
index 000000000..0c1014589
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.cpp
@@ -0,0 +1,265 @@
+/* Copyright 2019 Intel
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <time.h>
+
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <chrono>
+#include <iostream>
+#include <phosphor-logging/log.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+extern "C" {
+#include <i2c/smbus.h>
+#include <linux/i2c-dev.h>
+}
+
+static constexpr uint32_t syncIntervalNormalMS = 60000;
+static constexpr uint32_t syncIntervalFastMS = (syncIntervalNormalMS / 2);
+
+static uint32_t syncIntervalMS = syncIntervalNormalMS;
+
+// will update bmc time if the time difference beyond this value
+static constexpr uint8_t timeDiffAllowedSecond = 1;
+
+static inline uint8_t bcd2Decimal(uint8_t hex)
+{
+ uint8_t dec = ((hex & 0xF0) >> 4) * 10 + (hex & 0x0F);
+ return dec;
+}
+
+class I2CFile
+{
+ private:
+ int fd = -1;
+
+ public:
+ I2CFile(const int& i2cBus, const int& slaveAddr, const int& flags)
+ {
+ std::string i2cDev = "/dev/i2c-" + std::to_string(i2cBus);
+
+ fd = open(i2cDev.c_str(), flags);
+ if (fd < 0)
+ {
+ throw std::runtime_error("Unable to open i2c device.");
+ }
+
+ if (ioctl(fd, I2C_SLAVE_FORCE, slaveAddr) < 0)
+ {
+ close(fd);
+ fd = -1;
+ throw std::runtime_error("Unable to set i2c slave address.");
+ }
+ }
+
+ uint8_t i2cReadByteData(const uint8_t& offset)
+ {
+ int ret = i2c_smbus_read_byte_data(fd, offset);
+
+ if (ret < 0)
+ {
+ throw std::runtime_error("i2c read failed");
+ }
+ return static_cast<uint8_t>(ret);
+ }
+
+ ~I2CFile()
+ {
+ if (!(fd < 0))
+ {
+ close(fd);
+ }
+ }
+};
+
+class PCHSync
+{
+ private:
+ bool getPCHDate(uint8_t& year, uint8_t& month, uint8_t& day, uint8_t& hour,
+ uint8_t& minute, uint8_t& second)
+ {
+ try
+ {
+ constexpr uint8_t pchDevI2CBusNumber = 0x03;
+ constexpr uint8_t pchDevI2CSlaveAddress = 0x44;
+ constexpr uint8_t pchDevRegRTCYear = 0x0f;
+ constexpr uint8_t pchDevRegRTCMonth = 0x0e;
+ constexpr uint8_t pchDevRegRTCDay = 0x0d;
+ constexpr uint8_t pchDevRegRTCHour = 0x0b;
+ constexpr uint8_t pchDevRegRTCMinute = 0x0a;
+ constexpr uint8_t pchDevRegRTCSecond = 0x09;
+ I2CFile pchDev(pchDevI2CBusNumber, pchDevI2CSlaveAddress,
+ O_RDWR | O_CLOEXEC);
+ year = pchDev.i2cReadByteData(pchDevRegRTCYear);
+ year = bcd2Decimal(year);
+ if (year > 99)
+ {
+ return false;
+ }
+
+ month = pchDev.i2cReadByteData(pchDevRegRTCMonth);
+ month = bcd2Decimal(month);
+ if ((month < 1) || (month > 12))
+ {
+ return false;
+ }
+
+ day = pchDev.i2cReadByteData(pchDevRegRTCDay);
+ day = bcd2Decimal(day);
+ if ((day < 1) || (day > 31))
+ {
+ return false;
+ }
+
+ hour = pchDev.i2cReadByteData(pchDevRegRTCHour);
+ hour = bcd2Decimal(hour);
+ if (hour >= 24)
+ {
+ return false;
+ }
+
+ minute = pchDev.i2cReadByteData(pchDevRegRTCMinute);
+ minute = bcd2Decimal(minute);
+ if (minute >= 60)
+ {
+ return false;
+ }
+
+ second = pchDev.i2cReadByteData(pchDevRegRTCSecond);
+ second = bcd2Decimal(second);
+ if (second >= 60)
+ {
+ return false;
+ }
+ }
+ catch (const std::exception& e)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ bool getSystemTime(time_t& timeSeconds)
+ {
+ struct timespec sTime = {0};
+ int ret = 0;
+
+ ret = clock_gettime(CLOCK_REALTIME, &sTime);
+
+ if (ret != 0)
+ {
+ return false;
+ }
+ timeSeconds = sTime.tv_sec;
+ return true;
+ }
+
+ bool setSystemTime(uint32_t timeSeconds)
+ {
+ struct timespec sTime = {0};
+ int ret = 0;
+
+ sTime.tv_sec = timeSeconds;
+ sTime.tv_nsec = 0;
+
+ ret = clock_settime(CLOCK_REALTIME, &sTime);
+
+ return (ret == 0);
+ }
+
+ bool updateBMCTime()
+ {
+ int ret = 0;
+ time_t BMCTimeSeconds = 0;
+ time_t PCHTimeSeconds = 0;
+ struct tm tm = {0};
+
+ // get PCH and system time
+ if (!getPCHDate(year, month, day, hour, minute, second))
+ {
+ return false;
+ };
+
+ if (!getSystemTime(BMCTimeSeconds))
+ {
+ return false;
+ }
+
+ std::string dateString =
+ "20" + std::to_string(year) + "-" + std::to_string(month) + "-" +
+ std::to_string(day) + " " + std::to_string(hour) + ":" +
+ std::to_string(minute) + ":" + std::to_string(second);
+
+ strptime(dateString.c_str(), "%Y-%m-%d %H:%M:%S", &tm);
+
+ PCHTimeSeconds = mktime(&tm);
+ if (PCHTimeSeconds == -1)
+ {
+ return false;
+ }
+
+ if (std::abs(PCHTimeSeconds - BMCTimeSeconds) > timeDiffAllowedSecond)
+ {
+ if (!setSystemTime(PCHTimeSeconds))
+ {
+ return false;
+ }
+ std::cout << "Update BMC time to " << dateString << std::endl;
+ }
+
+ return true;
+ }
+
+ void startSyncTimer()
+ {
+ if (updateBMCTime())
+ {
+ syncIntervalMS = syncIntervalNormalMS;
+ }
+ else
+ {
+ std::cout << "Update BMC time Fail" << std::endl;
+ syncIntervalMS = syncIntervalFastMS;
+ }
+
+ syncTimer->expires_after(std::chrono::milliseconds(syncIntervalMS));
+ syncTimer->async_wait(
+ [this](const boost::system::error_code& ec) { startSyncTimer(); });
+ }
+
+ std::unique_ptr<boost::asio::steady_timer> syncTimer;
+ uint8_t year, month, day, hour, minute, second;
+
+ public:
+ PCHSync(boost::asio::io_service& io)
+ {
+ syncTimer = std::make_unique<boost::asio::steady_timer>(io);
+ startSyncTimer();
+ }
+
+ ~PCHSync() = default;
+};
+
+int main(int argc, char** argv)
+{
+ boost::asio::io_service io;
+ PCHSync pchSyncer(io);
+
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "Starting PCH time sync service");
+
+ io.run();
+ return 0;
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service
new file mode 100644
index 000000000..cf9c3053f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=PCH BMC time sync service
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Restart=always
+RestartSec=10
+ExecStart=/usr/bin/pch-time-sync
+StartLimitInterval=0
+Type=simple
+
+[Install]
+WantedBy=sysinit.target
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch
new file mode 100644
index 000000000..3344c27dd
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch
@@ -0,0 +1,47 @@
+From 3789a98fda6e3cafd377b0f4fa1c0c40bb94297e Mon Sep 17 00:00:00 2001
+From: Johnathan Mantey <jonathanx.mantey@intel.com>
+Date: Wed, 20 Nov 2019 10:56:44 -0500
+Subject: [PATCH] Reapply: "Enhance DHCP beyond just OFF and IPv4/IPv6
+ enabled."
+
+DHCP is not a binary option. The network interface can have DHCP
+disabled, IPv4 only, IPv6 only, and IPv4/IPv6.
+
+Signed-off-by: Johnathan Mantey <jonathanx.mantey@intel.com>
+
+Reapplied ->
+Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
+Change-Id: I7654116aa3962de253225271190ce4a2fe229ce9
+---
+ .../Network/EthernetInterface.interface.yaml | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/xyz/openbmc_project/Network/EthernetInterface.interface.yaml b/xyz/openbmc_project/Network/EthernetInterface.interface.yaml
+index ee54145..56285ee 100644
+--- a/xyz/openbmc_project/Network/EthernetInterface.interface.yaml
++++ b/xyz/openbmc_project/Network/EthernetInterface.interface.yaml
+@@ -23,7 +23,7 @@ properties:
+ description: >
+ Domain names of the ethernet interface.
+ - name: DHCPEnabled
+- type: boolean
++ type: enum[self.DHCPConf]
+ description: >
+ Address mode of the ethernet interface.
+ - name: Nameservers
+@@ -69,4 +69,11 @@ enumerations:
+ - name: v4
+ - name: v6
+ - name: none
+-
++ - name: DHCPConf
++ description: >
++ A list of the permitted DHCP settings used by systemd.
++ values:
++ - name: both
++ - name: v4
++ - name: v6
++ - name: none
+--
+2.21.0
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
index 7568f8ce9..4cfc4acc8 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
@@ -1,15 +1,14 @@
From a30a09f58b9ebfb267c0b9cce9ae25994ea025ca Mon Sep 17 00:00:00 2001
From: cyang29 <cheng.c.yang@intel.com>
Date: Tue, 17 Jul 2018 16:04:58 +0800
-Subject: [PATCH] Add DBUS interface of CPU and Memory's properties Feature
- Support: SMBIOS service interface. CPU DIMM information redfish
+Subject: [PATCH] Add DBUS interface of CPU properties Feature
+ Support: SMBIOS service interface. CPU information redfish
interface. Base on smbios spec DSP0134_3.0.0
Signed-off-by: cyang29 <cheng.c.yang@intel.com>
---
.../Inventory/Item/Cpu.interface.yaml | 41 +++++++++++++++++++
- .../Inventory/Item/Dimm.interface.yaml | 46 +++++++++++++++++++++-
- 2 files changed, 86 insertions(+), 1 deletion(-)
+ 1 files changed, 41 insertions(+)
diff --git a/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml b/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
index ab29cf3..313eada 100644
@@ -61,60 +60,6 @@ index ab29cf3..313eada 100644
+ The Count of Thread CPU Can Support
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
-diff --git a/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml b/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml
-index d85326d..b750320 100644
---- a/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml
-+++ b/xyz/openbmc_project/Inventory/Item/Dimm.interface.yaml
-@@ -1,4 +1,48 @@
- description: >
- Implement to provide DIMM attributes.
--
-+properties:
-+ - name: MemoryDataWidth
-+ type: uint16
-+ description: >
-+ Data width of Memory.
-+ - name: MemorySizeInKB
-+ type: uint32
-+ description: >
-+ Memory size of DIMM in Kilobyte.
-+ - name: MemoryDeviceLocator
-+ type: string
-+ description: >
-+ Socket on base board where Memory located.
-+ - name: MemoryType
-+ type: string
-+ description: >
-+ Type of memory.
-+ - name: MemoryTypeDetail
-+ type: string
-+ description: >
-+ Additional detail on Memory.
-+ - name: MemorySpeed
-+ type: uint16
-+ description: >
-+ The maximun capable speed of Memory.
-+ - name: MemoryManufacturer
-+ type: string
-+ description: >
-+ Manufacturer of memory.
-+ - name: MemorySerialNum
-+ type: string
-+ description: >
-+ Memory Serial Number.
-+ - name: MemoryPartNum
-+ type: string
-+ description: >
-+ Memory Part Number.
-+ - name: MemoryAttributes
-+ type: byte
-+ description: >
-+ Rank attributes of Memory.
-+ - name: MemoryConfClockSpeed
-+ type: uint16
-+ description: >
-+ Configured clock speed to Memory.
- # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
--
2.16.2
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
index c306e5afc..f21845ce6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -1,6 +1,5 @@
-# todo Johnathan, undo nobranch once phosphor-networking is working
-SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git;nobranch=1"
-SRCREV = "9cb4a711cff999b373cf98b44cc18b9001c1395a"
+SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git"
+SRCREV = "4610bace070eb17c6e4ee015210dac44284c53a7"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -13,4 +12,5 @@ SRC_URI += "file://0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
file://0022-Add-chassis-power-cycle-and-reset-to-Chassis-State.patch \
file://0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch \
file://0025-Add-PreInterruptFlag-properity-in-DBUS.patch \
+ file://0001-Reapply-Enhance-DHCP-beyond-just-OFF-and-IPv4-IPv6-e.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
index 842d89f03..cbd8e1171 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -5,6 +5,6 @@ SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service"
EXTRA_OECONF = "--enable-configure-dbus=yes"
SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git"
-SRCREV = "6b9f59991b7f694866c98775b4179ae97c5e69a8"
+SRCREV = "3660b3888af789266b6c84714b4e161a32e6ea54"
FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh
index 908e4b51e..9f22b179e 100755
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fru/default-fru/checkFru.sh
@@ -26,11 +26,20 @@ if grep -q 'CPU part\s*: 0xb76' /proc/cpuinfo; then
case $BOARD_ID in
12) NAME="D50TNP1SB";;
40) NAME="CooperCity";;
+ 42) NAME="WilsonCity";;
45) NAME="WilsonCity";;
60) NAME="M50CYP2SB2U";;
62) NAME="WilsonPoint";;
*) NAME="S2600WFT";;
esac
+
+elif grep -q 'CPU part\s*: 0xc07' /proc/cpuinfo; then
+ # AST2600
+ case $BOARD_ID in
+ 62) NAME="ArcherCity";;
+ *) NAME="AST2600EVB";;
+ esac
+
fi
if [ -z "$NAME" ]; then
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 53b5b50c1..93e684cd7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -1,5 +1,5 @@
SRC_URI = "git://github.com/openbmc/bmcweb.git"
-SRCREV = "c45f00821add8cd29cbd148d4b4b9f6e988665cf"
+SRCREV = "274dfe625f862e8ded2d4eb88dd856cf66bf54bf"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -17,4 +17,7 @@ EXTRA_OECMAKE += "-DBMCWEB_ENABLE_REDFISH_RAW_PECI=ON"
EXTRA_OECMAKE += "-DBMCWEB_ENABLE_REDFISH_BMC_JOURNAL=ON"
# Enable PFR support
-EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DBMCWEB_ENABLE_REDFISH_PFR_FEATURE=ON', '', d)}"
+EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE=ON', '', d)}"
+
+#Disable the Dbus interface
+EXTRA_OECMAKE += "-DBMCWEB_ENABLE_DBUS_REST=OFF"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
index dc9c2ce20..b02595e81 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json
@@ -1,6 +1,6 @@
{
"0" : {
- "name" : "IPMB",
+ "name" : "Ipmb",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch
new file mode 100644
index 000000000..1e4d3b0a9
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch
@@ -0,0 +1,201 @@
+From 3db78afe49a662ce7e90f3f5ce40d625a54d576b Mon Sep 17 00:00:00 2001
+From: Johnathan Mantey <johnathanx.mantey@intel.com>
+Date: Thu, 14 Nov 2019 11:24:19 -0800
+Subject: [PATCH] Modify Get Lan Configuration IP Address Source to use correct
+ DBus DHCPEnabled type
+
+The Get/Set Lan Configuration "IP Address Source" subcommand got
+broken by phosphor-dbus-interfaces commit 12162be
+
+12162be changed the DBus DHCPEnabled type from boolean to enum
+type. The Get LAN Configuration IP address Source IPMI command did not
+get changed to an enum type prior to 12162be being merged. This commit
+retroactively updates the boolean type to enum type.
+
+Tested:
+
+ipmitool raw 0xc 2 3 4 0 0 # returns correct state
+ipmitool raw 0xc 1 3 4 1 # changes DCHP to Static
+ipmitool raw 0xc 1 3 4 2 # returns Static to DHCP
+
+Assigned a static address via Redfish and tested using:
+ipmitool raw 0xc 2 3 4 0 0 # returns correct state
+
+Returned the NIC to use DHCP via Redfish and tested using:
+ipmitool raw 0xc 2 3 4 0 0 # returns correct state
+
+Change-Id: Ia66f7fcf3d5ad0a383b06658b18e8ce2b282e052
+Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
+---
+ transporthandler.cpp | 88 ++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 73 insertions(+), 15 deletions(-)
+
+diff --git a/transporthandler.cpp b/transporthandler.cpp
+index 09df184..8dc5677 100644
+--- a/transporthandler.cpp
++++ b/transporthandler.cpp
+@@ -109,6 +109,18 @@ constexpr auto INTF_NEIGHBOR_CREATE_STATIC =
+ constexpr auto INTF_VLAN = "xyz.openbmc_project.Network.VLAN";
+ constexpr auto INTF_VLAN_CREATE = "xyz.openbmc_project.Network.VLAN.Create";
+
++static const char* dhcpv4v6 =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.both";
++static const char* dhcpv6 =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v6";
++static const char* dhcpv4 =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v4";
++static const char* dhcpoff =
++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.none";
++
++static std::array<const char*, 4> dhcpEnumerations = {dhcpv4v6, dhcpv4, dhcpv6,
++ dhcpoff};
++
+ /** @brief Generic paramters for different address families */
+ template <int family>
+ struct AddrFamily
+@@ -456,25 +468,63 @@ auto channelCall(uint8_t channel, Args&&... args)
+ *
+ * @param[in] bus - The bus object used for lookups
+ * @param[in] params - The parameters for the channel
+- * @return True if DHCP is enabled, false otherwise
++ * @return string containing an enumerated value
++ * constexpr's dhcpv4v6, dhcpv4, dhcpv6, and dhcpoff
+ */
+-bool getDHCPProperty(sdbusplus::bus::bus& bus, const ChannelParams& params)
++std::string getDHCPProperty(sdbusplus::bus::bus& bus,
++ const ChannelParams& params)
+ {
+- return std::get<bool>(getDbusProperty(
++ return std::get<std::string>(getDbusProperty(
+ bus, params.service, params.logicalPath, INTF_ETHERNET, "DHCPEnabled"));
+ }
+
+ /** @brief Sets the system value for DHCP on the given interface
+ *
+- * @param[in] bus - The bus object used for lookups
+- * @param[in] params - The parameters for the channel
+- * @param[in] on - Whether or not to enable DHCP
++ * @param[in] bus - The bus object used for lookups
++ * @param[in] params - The parameters for the channel
++ * @param[in] setting - DHCP state to assign (none, v4, v6, both)
+ */
+ void setDHCPProperty(sdbusplus::bus::bus& bus, const ChannelParams& params,
+- bool on)
++ const std::string& setting)
+ {
++ auto it = dhcpEnumerations.begin();
++ while (it != dhcpEnumerations.end())
++ {
++ if (*it == setting)
++ {
++ break;
++ }
++ it++;
++ }
++ if (it == dhcpEnumerations.end())
++ {
++ log<level::ERR>("Invalid DHCP setting.",
++ entry("Requested DHCP mode=%s", setting.c_str()));
++ elog<InternalFailure>();
++ }
++
++ std::string dhcp = getDHCPProperty(bus, params);
++ std::string nextDhcp{};
++
++ if (((dhcp == dhcpv4) && (setting == dhcpv6)) ||
++ ((dhcp == dhcpv6) && (setting == dhcpv4)))
++ {
++ // DHCP is enabled independently for IPv4 and IPv6. If IPv4
++ // DHCP is enabled, and a request to add IPv6 is received,
++ // change the DHCPEnabled enum to "both" active. The same
++ // logic is applied if IPV6 is already enabled, and an IPv4
++ // enable request is made.
++ nextDhcp = dhcpv4v6;
++ }
++ else
++ {
++ // "both" enabled -> ipv4 only
++ // "both" enabled -> ipv6 only
++ // "ip4v", "ipv6", or "both" enabled -> no DHCP
++ nextDhcp = setting;
++ }
+ setDbusProperty(bus, params.service, params.logicalPath, INTF_ETHERNET,
+- "DHCPEnabled", on);
++ "DHCPEnabled", nextDhcp);
+ }
+
+ /** @brief Converts a human readable MAC string into MAC bytes
+@@ -1113,7 +1163,7 @@ void deconfigureChannel(sdbusplus::bus::bus& bus, ChannelParams& params)
+ }
+
+ // Clear out any settings on the lower physical interface
+- setDHCPProperty(bus, params, false);
++ setDHCPProperty(bus, params, dhcpoff);
+ }
+
+ /** @brief Creates a new VLAN on the specified interface
+@@ -1395,7 +1445,11 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter,
+ {
+ case IPSrc::DHCP:
+ {
+- channelCall<setDHCPProperty>(channel, true);
++ // The IPSrc IPMI command is only for IPv4
++ // management. Modifying IPv6 state is done using
++ // a completely different Set LAN Configuration
++ // subcommand.
++ channelCall<setDHCPProperty>(channel, dhcpv4);
+ return responseSuccess();
+ }
+ case IPSrc::Unspecified:
+@@ -1403,7 +1457,7 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter,
+ case IPSrc::BIOS:
+ case IPSrc::BMC:
+ {
+- channelCall<setDHCPProperty>(channel, false);
++ channelCall<setDHCPProperty>(channel, dhcpoff);
+ return responseSuccess();
+ }
+ }
+@@ -1540,7 +1594,8 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter,
+ return responseReqDataLenInvalid();
+ }
+ std::bitset<8> expected;
+- if (channelCall<getDHCPProperty>(channel))
++ std::string dhcp = channelCall<getDHCPProperty>(channel);
++ if ((dhcp == dhcpv4v6) | (dhcp == dhcpv6))
+ {
+ expected[IPv6RouterControlFlag::Dynamic] = 1;
+ }
+@@ -1690,7 +1745,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+ case LanParam::IPSrc:
+ {
+ auto src = IPSrc::Static;
+- if (channelCall<getDHCPProperty>(channel))
++ std::string dhcpSetting = channelCall<getDHCPProperty>(channel);
++ if ((dhcpSetting == dhcpv4) || (dhcpSetting == dhcpv4v6))
+ {
+ src = IPSrc::DHCP;
+ }
+@@ -1811,7 +1867,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+ case LanParam::IPv6RouterControl:
+ {
+ std::bitset<8> control;
+- if (channelCall<getDHCPProperty>(channel))
++ std::string dhcp = channelCall<getDHCPProperty>(channel);
++ if ((dhcp == dhcpv4v6) || (dhcp == dhcpv6))
+ {
+ control[IPv6RouterControlFlag::Dynamic] = 1;
+ }
+@@ -1825,7 +1882,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+ case LanParam::IPv6StaticRouter1IP:
+ {
+ in6_addr gateway{};
+- if (!channelCall<getDHCPProperty>(channel))
++ std::string dhcp = channelCall<getDHCPProperty>(channel);
++ if ((dhcp == dhcpv4) || (dhcp == dhcpoff))
+ {
+ gateway =
+ channelCall<getGatewayProperty<AF_INET6>>(channel).value_or(
+--
+2.21.0
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch
deleted file mode 100644
index 396d2e949..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From ad7276f3aedb6f5aed315db57406c98f2bf71a09 Mon Sep 17 00:00:00 2001
-From: "Jia, Chunhui" <chunhui.jia@intel.com>
-Date: Tue, 24 Jul 2018 13:21:52 +0800
-Subject: [PATCH] [ipmi] add set bios id to whitelist
-
-Add "SetBIOSId" and "GetDeviceInfo" 2 OEM commands into whitelist
-
-Signed-off-by: Jia, Chunhui <chunhui.jia@intel.com>
----
- host-ipmid-whitelist.conf | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: phosphor-host-ipmid/host-ipmid-whitelist.conf
-===================================================================
---- phosphor-host-ipmid.orig/host-ipmid-whitelist.conf
-+++ phosphor-host-ipmid/host-ipmid-whitelist.conf
-@@ -47,3 +47,5 @@
- 0x2C:0x06 //<Group Extension>:<Get Asset Tag>
- 0x2C:0x07 //<Group Extension>:<Get Sensor Info>
- 0x2C:0x10 //<Group Extension>:<Get Temperature Readings>
-+0x30:0x26 //<OEM>:<Set BIOS ID>
-+0x30:0x27 //<OEM>:<Get Device Info>
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch
deleted file mode 100644
index fdaa91085..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From cf466ba2c66a95825ae0014d7c378ad63b050d2f Mon Sep 17 00:00:00 2001
-From: "Jia, Chunhui" <chunhui.jia@intel.com>
-Date: Wed, 15 Aug 2018 14:50:04 +0800
-Subject: [PATCH] [ipmi] add oem command "get AIC FRU" to whitelist
-
-Intel BIOS requires this oem command to get addon card FRU info.
-Add to whitelist to unblock.
-
-Signed-off-by: Jia, Chunhui <chunhui.jia@intel.com>
----
- host-ipmid-whitelist.conf | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf
-index db54a49..49746a2 100644
---- a/host-ipmid-whitelist.conf
-+++ b/host-ipmid-whitelist.conf
-@@ -43,3 +43,4 @@
- 0x30:0x41 //<OEM>:<Set System GUID>
- 0x30:0x26 //<OEM>:<Set BIOS ID>
- 0x30:0x27 //<OEM>:<Get Device Info>
-+0x30:0x31 //<OEM>:<Get AIC card FRU>
---
-2.16.2
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch
deleted file mode 100644
index b800632cc..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf
-index 22a2a3c..5d71698 100644
---- a/host-ipmid-whitelist.conf
-+++ b/host-ipmid-whitelist.conf
-@@ -49,3 +49,10 @@
- 0x30:0x26 //<OEM>:<Set BIOS ID>
- 0x30:0x27 //<OEM>:<Get Device Info>
- 0x30:0x31 //<OEM>:<Get AIC card FRU>
-+0x30:0x54 //<OEM>:<Set Power Restore Delay>
-+0x30:0x55 //<OEM>:<Get Power Restore Delay>
-+0x30:0x9A //<OEM>:<Get Processor Error Config>
-+0x30:0x9B //<OEM>:<Set Processor Error Config>
-+0x30:0xB0 //<OEM>:<Get LED Status>
-+0x30:0xE9 //<OEM>:<Get BIOS Post Codes>
-+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch
index 3a77887a0..987e61448 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch
@@ -1,4 +1,4 @@
-From 949db3a985719335d3df77db368eb2b296756749 Mon Sep 17 00:00:00 2001
+From f9f260391f099b4e67999f9d4ca05cbf9b422baf Mon Sep 17 00:00:00 2001
From: "Jia, chunhui" <chunhui.jia@linux.intel.com>
Date: Tue, 19 Mar 2019 16:09:06 +0800
Subject: [PATCH] add SetInProgress to get/set boot option cmd
@@ -9,16 +9,17 @@ option flow.
Change-Id: Ibb0501ea5bc36c4f1f72339efef03724dd4e613f
Signed-off-by: Jia, chunhui <chunhui.jia@linux.intel.com>
+Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
---
- chassishandler.cpp | 26 +++++++++++++++++++++++++-
+ chassishandler.cpp | 28 +++++++++++++++++++++++++++-
chassishandler.hpp | 3 +++
- 2 files changed, 28 insertions(+), 1 deletion(-)
+ 2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/chassishandler.cpp b/chassishandler.cpp
-index 6d14d1b..553afa8 100644
+index 305897b..ee23845 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
-@@ -1351,6 +1351,10 @@ static ipmi_ret_t setBootMode(const Mode::Modes& mode)
+@@ -1399,6 +1399,10 @@ static ipmi_ret_t setBootMode(const Mode::Modes& mode)
return IPMI_CC_OK;
}
@@ -29,7 +30,7 @@ index 6d14d1b..553afa8 100644
ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
ipmi_request_t request,
ipmi_response_t response,
-@@ -1365,11 +1369,21 @@ ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+@@ -1413,11 +1417,21 @@ ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
get_sys_boot_options_t* reqptr = (get_sys_boot_options_t*)request;
IpmiValue bootOption = ipmiDefault;
@@ -52,14 +53,16 @@ index 6d14d1b..553afa8 100644
/*
* Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc.
* This is the only parameter used by petitboot.
-@@ -1505,6 +1519,16 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+@@ -1553,6 +1567,18 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
// This IPMI command does not have any resposne data
*data_len = 0;
+ if (reqptr->parameter ==
+ static_cast<uint8_t>(BootOptionParameter::SET_IN_PROGRESS))
+ {
-+ if (transferStatus == setInProgress) {
++ if ((transferStatus == setInProgress) &&
++ (reqptr->data[0] != setComplete))
++ {
+ return IPMI_CC_FAIL_SET_IN_PROGRESS;
+ }
+ transferStatus = reqptr->data[0];
@@ -70,10 +73,10 @@ index 6d14d1b..553afa8 100644
* Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc.
* This is the only parameter used by petitboot.
diff --git a/chassishandler.hpp b/chassishandler.hpp
-index 2c42b11..6a24507 100644
+index dcaf06c..353a929 100644
--- a/chassishandler.hpp
+++ b/chassishandler.hpp
-@@ -28,6 +28,7 @@ enum ipmi_chassis_return_codes
+@@ -25,6 +25,7 @@ enum ipmi_chassis_return_codes
{
IPMI_OK = 0x0,
IPMI_CC_PARM_NOT_SUPPORTED = 0x80,
@@ -81,7 +84,7 @@ index 2c42b11..6a24507 100644
};
// Generic completion codes,
-@@ -49,6 +50,7 @@ enum ipmi_chassis_control_cmds : uint8_t
+@@ -46,6 +47,7 @@ enum ipmi_chassis_control_cmds : uint8_t
};
enum class BootOptionParameter : size_t
{
@@ -89,7 +92,7 @@ index 2c42b11..6a24507 100644
BOOT_INFO = 0x4,
BOOT_FLAGS = 0x5,
OPAL_NETWORK_SETTINGS = 0x61
-@@ -56,6 +58,7 @@ enum class BootOptionParameter : size_t
+@@ -53,6 +55,7 @@ enum class BootOptionParameter : size_t
enum class BootOptionResponseSize : size_t
{
@@ -98,5 +101,5 @@ index 2c42b11..6a24507 100644
OPAL_NETWORK_SETTINGS = 50
};
--
-2.16.2
+2.7.4
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch
index 2dad2fc16..0d1a5abbb 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch
@@ -42,7 +42,7 @@ diff --git a/transporthandler.cpp b/transporthandler.cpp
index e88eb63..4a42e7b 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
-@@ -1168,8 +1168,323 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+@@ -1469,8 +1469,323 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
} // namespace transport
} // namespace ipmi
@@ -366,10 +366,10 @@ index e88eb63..4a42e7b 100644
void register_netfn_transport_functions()
{
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
-@@ -1178,4 +1493,11 @@ void register_netfn_transport_functions()
+@@ -1479,4 +1794,11 @@ void register_netfn_transport_functions()
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
ipmi::transport::cmdGetLanConfigParameters,
- ipmi::Privilege::Admin, ipmi::transport::getLan);
+ ipmi::Privilege::Operator, ipmi::transport::getLan);
+
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
+ ipmi::transport::cmdSetSolConfigParameters,
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
index f29111758..6c61e0995 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch
@@ -1,4 +1,4 @@
-From 00fb92edcb4229eeb5b46c4eb206ba7d70e241fc Mon Sep 17 00:00:00 2001
+From 959030b7ee71a7b23d1c081a0aadaa4eedbc0f63 Mon Sep 17 00:00:00 2001
From: "Jason M. Bills" <jason.m.bills@linux.intel.com>
Date: Mon, 3 Jun 2019 17:01:47 -0700
Subject: [PATCH] Update IPMI Chassis Control command
@@ -19,11 +19,11 @@ ipmitool power soft: soft power-off requested from system software
Change-Id: Ic9fba3ca4abd9a758eb88f1e6ee09f7ca64ff80a
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
---
- chassishandler.cpp | 206 ++++++++++++++---------------------------------------
- 1 file changed, 52 insertions(+), 154 deletions(-)
+ chassishandler.cpp | 205 +++++++++++++----------------------------------------
+ 1 file changed, 50 insertions(+), 155 deletions(-)
diff --git a/chassishandler.cpp b/chassishandler.cpp
-index 88bf84b..ad564e2 100644
+index 053f29a..53b25b8 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -31,6 +31,7 @@
@@ -34,7 +34,7 @@ index 88bf84b..ad564e2 100644
#include <xyz/openbmc_project/State/Host/server.hpp>
#include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
-@@ -712,59 +713,63 @@ ipmi_ret_t ipmi_set_chassis_cap(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+@@ -712,59 +713,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout,
//------------------------------------------
// Calls into Host State Manager Dbus object
//------------------------------------------
@@ -133,8 +133,8 @@ index 88bf84b..ad564e2 100644
+ return 0;
}
- namespace power_policy
-@@ -1033,76 +1038,6 @@ ipmi::RspType<bool, // Power is on
+ //------------------------------------------
+@@ -1065,76 +1070,6 @@ ipmi::RspType<bool, // Power is on
diagButtonDisableAllow, sleepButtonDisableAllow);
}
@@ -211,7 +211,7 @@ index 88bf84b..ad564e2 100644
/** @brief Implementation of chassis control command
*
* @param - chassisControl command byte
-@@ -1115,61 +1050,24 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
+@@ -1147,63 +1082,23 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl)
switch (chassisControl)
{
case CMD_POWER_ON:
@@ -279,11 +279,11 @@ index 88bf84b..ad564e2 100644
- // Request Host State Manager to do a soft power off
- rc = initiate_state_transition(State::Host::Transition::Off);
+ rc = initiateHostStateTransition(State::Host::Transition::Off);
-+ break;
-+ case CMD_PULSE_DIAGNOSTIC_INTR:
break;
-
- default:
+-
+ case CMD_PULSE_DIAGNOSTIC_INTR:
+ rc = setNmiProperty(true);
+ break;
--
2.7.4
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch
deleted file mode 100644
index 523a3e1a9..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From c82162866be3c236ed73c6a19b9a0bb3097718ae Mon Sep 17 00:00:00 2001
-From: Yong Li <yong.b.li@linux.intel.com>
-Date: Sat, 12 Oct 2019 12:23:24 +0800
-Subject: [PATCH] Enable watchdog to save useflag after host power off
-
-Get the right useflag after host power off.
-
-Tested:
-Set a watchdog (Timer action is none and Time Use is BIOS FRB2)
-ipmitool raw 0x06 0x24 0x01 0x00 0x00 0x00 0x40 0x00
-Get watchdog
-ipmitool mc watchdog get
-Start watchdog
-ipmitool mc watchdog reset
-Get watchdog
-ipmitool mc watchdog get
-After timer is stop, set a watchdog again
-(Timer action is none and Time Use is BIOS/POST)
-ipmitool raw 0x06 0x24 0x02 0x00 0x00 0x00 0x40 0x00
-Start watchdog and wait until timer is stop,
-Get watchdog
-ipmitool mc watchdog get
-Timer Expiration Flags should be 0x06(BIOS FRB2, BIOS/POST)
-Power down the Host
-Ipmitool chassis power off
-Check the Timer Expiration Flags(User Flags)
-ipmitool mc watchdog get
-Timer Expiration Flags should be 0x06(BIOS FRB2, BIOS/POST)
-
-Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
----
- app/watchdog.cpp | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/app/watchdog.cpp b/app/watchdog.cpp
-index c64a92f..2ff9ee9 100644
---- a/app/watchdog.cpp
-+++ b/app/watchdog.cpp
-@@ -437,22 +437,20 @@ ipmi::RspType<uint3_t, // timerUse - timer use
- wdTimerUseToIpmiTimerUse(wd_prop.expiredTimerUse));
- }
-
-+ expireFlags = timerUseExpirationFlags;
- if (wd_prop.enabled)
- {
- presentCountdown = htole16(wd_prop.timeRemaining / 100);
-- expireFlags = 0;
- }
- else
- {
- if (wd_prop.expiredTimerUse == WatchdogService::TimerUse::Reserved)
- {
- presentCountdown = initialCountdown;
-- expireFlags = 0;
- }
- else
- {
- presentCountdown = 0;
-- expireFlags = timerUseExpirationFlags;
- // Automatically clear it whenever a timer expiration occurs.
- timerNotLogFlags = false;
- }
---
-2.7.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf
index f3218d8d8..268e12848 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf
@@ -81,6 +81,7 @@
0x0C:0x02 //<Transport>:<Get LAN Configuration Parameters>
0x0C:0x04 //<Transport>:<Get IPUDPRMCP Statistics>
0x0C:0x11 //<Transport>:<Get Serial Modem Configuration>
+0x0C:0x21 //<Transport>:<Set SOL Configuration Parameters>
0x0C:0x22 //<Transport>:<Get SOL Configuration Parameters>
0x2C:0x1F //<Group Extension>:<Get CPU PECI Package Config Data>
0x2C:0x20 //<Group Extension>:<Get MDR Data Region Status>
@@ -117,6 +118,8 @@
0x30:0x43 //<Intel General Application>:<Get BMC Reset Disables>
0x30:0x44 //<Intel General Application>:<Send Embedded Firmware Update Status>
0x30:0x47 //<Intel General Application>:<HSBP Get Version>
+0x30:0x54 //<Intel General Application>:<Set Power Restore Delay>
+0x30:0x55 //<Intel General Application>:<Get Power Restore Delay>
0x30:0x55 //<Intel General Application>:<Get Power Restore Delay>
0x30:0x58 //<Intel General Application>:<Get DIMM Fault Status>
0x30:0x62 //<Intel General Application>:<Get Shutdown Policy>
@@ -141,6 +144,7 @@
0x30:0x94 //<Intel General Application>:<Get BMC Revision ID>
0x30:0x95 //<Intel General Application>:<Get Is AP CPU>
0x30:0x9A //<Intel General Application>:<Get Processor Error Configuration and Status>
+0x30:0x9B //<Intel General Application>:<Set Processor Error Config>
0x30:0x9D //<Intel General Application>:<Get Fan PWM Limit>
0x30:0xB0 //<Intel General Application>:<Get LED Status>
0x30:0xB2 //<Intel General Application>:<Get BMC Service Status>
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
index 522eb9d7f..c6bc80202 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -2,26 +2,24 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PROJECT_SRC_DIR := "${THISDIR}/${PN}"
SRC_URI = "git://github.com/openbmc/phosphor-host-ipmid"
-SRCREV = "ddb1f443d1d6e76949a230847e6145b108114a40"
+SRCREV = "225dec858e52f0e8319acfe72d7b3630adcc7a0d"
SRC_URI += "file://phosphor-ipmi-host.service \
file://host-ipmid-whitelist.conf \
file://0010-fix-get-system-GUID-ipmi-command.patch \
- file://0013-ipmi-add-set-bios-id-to-whitelist.patch \
- file://0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch \
- file://0050-enable-6-oem-commands.patch \
file://0053-Fix-keep-looping-issue-when-entering-OS.patch \
file://0056-add-SetInProgress-to-get-set-boot-option-cmd.patch \
file://0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch \
file://0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch \
file://0062-Update-IPMI-Chassis-Control-command.patch \
file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \
- file://0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch \
file://0064-Update-provisioning-mode-filter-logic.patch \
+ file://0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch \
"
EXTRA_OECONF_append = " --disable-i2c-whitelist-check"
EXTRA_OECONF_append = " --enable-transport-oem=yes"
+EXTRA_OECONF_append = " --disable-boot-flag-safe-mode-support"
RDEPENDS_${PN}_remove = "clear-once"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
index f33be5760..016dd0002 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
@@ -1,2 +1,2 @@
SRC_URI = "git://github.com/openbmc/ipmbbridge.git"
-SRCREV = "bbfd00abdbc6d2f7c0389eae91cc055a1d4fe0c3"
+SRCREV = "43c89138ea759b4e47f6cef481f677b9f421d148"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
index 140d1b302..adb1cc551 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend
@@ -11,7 +11,7 @@ SMM_DEVICE = "ipmi_kcs4"
SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service "
SRC_URI = "git://github.com/openbmc/kcsbridge.git"
-SRCREV = "2cdc49585235a6557c9cbb6c8b75c064fc02681a"
+SRCREV = "46525ae48db23333493ac927c12ed13a0e663de5"
SRC_URI += "file://99-ipmi-kcs.rules"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch
new file mode 100644
index 000000000..6430a6928
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch
@@ -0,0 +1,48 @@
+From cf8c0e1bf18334fe4a8f76c1e9b34ccfdc82f6f9 Mon Sep 17 00:00:00 2001
+From: Yong Li <yong.b.li@linux.intel.com>
+Date: Fri, 15 Nov 2019 18:34:04 +0800
+Subject: [PATCH] Do not stop session in deactivate payload
+
+IPMI spec defines that:
+The Deactivate Payload command does not cause the session to be terminated;
+
+Also during SOL looptest, there is only one time startSession call,
+but multiple stopSessions calls,
+This causes the looptest will fail if there is any new sessions comes in,
+needs to remove the stopSession call.
+
+Tested:
+Start the loop test in a terminal:
+ipmitool -H $BMCIP -Uroot -P 0penBmc -I lanplus sol looptest 500 200
+
+Then start a new session in another terminal:
+ipmitool -H $BMCIP -Uroot -P 0penBmc -I lanplus raw 6 1
+
+The looptest still works
+
+Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
+---
+ command/payload_cmds.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
+index f558781..363b843 100644
+--- a/command/payload_cmds.cpp
++++ b/command/payload_cmds.cpp
+@@ -176,13 +176,6 @@ std::vector<uint8_t> deactivatePayload(const std::vector<uint8_t>& inPayload,
+ */
+ return outPayload;
+ }
+-
+- auto check =
+- std::get<session::Manager&>(singletonPool).stopSession(sessionID);
+- if (!check)
+- {
+- response->completionCode = IPMI_CC_UNSPECIFIED_ERROR;
+- }
+ }
+ catch (std::exception& e)
+ {
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
index 7f7d89105..9f3bf81ca 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend
@@ -3,7 +3,7 @@ inherit useradd
# TODO: This should be removed, once up-stream bump up
# issue is resolved
SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid"
-SRCREV = "dafe36444fa438030fdf27089b0e94d8d88411dc"
+SRCREV = "49a94b2f82fb1aa68d608f28c4863bb36661a3a4"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
@@ -22,5 +22,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch \
file://0009-Add-dbus-interface-for-sol-commands.patch \
file://0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch \
+ file://0012-Do-not-stop-session-in-deactivate-payload.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
index fd0a6562b..6d8334865 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicat
with Management Engine via IPMB"
SRC_URI = "git://git@github.com/Intel-BMC/node-manager;protocol=ssh"
-SRCREV = "cceeff9cd35aa548cba039b8ad47c20c5870fa27"
+SRCREV = "a0d3ec079f569c47af21d8cafe46e65f5784cd5b"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
index 0fd3a99a0..78b6dd2bd 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
index 7510444a2..94f0f8729 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.RestrictionMode.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb
new file mode 100644
index 000000000..84e3f6c2b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Security Manager daemon to detect the security violation- ASD/ user management"
+DESCRIPTION = "Daemon check for Remote debug enable and user account violation"
+
+PV = "1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git/security-manager"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+inherit cmake systemd
+
+SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+
+SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.SecurityManager.service"
+
+DEPENDS += " \
+ systemd \
+ sdbusplus \
+ libgpiod \
+ sdbusplus-native \
+ phosphor-logging \
+ boost \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
index 32d7ad4ca..de8bdccd7 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend
@@ -1,5 +1,5 @@
# Enable downstream autobump
SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git"
-SRCREV = "6afe9560852c6431c43c8e79a28e2b7cb498e355"
+SRCREV = "151b7c1fc62971b7d319146e5ea129d44eadd9d7"
EXTRA_OECMAKE_intel += "-DREDFISH_LOG_MONITOR_PULSE_EVENTS=ON"
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 183a52d7c..7da1cdc4d 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,4 +1,4 @@
-SRCREV = "4316218ab824c3c60f566b38f620a6d778e45a83"
+SRCREV = "2424cb7c9752cbecc3d133a67cf1c20f8589f2c1"
SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
DEPENDS_append = " libgpiod"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
index b0569050e..b8e3aa8e5 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/settings/settings_git.bb
@@ -1,7 +1,7 @@
SUMMARY = "Settings"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
index 017108366..9b339d260 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb
@@ -9,7 +9,8 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "specialmodemgr.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
index a2107d791..47202253a 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb
@@ -9,7 +9,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "srvcfg-manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch
deleted file mode 100644
index 56bb8d1c3..000000000
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager/0001-Implement-post-code-manager.patch
+++ /dev/null
@@ -1,499 +0,0 @@
-From 7d78e70735e1bce51ef34cfe128be68758de3447 Mon Sep 17 00:00:00 2001
-From: Kuiying Wang <kuiying.wang@intel.com>
-Date: Tue, 19 Feb 2019 15:00:11 +0800
-Subject: [PATCH] Implement post code manager
-
-Implement method and properties defined in PostCode.interface.yaml
-under phosphor-dbus-interfaces/xyz/openbmc_project/State/Boot
-1. Method: std::vector<uint64_t> PostCode::getPostCodes(uint16_t index)
-2. Properties: CurrentBootCycleIndex/MaxBootCycleNum
-
-Test-By:
- Every cycle post codes is saved in "/var/lib/phosphor-post-code-manager"
- "1" file is saved all post codes for cycle 1
- "2" file is saved all post codes for cycle 2
- "CurrentBootCycleIndex" file is saved the current boot cycle number.
- root@wolfpass:/var/lib/phosphor-post-code-manager# ls
- 1 2 CurrentBootCycleIndex
-
-Change-Id: Ia89b9121983261fef5573092d890beb84626ceeb
-Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
----
- CMakeLists.txt | 45 ++++++
- MAINTAINERS | 45 ++++++
- inc/post_code.hpp | 152 ++++++++++++++++++
- ...penbmc_project.State.Boot.PostCode.service | 11 ++
- src/main.cpp | 61 +++++++
- src/post_code.cpp | 109 +++++++++++++
- 6 files changed, 423 insertions(+)
- create mode 100644 CMakeLists.txt
- create mode 100644 MAINTAINERS
- create mode 100644 inc/post_code.hpp
- create mode 100644 service_files/xyz.openbmc_project.State.Boot.PostCode.service
- create mode 100644 src/main.cpp
- create mode 100644 src/post_code.cpp
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..594d839
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,45 @@
-+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
-+project(post-code-manager CXX)
-+set(CMAKE_CXX_STANDARD 17)
-+set(CMAKE_CXX_STANDARD_REQUIRED ON)
-+
-+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-+include(GNUInstallDirs)
-+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
-+include_directories(${CMAKE_CURRENT_BINARY_DIR})
-+
-+set(DBUS_OBJECT_NAME "xyz/openbmc_project/State/Boot/PostCode")
-+set(DBUS_INTF_NAME "xyz.openbmc_project.State.Boot.PostCode")
-+
-+add_definitions(-DDBUS_OBJECT_NAME="/${DBUS_OBJECT_NAME}")
-+add_definitions(-DDBUS_INTF_NAME="${DBUS_INTF_NAME}")
-+set(SRC_FILES src/post_code.cpp
-+ src/main.cpp )
-+set ( SERVICE_FILES
-+ service_files/xyz.openbmc_project.State.Boot.PostCode.service )
-+
-+# import sdbusplus
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(SDBUSPLUSPLUS sdbusplus REQUIRED)
-+include_directories(${SDBUSPLUSPLUS_INCLUDE_DIRS})
-+link_directories(${SDBUSPLUSPLUS_LIBRARY_DIRS})
-+find_program(SDBUSPLUSPLUS sdbus++)
-+
-+# import phosphor-logging
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(LOGGING phosphor-logging REQUIRED)
-+include_directories(${LOGGING_INCLUDE_DIRS})
-+link_directories(${LOGGING_LIBRARY_DIRS})
-+
-+# phosphor-dbus-interfaces
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(DBUSINTERFACE phosphor-dbus-interfaces REQUIRED)
-+include_directories(${DBUSINTERFACE_INCLUDE_DIRS})
-+link_directories(${DBUSINTERFACE_LIBRARY_DIRS})
-+
-+add_executable(${PROJECT_NAME} ${SRC_FILES})
-+target_link_libraries(${PROJECT_NAME} ${DBUSINTERFACE_LIBRARIES} )
-+target_link_libraries(${PROJECT_NAME} "${SDBUSPLUSPLUS_LIBRARIES} -lstdc++fs -lphosphor_dbus")
-+
-+install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
-+install (FILES ${SERVICE_FILES} DESTINATION /lib/systemd/system/)
-\ No newline at end of file
-diff --git a/MAINTAINERS b/MAINTAINERS
-new file mode 100644
-index 0000000..de6cc54
---- /dev/null
-+++ b/MAINTAINERS
-@@ -0,0 +1,45 @@
-+How to use this list:
-+ Find the most specific section entry (described below) that matches where
-+ your change lives and add the reviewers (R) and maintainers (M) as
-+ reviewers. You can use the same method to track down who knows a particular
-+ code base best.
-+
-+ Your change/query may span multiple entries; that is okay.
-+
-+ If you do not find an entry that describes your request at all, someone
-+ forgot to update this list; please at least file an issue or send an email
-+ to a maintainer, but preferably you should just update this document.
-+
-+Description of section entries:
-+
-+ Section entries are structured according to the following scheme:
-+
-+ X: NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>
-+ X: ...
-+ .
-+ .
-+ .
-+
-+ Where REPO_NAME is the name of the repository within the OpenBMC GitHub
-+ organization; FILE_PATH is a file path within the repository, possibly with
-+ wildcards; X is a tag of one of the following types:
-+
-+ M: Denotes maintainer; has fields NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>;
-+ if omitted from an entry, assume one of the maintainers from the
-+ MAINTAINERS entry.
-+ R: Denotes reviewer; has fields NAME <EMAIL_USERNAME@DOMAIN> <IRC_USERNAME!>;
-+ these people are to be added as reviewers for a change matching the repo
-+ path.
-+ F: Denotes forked from an external repository; has fields URL.
-+
-+ Line comments are to be denoted "# SOME COMMENT" (typical shell style
-+ comment); it is important to follow the correct syntax and semantics as we
-+ may want to use automated tools with this file in the future.
-+
-+ A change cannot be added to an OpenBMC repository without a MAINTAINER's
-+ approval; thus, a MAINTAINER should always be listed as a reviewer.
-+
-+START OF MAINTAINERS LIST
-+-------------------------
-+
-+M: Kuiying Wang <kuiying.wang@intel.com> <kuiyingw>
-\ No newline at end of file
-diff --git a/inc/post_code.hpp b/inc/post_code.hpp
-new file mode 100644
-index 0000000..84c8b3e
---- /dev/null
-+++ b/inc/post_code.hpp
-@@ -0,0 +1,152 @@
-+/*
-+// Copyright (c) 2019 Intel Corporation
-+//
-+// Licensed under the Apache License, Version 2.0 (the "License");
-+// you may not use this file except in compliance with the License.
-+// You may obtain a copy of the License at
-+//
-+// http://www.apache.org/licenses/LICENSE-2.0
-+//
-+// Unless required by applicable law or agreed to in writing, software
-+// distributed under the License is distributed on an "AS IS" BASIS,
-+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+// See the License for the specific language governing permissions and
-+// limitations under the License.
-+*/
-+#pragma once
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <cereal/cereal.hpp>
-+#include <experimental/filesystem>
-+#include <cereal/access.hpp>
-+#include <cereal/archives/json.hpp>
-+#include <iostream>
-+#include <fstream>
-+#include <cereal/types/vector.hpp>
-+
-+#include <xyz/openbmc_project/State/Boot/PostCode/server.hpp>
-+#include <xyz/openbmc_project/Common/error.hpp>
-+#include <phosphor-logging/elog-errors.hpp>
-+#include <xyz/openbmc_project/State/Host/server.hpp>
-+
-+#define MaxPostCodeCycles 100
-+
-+const static constexpr char *PostCodePath =
-+ "/xyz/openbmc_project/state/boot/raw";
-+const static constexpr char *PropertiesIntf =
-+ "org.freedesktop.DBus.Properties";
-+const static constexpr char *PostCodeListPath =
-+ "/var/lib/phosphor-post-code-manager/";
-+const static constexpr char *CurrentBootCycleIndexName =
-+ "CurrentBootCycleIndex";
-+const static constexpr char *HostStatePath =
-+ "/xyz/openbmc_project/state/host0";
-+
-+
-+struct EventDeleter
-+{
-+ void operator()(sd_event *event) const
-+ {
-+ event = sd_event_unref(event);
-+ }
-+};
-+using EventPtr = std::unique_ptr<sd_event, EventDeleter>;
-+namespace fs = std::experimental::filesystem;
-+namespace StateServer = sdbusplus::xyz::openbmc_project::State::server;
-+
-+using post_code =
-+ sdbusplus::xyz::openbmc_project::State::Boot::server::PostCode;
-+
-+struct PostCode : sdbusplus::server::object_t<post_code>
-+{
-+ PostCode(sdbusplus::bus::bus& bus, const char* path,
-+ EventPtr &event) :
-+ sdbusplus::server::object_t<post_code>(bus, path),
-+ bus(bus),
-+ propertiesChangedSignalRaw(
-+ bus,
-+ sdbusplus::bus::match::rules::type::signal() +
-+ sdbusplus::bus::match::rules::member("PropertiesChanged") +
-+ sdbusplus::bus::match::rules::path(PostCodePath) +
-+ sdbusplus::bus::match::rules::interface(PropertiesIntf),
-+ [this](sdbusplus::message::message &msg) {
-+ std::string objectName;
-+ std::map<std::string, sdbusplus::message::variant<uint64_t>> msgData;
-+ msg.read(objectName, msgData);
-+ // Check if it was the Value property that changed.
-+ auto valPropMap = msgData.find("Value");
-+ {
-+ if (valPropMap != msgData.end())
-+ {
-+ this->savePostCodes(sdbusplus::message::variant_ns::get<uint64_t>(valPropMap->second));
-+ }
-+ }
-+ }),
-+ propertiesChangedSignalCurrentHostState(
-+ bus,
-+ sdbusplus::bus::match::rules::type::signal() +
-+ sdbusplus::bus::match::rules::member("PropertiesChanged") +
-+ sdbusplus::bus::match::rules::path(HostStatePath) +
-+ sdbusplus::bus::match::rules::interface(PropertiesIntf),
-+ [this](sdbusplus::message::message &msg) {
-+ std::string objectName;
-+ std::map<std::string, sdbusplus::message::variant<std::string>> msgData;
-+ msg.read(objectName, msgData);
-+ // Check if it was the Value property that changed.
-+ auto valPropMap = msgData.find("CurrentHostState");
-+ {
-+ if (valPropMap != msgData.end())
-+ {
-+ StateServer::Host::HostState currentHostState =
-+ StateServer::Host::convertHostStateFromString(
-+ sdbusplus::message::variant_ns::get<std::string>(valPropMap->second));
-+ if (currentHostState == StateServer::Host::HostState::Off)
-+ {
-+ if (this->currentBootCycleIndex() >= this->maxBootCycleNum())
-+ {
-+ this->currentBootCycleIndex(1);
-+ } else{
-+ this->currentBootCycleIndex(this->currentBootCycleIndex() + 1);
-+ }
-+ this->postCodes.clear();
-+ }
-+ }
-+ }
-+ })
-+ {
-+ phosphor::logging::log<phosphor::logging::level::INFO>(
-+ "PostCode is created");
-+ auto dir = fs::path(PostCodeListPath);
-+ fs::create_directories(dir);
-+ strPostCodeListPath = PostCodeListPath;
-+ strCurrentBootCycleIndexName = CurrentBootCycleIndexName;
-+ uint16_t index = 0;
-+ deserialize(fs::path(strPostCodeListPath + strCurrentBootCycleIndexName), index);
-+ currentBootCycleIndex(index);
-+ maxBootCycleNum(MaxPostCodeCycles);
-+ if (currentBootCycleIndex() >= maxBootCycleNum())
-+ {
-+ currentBootCycleIndex(1);
-+ } else{
-+ currentBootCycleIndex(currentBootCycleIndex() + 1);
-+ }
-+ }
-+ ~PostCode()
-+ {
-+
-+ }
-+
-+ std::vector<uint64_t> getPostCodes(uint16_t index) override;
-+
-+ private:
-+ sdbusplus::bus::bus& bus;
-+ std::vector<uint64_t> postCodes;
-+ std::string strPostCodeListPath;
-+ std::string strCurrentBootCycleIndexName;
-+ void savePostCodes(uint64_t code);
-+ sdbusplus::bus::match_t propertiesChangedSignalRaw;
-+ sdbusplus::bus::match_t propertiesChangedSignalCurrentHostState;
-+ fs::path serialize(const std::string& path);
-+ bool deserialize(const fs::path& path, uint16_t& index);
-+ bool deserializePostCodes(const fs::path& path, std::vector<uint64_t> &codes);
-+};
-diff --git a/service_files/xyz.openbmc_project.State.Boot.PostCode.service b/service_files/xyz.openbmc_project.State.Boot.PostCode.service
-new file mode 100644
-index 0000000..67bc43f
---- /dev/null
-+++ b/service_files/xyz.openbmc_project.State.Boot.PostCode.service
-@@ -0,0 +1,11 @@
-+[Unit]
-+Description=Post code manager
-+
-+[Service]
-+ExecStart=/usr/bin/env post-code-manager
-+SyslogIdentifier=post-code-manager
-+Type=dbus
-+BusName=xyz.openbmc_project.State.Boot.PostCode
-+
-+[Install]
-+WantedBy=multi-user.target
-diff --git a/src/main.cpp b/src/main.cpp
-new file mode 100644
-index 0000000..4a74b29
---- /dev/null
-+++ b/src/main.cpp
-@@ -0,0 +1,61 @@
-+/*
-+// Copyright (c) 2019 Intel Corporation
-+//
-+// Licensed under the Apache License, Version 2.0 (the "License");
-+// you may not use this file except in compliance with the License.
-+// You may obtain a copy of the License at
-+//
-+// http://www.apache.org/licenses/LICENSE-2.0
-+//
-+// Unless required by applicable law or agreed to in writing, software
-+// distributed under the License is distributed on an "AS IS" BASIS,
-+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+// See the License for the specific language governing permissions and
-+// limitations under the License.
-+*/
-+#include "post_code.hpp"
-+
-+int main(int argc, char* argv[])
-+{
-+ int ret = 0;
-+
-+ phosphor::logging::log<phosphor::logging::level::INFO>(
-+ "Start post code manager service...");
-+
-+ sd_event* event = nullptr;
-+ ret = sd_event_default(&event);
-+ if (ret < 0)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Error creating a default sd_event handler");
-+ return ret;
-+ }
-+ EventPtr eventP{event};
-+ event = nullptr;
-+
-+ sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
-+ sdbusplus::server::manager_t m{bus, DBUS_OBJECT_NAME};
-+
-+ bus.request_name(DBUS_INTF_NAME);
-+
-+ PostCode postCode{bus, DBUS_OBJECT_NAME, eventP};
-+
-+ try
-+ {
-+ bus.attach_event(eventP.get(), SD_EVENT_PRIORITY_NORMAL);
-+ ret = sd_event_loop(eventP.get());
-+ if (ret < 0)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Error occurred during the sd_event_loop",
-+ phosphor::logging::entry("RET=%d", ret));
-+ }
-+ }
-+ catch (std::exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return -1;
-+ }
-+ return 0;
-+
-+}
-diff --git a/src/post_code.cpp b/src/post_code.cpp
-new file mode 100644
-index 0000000..983eeee
---- /dev/null
-+++ b/src/post_code.cpp
-@@ -0,0 +1,109 @@
-+/*
-+// Copyright (c) 2019 Intel Corporation
-+//
-+// Licensed under the Apache License, Version 2.0 (the "License");
-+// you may not use this file except in compliance with the License.
-+// You may obtain a copy of the License at
-+//
-+// http://www.apache.org/licenses/LICENSE-2.0
-+//
-+// Unless required by applicable law or agreed to in writing, software
-+// distributed under the License is distributed on an "AS IS" BASIS,
-+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+// See the License for the specific language governing permissions and
-+// limitations under the License.
-+*/
-+#include "post_code.hpp"
-+std::vector<uint64_t> PostCode::getPostCodes(uint16_t index)
-+{
-+ std::vector<uint64_t> codes;
-+
-+ if (currentBootCycleIndex() == index)
-+ return postCodes;
-+ deserializePostCodes(fs::path(strPostCodeListPath + std::to_string(index)), codes);
-+ return codes;
-+}
-+void PostCode::savePostCodes(uint64_t code)
-+{
-+ postCodes.push_back(code);
-+ serialize(fs::path(PostCodeListPath));
-+ return;
-+}
-+
-+fs::path PostCode::serialize(const std::string& path)
-+{
-+ try
-+ {
-+ uint16_t index = currentBootCycleIndex();
-+ fs::path fullPath(path + strCurrentBootCycleIndexName);
-+ std::ofstream os(fullPath.c_str(), std::ios::binary);
-+ cereal::JSONOutputArchive oarchive(os);
-+ oarchive(index);
-+ std::ofstream osPostCodes((path + std::to_string(currentBootCycleIndex())).c_str(), std::ios::binary);
-+ cereal::JSONOutputArchive oarchivePostCodes(osPostCodes);
-+ oarchivePostCodes(postCodes);
-+ }
-+ catch (cereal::Exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return "";
-+ }
-+ catch (const fs::filesystem_error& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return "";
-+ }
-+ return path;
-+}
-+
-+bool PostCode::deserialize(const fs::path& path, uint16_t& index)
-+{
-+ try
-+ {
-+ if (fs::exists(path))
-+ {
-+ std::ifstream is(path.c_str(), std::ios::in | std::ios::binary);
-+ cereal::JSONInputArchive iarchive(is);
-+ iarchive(index);
-+ return true;
-+ }
-+ return false;
-+ }
-+ catch (cereal::Exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return false;
-+ }
-+ catch (const fs::filesystem_error& e)
-+ {
-+ return false;
-+ }
-+
-+ return false;
-+}
-+
-+bool PostCode::deserializePostCodes(const fs::path& path, std::vector<uint64_t> &codes)
-+{
-+ try
-+ {
-+ if (fs::exists(path))
-+ {
-+ std::ifstream is(path.c_str(), std::ios::in | std::ios::binary);
-+ cereal::JSONInputArchive iarchive(is);
-+ iarchive(codes);
-+ return true;
-+ }
-+ return false;
-+ }
-+ catch (cereal::Exception& e)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-+ return false;
-+ }
-+ catch (const fs::filesystem_error& e)
-+ {
-+ return false;
-+ }
-+
-+ return false;
-+}
---
-2.19.1
-
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb
index 8f2ead18a..0d612f3b3 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/state/post-code-manager_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "Phosphor post code manager"
DESCRIPTION = "Post Code Manager"
SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git"
-SRCREV = "7f50dcaa6feb66cf5307b8a0e4742a36a50eed29"
+SRCREV = "3a0444002398714c3a5539c93355c74eb184b2b1"
S = "${WORKDIR}/git"
@@ -31,4 +31,3 @@ RDEPENDS_${PN} += " \
phosphor-logging \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SRC_URI += "file://0001-Implement-post-code-manager.patch"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
index 9b94284ec..1ef186e3a 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb
@@ -7,7 +7,7 @@ inherit cmake systemd
DEPENDS = "boost sdbusplus"
PV = "0.1+git${SRCPV}"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/callback-manager"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
index 0af64698a..c19f33da2 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager/0005-Added-suport-for-multiple-user-manager-services.patch
@@ -1,4 +1,4 @@
-From a519a128b9a44b1798419bf3a653d58e266c60fb Mon Sep 17 00:00:00 2001
+From b8a8e561d7dba48f3f0a0eb34662b2450dcad35d Mon Sep 17 00:00:00 2001
From: Radivoje Jovanovic <radivoje.jovanovic@intel.com>
Date: Mon, 2 Jul 2018 19:23:25 -0700
Subject: [PATCH] Added suport for multiple user manager services
@@ -11,11 +11,11 @@ Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.co
---
Makefile.am | 5 +-
mainapp.cpp | 89 ++++++-
- user_mgr.cpp | 290 ++-------------------
+ user_mgr.cpp | 295 ++-------------------
user_mgr.hpp | 9 +-
- user_service.cpp | 781 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ user_service.cpp | 786 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
user_service.hpp | 233 +++++++++++++++++
- 6 files changed, 1139 insertions(+), 268 deletions(-)
+ 6 files changed, 1144 insertions(+), 273 deletions(-)
create mode 100644 user_service.cpp
create mode 100644 user_service.hpp
@@ -150,7 +150,7 @@ index c9da030..03c406a 100644
// Claim the bus now
bus.request_name(USER_MANAGER_BUSNAME);
diff --git a/user_mgr.cpp b/user_mgr.cpp
-index 17146e6..db6e7d5 100644
+index 2f22323..db6e7d5 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -14,26 +14,20 @@
@@ -434,7 +434,7 @@ index 17146e6..db6e7d5 100644
log<level::INFO>("User enabled/disabled state updated successfully",
entry("USER_NAME=%s", userName.c_str()),
-@@ -728,49 +570,8 @@ bool UserMgr::userLockedForFailedAttempt(const std::string &userName,
+@@ -728,54 +570,8 @@ bool UserMgr::userLockedForFailedAttempt(const std::string &userName,
UserSSHLists UserMgr::getUserAndSshGrpList()
{
@@ -462,10 +462,15 @@ index 17146e6..db6e7d5 100644
- // Any error, break the loop.
- break;
- }
+-#ifdef ENABLE_ROOT_USER_MGMT
- // Add all users whose UID >= 1000 and < 65534
- // and special UID 0.
- if ((pwp->pw_uid == 0) ||
- ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534)))
+-#else
+- // Add all users whose UID >=1000 and < 65534
+- if ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534))
+-#endif
- {
- std::string userName(pwp->pw_name);
- userList.emplace_back(userName);
@@ -486,7 +491,7 @@ index 17146e6..db6e7d5 100644
}
size_t UserMgr::getIpmiUsersCount()
-@@ -781,49 +582,14 @@ size_t UserMgr::getIpmiUsersCount()
+@@ -786,49 +582,14 @@ size_t UserMgr::getIpmiUsersCount()
bool UserMgr::isUserEnabled(const std::string &userName)
{
@@ -540,7 +545,7 @@ index 17146e6..db6e7d5 100644
}
DbusUserObj UserMgr::getPrivilegeMapperObject(void)
-@@ -1052,11 +818,9 @@ void UserMgr::initUserObjects(void)
+@@ -1057,11 +818,9 @@ void UserMgr::initUserObjects(void)
{
// All user management lock has to be based on /etc/shadow
phosphor::user::shadow::Lock lock();
@@ -554,7 +559,7 @@ index 17146e6..db6e7d5 100644
if (!userNameList.empty())
{
-@@ -1111,7 +875,8 @@ void UserMgr::initUserObjects(void)
+@@ -1116,7 +875,8 @@ void UserMgr::initUserObjects(void)
}
}
@@ -564,7 +569,7 @@ index 17146e6..db6e7d5 100644
Ifaces(bus, path, true), bus(bus), path(path)
{
UserMgrIface::allPrivileges(privMgr);
-@@ -1220,6 +985,7 @@ UserMgr::UserMgr(sdbusplus::bus::bus &bus, const char *path) :
+@@ -1225,6 +985,7 @@ UserMgr::UserMgr(sdbusplus::bus::bus &bus, const char *path) :
}
AccountPolicyIface::accountUnlockTimeout(value32);
}
@@ -616,10 +621,10 @@ index b25e9f2..c24733b 100644
"priv-user", "priv-callback"};
diff --git a/user_service.cpp b/user_service.cpp
new file mode 100644
-index 0000000..9bb602c
+index 0000000..c3c45bd
--- /dev/null
+++ b/user_service.cpp
-@@ -0,0 +1,781 @@
+@@ -0,0 +1,786 @@
+/*
+// Copyright (c) 2018 Intel Corporation
+//
@@ -735,10 +740,15 @@ index 0000000..9bb602c
+ // Any error, break the loop.
+ break;
+ }
++#ifdef ENABLE_ROOT_USER_MGMT
+ // Add all users whose UID >= 1000 and < 65534
+ // and special UID 0.
+ if ((pwp->pw_uid == 0) ||
+ ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534)))
++#else
++ // Add all users whose UID >=1000 and < 65534
++ if ((pwp->pw_uid >= 1000) && (pwp->pw_uid < 65534))
++#endif
+ {
+ std::string userName(pwp->pw_name);
+ userList.emplace_back(userName);
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
index 327be045d..f7a3a7875 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/users/phosphor-user-manager_%.bbappend
@@ -1,8 +1,9 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
#SRC_URI = "git://github.com/openbmc/phosphor-user-manager;nobranch=1"
-SRCREV = "1af1223304dbf7aaecd5f238227abee95cce8b39"
+SRCREV = "d4d655006c6179d47008d9b374debcedcc03a1c4"
+EXTRA_OECONF += "${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], '', '--disable-root_user_mgmt', d)}"
SRC_URI += " \
file://0005-Added-suport-for-multiple-user-manager-services.patch \
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
index 74ccd9754..a2c271885 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb
@@ -2,7 +2,7 @@ SUMMARY = "Virtual Media Service"
DESCRIPTION = "Virtual Media Service"
SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "4aec5d06d6adbaf53dbe7f18ea9f803eb2198b86"
+SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
S = "${WORKDIR}/git/virtual-media/"
PV = "1.0+git${SRCPV}"
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 22e1b9456..2da438914 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,2 +1,2 @@
-SRC_URI = "git://git@github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel"
-SRCREV = "2145e7b53c1d90bbf8282e05865a41c719e4c972"
+SRC_URI = "git://git@github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2"
+SRCREV = "b26d415f38684f86e19e09a8073f9d4244adcb97"