summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2019-12-16 23:21:26 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2019-12-17 00:07:50 +0300
commit4aeb24cf629a60980d4ad270fc1750754826613d (patch)
tree2b1448d35f422dfc4762616a1b9adbb8ff9d6ca0 /meta-openbmc-mods/meta-common
parent506611d226c82d05215ec3d2dab50a43a531b691 (diff)
downloadopenbmc-4aeb24cf629a60980d4ad270fc1750754826613d.tar.xz
Update to internal 2019-12-16
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common')
-rw-r--r--meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch196
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch51
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch72
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0039-AST2500-increase-boot-speed.patch40
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch141
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh67
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-sync.service11
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb20
-rw-r--r--meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-devtools/template-recipe/template-recipe.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch18
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch32
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ARM-dts-aspeed-g6-add-video-node.patch36
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0087-media-aspeed-add-aspeed-ast2600-video-engine-compati.patch29
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0088-clk-ast2600-enable-ESPICLK-always.patch30
-rw-r--r--meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0026-Add-StandbySpare-support-for-software-inventory.patch56
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend3
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-Adding-StandBySpare-for-firmware-activation.patch76
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch408
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/fwupd@.service4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend7
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch484
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend5
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch47
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch37
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Update-provisioning-mode-filter-logic.patch141
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/phosphor-u-boot-mgr/phosphor-u-boot-mgr_git.bb4
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init55
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/prov-mode-mgr/prov-mode-mgr_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/security-manager/security-manager_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/selftest/intel-self-test_git.bb2
-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.bb6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/special-mode-mgr/special-mode-mgr_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/system/callback-manager.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/virtual-media/virtual-media.bb4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend4
68 files changed, 1726 insertions, 508 deletions
diff --git a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
index 50c2cc278..802fa2bd5 100644
--- a/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
+++ b/meta-openbmc-mods/meta-common/classes/obmc-phosphor-image-common.bbclass
@@ -13,11 +13,11 @@ IMAGE_INSTALL_append = " \
dbus-sensors \
phosphor-webui \
rest-dbus-static \
+ at-scale-debug \
phosphor-pid-control \
phosphor-host-postd \
phosphor-certificate-manager \
phosphor-sel-logger \
- smbios-mdrv1 \
smbios-mdrv2 \
obmc-ikvm \
system-watchdog \
@@ -41,6 +41,7 @@ IMAGE_INSTALL_append = " \
hsbp-manager \
security-registers-check \
pch-time-sync \
+ nv-sync \
"
IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'intel-pfr-manager', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
index e76c61a15..a084c4a8c 100644
--- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0001-Add-ast2600-intel-as-a-new-board.patch
@@ -1,4 +1,4 @@
-From e02a837d388a45e4fb12c7d44eb0a1dc62140d29 Mon Sep 17 00:00:00 2001
+From 069a20560bf9efbd358503c76f043fcdd3a68a94 Mon Sep 17 00:00:00 2001
From: Vernon Mauery <vernon.mauery@intel.com>
Date: Thu, 24 Oct 2019 14:06:33 -0700
Subject: [PATCH] Add ast2600-intel as a new board
@@ -13,7 +13,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
arch/arm/mach-aspeed/ast2600/aspeed_scu_info.c | 1 +
board/aspeed/ast2600_intel/Kconfig | 13 +
board/aspeed/ast2600_intel/Makefile | 4 +
- board/aspeed/ast2600_intel/ast-espi.c | 232 ++++++++++++++
+ board/aspeed/ast2600_intel/ast-espi.c | 282 +++++++++++++++++
board/aspeed/ast2600_intel/ast-irq.c | 399 +++++++++++++++++++++++++
board/aspeed/ast2600_intel/ast-irq.h | 8 +
board/aspeed/ast2600_intel/ast-timer.c | 59 ++++
@@ -22,7 +22,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
common/autoboot.c | 10 +
common/board_r.c | 8 +-
include/configs/evb_ast2600.h | 2 +-
- 16 files changed, 1090 insertions(+), 6 deletions(-)
+ 16 files changed, 1140 insertions(+), 6 deletions(-)
create mode 100644 arch/arm/dts/ast2600-intel.dts
create mode 100644 board/aspeed/ast2600_intel/Kconfig
create mode 100644 board/aspeed/ast2600_intel/Makefile
@@ -322,10 +322,10 @@ index 000000000000..37d2f0064f38
+obj-y += ast-timer.o
diff --git a/board/aspeed/ast2600_intel/ast-espi.c b/board/aspeed/ast2600_intel/ast-espi.c
new file mode 100644
-index 000000000000..2778d7b67d54
+index 000000000000..8dc12d7c9fe8
--- /dev/null
+++ b/board/aspeed/ast2600_intel/ast-espi.c
-@@ -0,0 +1,232 @@
+@@ -0,0 +1,282 @@
+/*
+ * Copyright 2018 Intel Corporation
+ *
@@ -338,18 +338,20 @@ index 000000000000..2778d7b67d54
+#include <common.h>
+#include <asm/io.h>
+
-+#define AST_LPC_BASE 0x1e6e9000
-+#define AST_ESPI_BASE 0x1e6ee000
-+#define AST_SCU_BASE 0x1e6e2000
-+#define AST_SCU_HW_STRAP1 0x510
-+#define SCU_HW_STRAP_ESPI_ENABLED 0x40
++#define AST_LPC_BASE 0x1e6e9000
++#define AST_ESPI_BASE 0x1e6ee000
++#define AST_SCU_BASE 0x1e6e2000
++#define AST_SCU_HW_STRAP1 0x510
++#define SCU_HW_STRAP_ESPI_ENABLED 0x40
+
-+#define DEBUG_ESPI_ENABLED 1
-+#ifdef DEBUG_ESPI_ENABLED
-+#define DBG_ESPI debug
++#define USE_HW_HANDSHAKE 1
++#define DEBUG_ESPI_ENABLED 1
++#if DEBUG_ESPI_ENABLED
++#define DBG_ESPI printf
+#else
+#define DBG_ESPI(...)
+#endif
++
+/* eSPI controller registers */
+#define ESPI000 0x000 /* Engine Control. */
+#define ESPI004 0x004 /* Engine Status. */
@@ -376,6 +378,7 @@ index 000000000000..2778d7b67d54
+#define ESPI070 0x070 /* DMA Addr of Flash Channel Tx pkt. */
+#define ESPI074 0x074 /* Control of Flash Channel Tx pkt. */
+#define ESPI078 0x078 /* Data port of Flash Channel Tx pkt. */
++#define ESPI080 0x080 /* Engine Control 2. */
+#define ESPI084 0x084 /* Mapping Src Addr of Peripheral Channel Rx pkt. */
+#define ESPI088 0x088 /* Mapping Tgt Addr of Peripheral Channel Rx pkt. */
+#define ESPI08C 0x08C /* Mapping Addr Mask of Peripheral Channel Rx pkt. */
@@ -416,35 +419,63 @@ index 000000000000..2778d7b67d54
+#define ESPICFG818 0x818 /* Mapping Addr Mask of Peripheral Channel Rx pkt */
+
+/* ESPI000 bits */
-+#define AST_ESPI_OOB_CHRDY (1 << 4)
-+#define AST_ESPI_FLASH_SW_CHRDY (0x1 << 7)
-+#define AST_ESPI_FLASH_SW_READ (0x1 << 10)
++#define AST_ESPI_OOB_CHRDY BIT(4)
++#define AST_ESPI_FLASH_SW_CHRDY BIT(7)
++#define AST_ESPI_FLASH_SW_READ BIT(10)
+
+/* ESPI00C bits (Interrupt Enable) */
-+#define AST_ESPI_IEN_SYS_EV (1 << 8)
-+#define AST_ESPI_IEN_GPIO_EV (1 << 9)
++#define AST_ESPI_IEN_HW_RST BIT(31)
++#define AST_ESPI_IEN_SYS1_EV BIT(22)
++#define AST_ESPI_IEN_SYS_EV BIT(8)
++#define AST_ESPI_IEN_GPIO_EV BIT(9)
+
+/* ESPI008 bits ISR */
-+#define AST_ESPI_VW_SYS_EVT (1 << 8)
-+#define AST_ESPI_VW_SYS_EV1 (1 << 22)
++#define AST_ESPI_VW_SYS_EVT BIT(8)
++#define AST_ESPI_VW_SYS_EV1 BIT(9)
++#define AST_ESPI_HW_RST BIT(31)
++
++/* ESPI080 bits */
++#define AST_ESPI_AUTO_ACK_HOST_RST_WARN BIT(2)
++#define AST_ESPI_AUTO_ACK_OOB_RST_WARN BIT(1)
++#define AST_ESPI_AUTO_ACK_SUS_WARN BIT(0)
+
+/* ESPI098 and ESPI11C bits */
-+#define AST_ESPI_OOB_RST_WARN (1 << 6)
-+#define AST_ESPI_HOST_RST_WARN (1 << 8)
-+#define AST_ESPI_OOB_RST_ACK (1 << 16)
-+#define AST_ESPI_SL_BT_DONE (1 << 20)
-+#define AST_ESPI_SL_BT_STATUS (1 << 23)
-+#define AST_ESPI_HOST_RST_ACK (1 << 27)
++#define AST_ESPI_OOB_RST_WARN BIT(6)
++#define AST_ESPI_HOST_RST_WARN BIT(8)
++#define AST_ESPI_PLTRSTN BIT(5)
++#define AST_ESPI_OOB_RST_ACK BIT(16)
++#define AST_ESPI_SL_BT_DONE BIT(20)
++#define AST_ESPI_SL_BT_STATUS BIT(23)
++#define AST_ESPI_HOST_RST_ACK BIT(27)
+
+/* ESPI104 bits */
-+#define AST_ESPI_SUS_WARN (1 << 0)
-+#define AST_ESPI_SUS_ACK (1 << 20)
++#define AST_ESPI_SUS_WARN BIT(0)
++#define AST_ESPI_SUS_ACK BIT(20)
+
+/* LPC chip ID */
-+#define SCR0SIO 0x170
-+#define IRQ_SRC_ESPI 74 /* IRQ 74 */
++#define SCR0SIO 0x170
++#define IRQ_SRC_ESPI 74 /* IRQ 74 */
+
-+static int espi_irq_handler(struct pt_regs *regs)
++static void espi_handshake_ack(void)
++{
++ /* IRQ only serviced if strapped, so no strap check */
++ if (!(readl(AST_ESPI_BASE + ESPI098) & AST_ESPI_SL_BT_STATUS)) {
++ DBG_ESPI("Setting espi slave boot done\n");
++ uint32_t v = readl(AST_ESPI_BASE + ESPI098) |
++ AST_ESPI_SL_BT_STATUS | AST_ESPI_SL_BT_DONE;
++ writel(v, AST_ESPI_BASE + ESPI098);
++ }
++
++ uint32_t sys1_event = readl(AST_ESPI_BASE + ESPI104);
++ if (sys1_event & AST_ESPI_SUS_WARN &&
++ !(sys1_event & AST_ESPI_SUS_ACK)) {
++ DBG_ESPI("Boot SUS_WARN, evt: 0x%08x\n", sys1_event);
++ writel(sys1_event | AST_ESPI_SUS_ACK, AST_ESPI_BASE + ESPI104);
++ DBG_ESPI("SUS_WARN sent ack\n");
++ }
++}
++
++int espi_irq_handler(struct pt_regs *regs)
+{
+ uint32_t irq_status = readl(AST_ESPI_BASE + ESPI008);
+
@@ -456,22 +487,29 @@ index 000000000000..2778d7b67d54
+
+ DBG_ESPI("sys_status : 0x%08X\n", sys_status);
+ if (sys_status & AST_ESPI_HOST_RST_WARN) {
-+ DBG_ESPI("HOST_RST_WARN ev: %08X\n", sys_event);
++ DBG_ESPI("HOST_RST_WARN evt: 0x%08X\n", sys_event);
+ if (sys_event & AST_ESPI_HOST_RST_WARN) {
-+ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
-+ | AST_ESPI_HOST_RST_ACK;
++ uint32_t v = readl(AST_ESPI_BASE + ESPI098) |
++ AST_ESPI_HOST_RST_ACK;
+ writel(v, AST_ESPI_BASE + ESPI098);
++ DBG_ESPI("HOST_RST_WARN sent ack\n");
+ }
+ }
+ if (sys_status & AST_ESPI_OOB_RST_WARN) {
-+ DBG_ESPI("OOB_RST_WARN ev: %08X\n", sys_event);
++ DBG_ESPI("OOB_RST_WARN evt: 0x%08X\n", sys_event);
+ if (sys_event & AST_ESPI_OOB_RST_WARN) {
-+ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
-+ | AST_ESPI_OOB_RST_ACK;
++ uint32_t v = readl(AST_ESPI_BASE + ESPI098) |
++ AST_ESPI_OOB_RST_ACK;
+ writel(v, AST_ESPI_BASE + ESPI098);
++ DBG_ESPI("OOB_RST_WARN sent ack\n");
+ }
+ }
-+ writel(sys_status, AST_ESPI_BASE + ESPI11C); // clear status
++ if (sys_status & AST_ESPI_PLTRSTN) {
++ DBG_ESPI("PLTRSTN: %c, evt: 0x%08X\n",
++ (sys_event & AST_ESPI_PLTRSTN) ? '1' : '0',
++ sys_event);
++ }
++ writel(sys_status, AST_ESPI_BASE + ESPI11C); /* clear status */
+ }
+
+ if (irq_status & AST_ESPI_VW_SYS_EV1) {
@@ -480,35 +518,31 @@ index 000000000000..2778d7b67d54
+
+ DBG_ESPI("sys1_status : 0x%08X\n", sys1_status);
+ if (sys1_status & AST_ESPI_SUS_WARN) {
-+ DBG_ESPI("SUS WARN ev: %08X\n", sys1_event);
++ DBG_ESPI("SUS WARN evt: 0x%08X\n", sys1_event);
+ if (sys1_event & AST_ESPI_SUS_WARN) {
-+ uint32_t v = readl(AST_ESPI_BASE + ESPI104)
-+ | AST_ESPI_SUS_ACK;
++ uint32_t v = readl(AST_ESPI_BASE + ESPI104) |
++ AST_ESPI_SUS_ACK;
+ writel(v, AST_ESPI_BASE + ESPI104);
++ DBG_ESPI("SUS_WARN sent ack\n");
+ }
+ }
-+ writel(sys1_status, AST_ESPI_BASE + ESPI12C); // clear status
++ writel(sys1_status, AST_ESPI_BASE + ESPI12C); /* clear status */
+ }
-+ writel(irq_status, AST_ESPI_BASE + ESPI008); // clear irq_status
-+ return 0;
-+}
+
-+static void espi_handshake_ack(void)
-+{
-+ // IRQ only serviced if strapped, so no strap check
-+ if (!(readl(AST_ESPI_BASE + ESPI098) & AST_ESPI_SL_BT_STATUS)) {
-+ DBG_ESPI("Setting espi slave boot done\n");
-+ uint32_t v = readl(AST_ESPI_BASE + ESPI098)
-+ | AST_ESPI_SL_BT_STATUS | AST_ESPI_SL_BT_DONE;
-+ writel(v, AST_ESPI_BASE + ESPI098);
-+ }
++ if (irq_status & AST_ESPI_HW_RST) {
++ uint32_t v = readl(AST_ESPI_BASE + ESPI000) & 0x00ffffffff;
++ writel(v, AST_ESPI_BASE + ESPI000);
++ v |= 0xff000000;
++ writel(v, AST_ESPI_BASE + ESPI000);
++
++ DBG_ESPI("HW_RESET\n");
+
-+ if (readl(AST_ESPI_BASE + ESPI104) & AST_ESPI_SUS_WARN) {
-+ DBG_ESPI("Boot SUS WARN set %08x\n",
-+ readl(AST_ESPI_BASE + ESPI104));
-+ uint32_t v = readl(AST_ESPI_BASE + ESPI104) | AST_ESPI_SUS_ACK;
-+ writel(v, AST_ESPI_BASE + ESPI104);
++ espi_handshake_ack();
+ }
++
++ writel(irq_status, AST_ESPI_BASE + ESPI008); /* clear irq_status */
++
++ return 0;
+}
+
+void espi_init(void)
@@ -517,43 +551,59 @@ index 000000000000..2778d7b67d54
+ & SCU_HW_STRAP_ESPI_ENABLED) {
+ uint32_t v;
+
++ DBG_ESPI("espi init\n");
++
++ writel(0xff000000, AST_SCU_BASE + 0x454); /* driving strength */
++
+ /* Block flash access from Host */
+ v = readl(AST_ESPI_BASE + ESPI000) & ~AST_ESPI_FLASH_SW_CHRDY;
+ v |= AST_ESPI_FLASH_SW_READ | AST_ESPI_OOB_CHRDY;
+ writel(v, AST_ESPI_BASE + ESPI000);
+
-+ /* Set SIO register 0x28 to 0xa8 as a faked ASPEED ChipID for
-+ * BIOS using in eSPI mode */
++ /*
++ * Set SIO register 0x28 to 0xa8 as a faked ASPEED ChipID for
++ * BIOS using in eSPI mode.
++ */
+ v = readl(AST_LPC_BASE + SCR0SIO) & ~0x000000ff;
+ writel(v, AST_LPC_BASE + SCR0SIO);
+ v = readl(AST_LPC_BASE + SCR0SIO) | 0xa8;
+ writel(v, AST_LPC_BASE + SCR0SIO);
+
-+ v = readl(AST_ESPI_BASE + ESPI000) | AST_ESPI_OOB_CHRDY;
-+ writel(v, AST_ESPI_BASE + ESPI000);
++#if USE_HW_HANDSHAKE
++ v = readl(AST_ESPI_BASE + ESPI098) |
++ AST_ESPI_SL_BT_STATUS | AST_ESPI_SL_BT_DONE;
++ writel(v, AST_ESPI_BASE + ESPI098);
++
++ return;
++#endif
++
++ v = readl(AST_ESPI_BASE + ESPI080);
++ v &= ~(AST_ESPI_AUTO_ACK_HOST_RST_WARN |
++ AST_ESPI_AUTO_ACK_OOB_RST_WARN |
++ AST_ESPI_AUTO_ACK_SUS_WARN);
++ writel(v, AST_ESPI_BASE + ESPI080); /* Disable auto H/W ack */
+
+ writel(0, AST_ESPI_BASE + ESPI110);
+ writel(0, AST_ESPI_BASE + ESPI114);
-+ writel(AST_ESPI_HOST_RST_WARN | AST_ESPI_OOB_RST_WARN,
-+ AST_ESPI_BASE + ESPI118);
-+ writel(AST_ESPI_HOST_RST_WARN | AST_ESPI_OOB_RST_WARN,
-+ AST_ESPI_BASE + ESPI094);
++ writel(AST_ESPI_HOST_RST_WARN | AST_ESPI_OOB_RST_WARN |
++ AST_ESPI_PLTRSTN, AST_ESPI_BASE + ESPI118);
++ writel(AST_ESPI_HOST_RST_WARN | AST_ESPI_OOB_RST_WARN |
++ AST_ESPI_PLTRSTN, AST_ESPI_BASE + ESPI094);
+
+ writel(AST_ESPI_SUS_WARN,
-+ AST_ESPI_BASE + ESPI120); // int type 0 susp warn
++ AST_ESPI_BASE + ESPI120); /* int type 0 susp warn */
+ writel(0, AST_ESPI_BASE + ESPI124);
+ writel(0, AST_ESPI_BASE + ESPI128);
+ writel(AST_ESPI_SUS_WARN,
-+ AST_ESPI_BASE
-+ + ESPI100); // Enable sysev1 ints for susp warn
++ AST_ESPI_BASE +
++ ESPI100); /* Enable sysev1 ints for susp warn */
+
-+ writel(AST_ESPI_IEN_SYS_EV,
-+ AST_ESPI_BASE + ESPI00C); // Enable only sys events
++ writel(AST_ESPI_IEN_HW_RST | AST_ESPI_IEN_SYS1_EV |
++ AST_ESPI_IEN_SYS_EV, AST_ESPI_BASE + ESPI00C);
+
+ espi_handshake_ack();
+
+ irq_install_handler(IRQ_SRC_ESPI, espi_irq_handler, NULL);
-+
+ } else {
+ DBG_ESPI("No espi strap\n");
+ }
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch
new file mode 100644
index 000000000..a1a8acf81
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0003-ast2600-intel-layout-environment-addr.patch
@@ -0,0 +1,51 @@
+From e074cf61bd6a726c8cb513336507047ece5423d0 Mon Sep 17 00:00:00 2001
+From: Kuiying Wang <kuiying.wang@intel.com>
+Date: Thu, 12 Dec 2019 12:54:18 +0800
+Subject: [PATCH] ast2600: intel-layout-environment-addr
+
+Tested:
+Both kernel and u-boot work at the area /dev/mtd/u-boot-env
+
+Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
+---
+ include/configs/aspeed-common.h | 5 ++++-
+ include/configs/evb_ast2600_spl.h | 2 +-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/include/configs/aspeed-common.h b/include/configs/aspeed-common.h
+index d1eb468..8ad9deb 100644
+--- a/include/configs/aspeed-common.h
++++ b/include/configs/aspeed-common.h
+@@ -56,12 +56,15 @@
+ #define CONFIG_BOOTCOMMAND "bootm 20080000"
+ #endif
+ #define CONFIG_ENV_OVERWRITE
++#define CONFIG_ENV_OFFSET 0x2400000
++#define CONFIG_ENV_SIZE 0x10000
++#define CONFIG_ENV_SECT_SIZE (4 << 10)
+
+ #define CONFIG_SYS_BOOTM_LEN (0x800000 * 2)
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+ "verify=yes\0" \
+- "spi_dma=no\0" \
++ "spi_dma=yes\0" \
+ ""
+
+ /*
+diff --git a/include/configs/evb_ast2600_spl.h b/include/configs/evb_ast2600_spl.h
+index 8bbd6e1..8529f46 100644
+--- a/include/configs/evb_ast2600_spl.h
++++ b/include/configs/evb_ast2600_spl.h
+@@ -19,7 +19,7 @@
+
+ /* Environment */
+ #define CONFIG_ENV_SIZE 0x10000
+-#define CONFIG_ENV_OFFSET 0x90000
++#define CONFIG_ENV_OFFSET 0x2400000
+ #define CONFIG_ENV_SECT_SIZE (4 << 10)
+
+ #ifdef CONFIG_SPL_TINY
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch
new file mode 100644
index 000000000..5522d5f6c
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0021-AST2600-Enable-host-searial-port-clock-configuration.patch
@@ -0,0 +1,72 @@
+From ccfc20ceb2931e84ffb02b01099ccb7610b44d9c Mon Sep 17 00:00:00 2001
+From: Kuiying Wang <kuiying.wang@intel.com>
+Date: Tue, 10 Dec 2019 14:58:10 +0800
+Subject: [PATCH] AST2600: Enable host searial port clock configuration in
+ u-boot
+
+In u-boot could read env variable "hostsearialcfg" and set the corresponding
+clock for host searail port.
+
+Tested:
+setenv hostsearialcfg 1, speed is set to 192Mhz (baud rate 921600)
+other value, speed is set to 24Mhz(baud rate 115200)
+by default is 24Mhz.
+
+Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
+---
+ board/aspeed/ast2600_intel/intel.c | 36 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
+index 100eb1e..eb6fbaf 100644
+--- a/board/aspeed/ast2600_intel/intel.c
++++ b/board/aspeed/ast2600_intel/intel.c
+@@ -35,9 +35,45 @@ int gpio_abort(void)
+ return value <= 0 ? 0 : 1;
+ }
+
++#define SCU_BASE 0x1E6E2000
++#define SCU_338 0x338 //Generate UART 24 MHz Reference from UXCLK
++#define SCU_33C 0x33c //Generate UART 24 MHz Reference from HUXCLK
++#define SCU_338_R_VALUE_192MHZ 0x8e
++#define SCU_338_N_VALUE_192MHZ 0x3c3
++#define SCU_338_R_VALUE_24MHZ 0x06
++#define SCU_338_N_VALUE_24MHZ 0x145
++#define HOST_SERIAL_HIGH_SPEED_192MHZ 1
++#define R_VALUE_BITS 8
++#define V_VALUE_BITS 10
++#define R_V_VALUE_MASK (1 << (R_VALUE_BITS + V_VALUE_BITS))
++
+ int misc_init_r(void)
+ {
+ /* This is called near the end of the _r init sequence */
++ /* By default host serail is set 24Mhz */
++ uint32_t host_serial_cfg = 0;
++ char *host_serial_cfg_txt = NULL;
++
++ /* Config the uart clock source based on environment configuration */
++ host_serial_cfg_txt = env_get("hostserialcfg");
++
++ if (host_serial_cfg_txt != NULL)
++ host_serial_cfg = simple_strtoul(host_serial_cfg_txt, NULL, 16);
++
++ if (host_serial_cfg > HOST_SERIAL_HIGH_SPEED_192MHZ || host_serial_cfg < 0) {
++ printf("Invalid hostserialcfg %x, 24Mhz is set by default!\n", host_serial_cfg);
++ host_serial_cfg = 0;
++ }
++
++ if (host_serial_cfg & HOST_SERIAL_HIGH_SPEED_192MHZ) {
++ writel((readl(SCU_BASE | SCU_338) & R_V_VALUE_MASK) |
++ (SCU_338_N_VALUE_192MHZ << R_VALUE_BITS) | SCU_338_R_VALUE_192MHZ,
++ SCU_BASE | SCU_338);
++ } else {
++ writel((readl(SCU_BASE | SCU_338) & R_V_VALUE_MASK) |
++ (SCU_338_N_VALUE_24MHZ << R_VALUE_BITS) | SCU_338_R_VALUE_24MHZ,
++ SCU_BASE | SCU_338);
++ }
+
+ return 0;
+ }
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0039-AST2500-increase-boot-speed.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0039-AST2500-increase-boot-speed.patch
new file mode 100644
index 000000000..ce36b580e
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0039-AST2500-increase-boot-speed.patch
@@ -0,0 +1,40 @@
+From 1e9a4afdfa995e924f74139f620e8b2f985a705f Mon Sep 17 00:00:00 2001
+From: James Feist <james.feist@linux.intel.com>
+Date: Tue, 10 Dec 2019 16:21:24 -0800
+Subject: [PATCH 1/1] AST2500 increase boot speed
+
+This hardcodes the IOMODE to x2 as that is the fastest
+we support.
+
+Signed-off-by: James Feist <james.feist@linux.intel.com>
+---
+ arch/arm/mach-aspeed/flash.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/mach-aspeed/flash.c b/arch/arm/mach-aspeed/flash.c
+index d33fb9e0fe..31d2ef6001 100644
+--- a/arch/arm/mach-aspeed/flash.c
++++ b/arch/arm/mach-aspeed/flash.c
+@@ -730,7 +730,7 @@ static ulong flash_get_size (ulong base, flash_info_t *info)
+ ulID = ((ulong)ch[0]) | ((ulong)ch[1] << 8) | ((ulong)ch[2] << 16) ;
+ info->flash_id = ulID;
+
+-// printf("SPI Flash ID: %x \n", ulID);
++ printf("SPI Flash ID: %x \n", ulID);
+
+ /* init default */
+ info->iomode = IOMODEx1;
+@@ -1258,6 +1258,10 @@ static ulong flash_get_size (ulong base, flash_info_t *info)
+ } /* JDEC */
+ }
+
++ info->readcmd = 0xbb;
++ info->dualport = 1;
++ info->iomode = IOMODEx2_dummy;
++
+ sector = base;
+ for (j = 0; j < info->sector_count; j++) {
+
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch
deleted file mode 100644
index 683178054..000000000
--- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/files/0102-Add-espi-polling-check.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From ea6dad13d4d4b8c7a39829f75425290447e0f148 Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
-Date: Tue, 12 Nov 2019 16:46:01 -0800
-Subject: [PATCH] Add espi polling check
-
-Since interrupt in u-boot isn't working so this commit adds espi
-polling check into cli as a WA to handle host espi events.
-
-This is a temporary WA.
-
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
----
- board/aspeed/ast2600_intel/ast-espi.c | 24 ++++++++++++++++++------
- common/console.c | 3 +++
- 2 files changed, 21 insertions(+), 6 deletions(-)
-
-diff --git a/board/aspeed/ast2600_intel/ast-espi.c b/board/aspeed/ast2600_intel/ast-espi.c
-index 2778d7b67d54..c88098efcdb5 100644
---- a/board/aspeed/ast2600_intel/ast-espi.c
-+++ b/board/aspeed/ast2600_intel/ast-espi.c
-@@ -18,7 +18,7 @@
-
- #define DEBUG_ESPI_ENABLED 1
- #ifdef DEBUG_ESPI_ENABLED
--#define DBG_ESPI debug
-+#define DBG_ESPI printf
- #else
- #define DBG_ESPI(...)
- #endif
-@@ -116,11 +116,13 @@
- #define SCR0SIO 0x170
- #define IRQ_SRC_ESPI 74 /* IRQ 74 */
-
--static int espi_irq_handler(struct pt_regs *regs)
-+int espi_irq_handler(struct pt_regs *regs)
- {
- uint32_t irq_status = readl(AST_ESPI_BASE + ESPI008);
-
-+#if 0
- DBG_ESPI("ISR irq_status : 0x%08X\n", irq_status);
-+#endif
-
- if (irq_status & AST_ESPI_VW_SYS_EVT) {
- uint32_t sys_status = readl(AST_ESPI_BASE + ESPI11C);
-@@ -128,19 +130,21 @@ static int espi_irq_handler(struct pt_regs *regs)
-
- DBG_ESPI("sys_status : 0x%08X\n", sys_status);
- if (sys_status & AST_ESPI_HOST_RST_WARN) {
-- DBG_ESPI("HOST_RST_WARN ev: %08X\n", sys_event);
-+ DBG_ESPI("HOST_RST_WARN evt: 0x%08X\n", sys_event);
- if (sys_event & AST_ESPI_HOST_RST_WARN) {
- uint32_t v = readl(AST_ESPI_BASE + ESPI098)
- | AST_ESPI_HOST_RST_ACK;
- writel(v, AST_ESPI_BASE + ESPI098);
-+ DBG_ESPI("HOST_RST_WARN sent ack\n");
- }
- }
- if (sys_status & AST_ESPI_OOB_RST_WARN) {
-- DBG_ESPI("OOB_RST_WARN ev: %08X\n", sys_event);
-+ DBG_ESPI("OOB_RST_WARN evt: 0x%08X\n", sys_event);
- if (sys_event & AST_ESPI_OOB_RST_WARN) {
- uint32_t v = readl(AST_ESPI_BASE + ESPI098)
- | AST_ESPI_OOB_RST_ACK;
- writel(v, AST_ESPI_BASE + ESPI098);
-+ DBG_ESPI("OOB_RST_WARN sent ack\n");
- }
- }
- writel(sys_status, AST_ESPI_BASE + ESPI11C); // clear status
-@@ -152,16 +156,19 @@ static int espi_irq_handler(struct pt_regs *regs)
-
- DBG_ESPI("sys1_status : 0x%08X\n", sys1_status);
- if (sys1_status & AST_ESPI_SUS_WARN) {
-- DBG_ESPI("SUS WARN ev: %08X\n", sys1_event);
-+ DBG_ESPI("SUS WARN evt: 0x%08X\n", sys1_event);
- if (sys1_event & AST_ESPI_SUS_WARN) {
- uint32_t v = readl(AST_ESPI_BASE + ESPI104)
- | AST_ESPI_SUS_ACK;
- writel(v, AST_ESPI_BASE + ESPI104);
-+ DBG_ESPI("SUS_WARN sent ack\n");
- }
- }
- writel(sys1_status, AST_ESPI_BASE + ESPI12C); // clear status
- }
-+
- writel(irq_status, AST_ESPI_BASE + ESPI008); // clear irq_status
-+
- return 0;
- }
-
-@@ -176,7 +183,7 @@ static void espi_handshake_ack(void)
- }
-
- if (readl(AST_ESPI_BASE + ESPI104) & AST_ESPI_SUS_WARN) {
-- DBG_ESPI("Boot SUS WARN set %08x\n",
-+ DBG_ESPI("Boot SUS WARN set 0x%08x\n",
- readl(AST_ESPI_BASE + ESPI104));
- uint32_t v = readl(AST_ESPI_BASE + ESPI104) | AST_ESPI_SUS_ACK;
- writel(v, AST_ESPI_BASE + ESPI104);
-@@ -189,6 +196,8 @@ void espi_init(void)
- & SCU_HW_STRAP_ESPI_ENABLED) {
- uint32_t v;
-
-+ DBG_ESPI("espi init\n");
-+
- /* Block flash access from Host */
- v = readl(AST_ESPI_BASE + ESPI000) & ~AST_ESPI_FLASH_SW_CHRDY;
- v |= AST_ESPI_FLASH_SW_READ | AST_ESPI_OOB_CHRDY;
-@@ -226,6 +235,9 @@ void espi_init(void)
-
- irq_install_handler(IRQ_SRC_ESPI, espi_irq_handler, NULL);
-
-+#if 1
-+ espi_irq_handler(NULL);
-+#endif
- } else {
- DBG_ESPI("No espi strap\n");
- }
-diff --git a/common/console.c b/common/console.c
-index 0b0dd76256c7..90cdf7701c9d 100644
---- a/common/console.c
-+++ b/common/console.c
-@@ -308,6 +308,8 @@ int serial_printf(const char *fmt, ...)
- return i;
- }
-
-+extern int espi_irq_handler(struct pt_regs *regs);
-+
- int fgetc(int file)
- {
- if (file < MAX_FILES) {
-@@ -315,6 +317,7 @@ int fgetc(int file)
- * Effectively poll for input wherever it may be available.
- */
- for (;;) {
-+ espi_irq_handler(NULL);
- WATCHDOG_RESET();
- #if CONFIG_IS_ENABLED(CONSOLE_MUX)
- /*
---
-2.7.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
index 13b7d45e5..376b785c1 100644
--- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
@@ -6,5 +6,6 @@ FILESEXTRAPATHS_append_intel-ast2600:= "${THISDIR}/files:"
SRC_URI_append_intel-ast2600 = " \
file://intel.cfg \
file://0001-Add-ast2600-intel-as-a-new-board.patch \
- file://0102-Add-espi-polling-check.patch \
+ file://0021-AST2600-Enable-host-searial-port-clock-configuration.patch \
+ file://0003-ast2600-intel-layout-environment-addr.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
index 675c9493b..a536dce34 100644
--- a/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-bsp/u-boot/u-boot-aspeed_%.bbappend
@@ -38,6 +38,7 @@ SRC_URI_append_intel-ast2500 = " \
file://0036-Re-Enable-KCS.patch \
file://0037-aspeed-ast-scu.c-fix-MAC1LINK-and-MAC2LINK-pin-pads-.patch \
file://0038-Increase-default-fan-speed-for-cooper-city.patch \
+ file://0039-AST2500-increase-boot-speed.patch \
"
PFR_SRC_URI = " \
file://0022-u-boot-env-change-for-PFR-image.patch \
diff --git a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service
index de607f1a7..e8b563850 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service
+++ b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.service
@@ -1,6 +1,6 @@
[Unit]
Description=Check for AC boot
-After=settings.service
+After=xyz.openbmc_project.Settings.service
[Service]
Type=oneshot
diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
index b57ae1ca5..1f7fbe73b 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb
@@ -12,7 +12,7 @@ DEPENDS = "sdbusplus openssl libpam libgpiod"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
-SRC_URI = "git://git@github.com/Intel-BMC/asd;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/asd;protocol=git"
SRCREV = "1.4.2"
inherit useradd
diff --git a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
index 21ae0bff7..9d3883d3a 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb
@@ -12,7 +12,7 @@ EXTRA_OECMAKE = "-DCRASHDUMP_BUILD_UT=ON"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=26bb6d0733830e7bab774914a8f8f20a"
-SRC_URI = "git://git@github.com/Intel-BMC/crashdump;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/crashdump;protocol=git"
SRCREV = "0.4"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
index ca5da9598..3073128e0 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
+++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh
@@ -48,7 +48,13 @@ if [ $# -eq 0 ]; then
# set DEFURI in $HOME/.fwupd.defaults
URI="$DEFURI"
else
- URI="$1"
+ if [[ "$1" == *"/"* ]]; then
+ URI=$1 # local file
+ local_file=1 ;
+ else
+ URI="file:////tmp/images/$1/image-runtime"
+ local_file=0 ;
+ fi
fi
PROTO=$(echo "$URI" | sed 's,\([a-z]*\)://.*$,\1,')
@@ -60,10 +66,12 @@ else
REMOTE_PATH=$(echo "$REMOTE" | sed 's,[^/]*/\(.*\)$,\1,')
fi
LOCAL_PATH="/tmp/$(basename $REMOTE_PATH)"
+echo "URI=$URI"
echo "PROTO=$PROTO"
echo "REMOTE=$REMOTE"
echo "REMOTE_HOST=$REMOTE_HOST"
echo "REMOTE_PATH=$REMOTE_PATH"
+echo "LOCAL_PATH=$LOCAL_PATH"
if [ ! -e $LOCAL_PATH ] || [ $(stat -c %s $LOCAL_PATH) -eq 0 ]; then
echo "Download '$REMOTE_PATH' from $PROTO $REMOTE_HOST $REMOTE_PATH"
case "$PROTO" in
@@ -105,25 +113,37 @@ fi
# PFR image update section
# this file being created at build time for PFR images
-if [ -e /usr/share/pfr ]
-then
+if [ -e /usr/share/pfr ] && [ $local_file -eq 0 ]; then
+ if [ -e /tmp/fwupd_progress ]; then
+ echo "Firmware update already in progress"
+ exit 1
+ fi
+touch /tmp/fwupd_progress
+
# read the image type from the uploaded image
# Byte at location 0x8 gives image type
-img_type=$(hexdump -s 8 -n 1 $LOCAL_PATH | cut -b12,1 | sed '2d;')
+img_type=$(busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/$1 xyz.openbmc_project.Software.Version Purpose | cut -d " " -f 2 | cut -d "." -f 6 | sed 's/.\{1\}$//')
+img_target=$(busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/$1 xyz.openbmc_project.Software.Activation RequestedActivation | cut -d " " -f 2| cut -d "." -f 6 | sed 's/.\{1\}$//')
+
echo "image-type=$img_type"
+echo "image-target=$img_target"
# BMC image - max size 32MB
-if [ "$img_type" = '04' ]; then
+if [ "$img_type" = 'BMC' ]; then
echo "BMC firmware image"
# 32MB - 33554432
img_size=33554432
- upd_intent_val=0x08
+ if [ "$img_target" = 'StandbySpare' ]; then
+ upd_intent_val=0x10
+ else
+ upd_intent_val=0x08
+ fi
# page is at 4KB boundary
img_page_offset=0
erase_offset=0
blk_cnt=0x200
# CPLD image- max size 4MB
-elif [ "$img_type" = '00' ]; then
+elif [ "$img_type" = 'Other' ]; then
echo "CPLD firmware image"
# 4MB - 4194304
img_size=4194304
@@ -134,11 +154,15 @@ elif [ "$img_type" = '00' ]; then
erase_offset=0x3000000
blk_cnt=0x40
# BIOS image- max size 16MB
-elif [ "$img_type" = '02' ]; then
+elif [ "$img_type" = 'Host' ]; then
echo "BIOS firmware image"
# 16MB- 16777216
img_size=16777216
- upd_intent_val=0x01
+ if [ "$img_target" = 'StandbySpare' ]; then
+ upd_intent_val=0x02
+ else
+ upd_intent_val=0x01
+ fi
# dd command accepts the offset in decimal
# below is the page offset in 4KB boundary
img_page_offset=8192
@@ -146,18 +170,21 @@ elif [ "$img_type" = '02' ]; then
blk_cnt=0x100
else
echo "${img_type}:Unknown image type, exiting the firmware update script"
+ rm -rf /tmp/fwupd_progress
exit 1
fi
-# do a quick sanity check on the image
+# do a size check on the image
if [ $(stat -c "%s" "$LOCAL_PATH") -gt $img_size ]; then
echo "Update file "$LOCAL_PATH" is bigger than the supported image size"
+ rm -rf /tmp/fwupd_progress
exit 1
fi
TGT="/dev/mtd/image-stg"
-echo "Updating $(basename $TGT)"
+echo "Update $(basename $TGT)"
flash_erase $TGT $erase_offset $blk_cnt
+sync
echo "Writing $(stat -c "%s" "$LOCAL_PATH") bytes"
# cat "$LOCAL_PATH" > "$TGT"
dd bs=4k seek=$img_page_offset if=$LOCAL_PATH of=$TGT
@@ -165,8 +192,12 @@ sync
echo "Written $(stat -c "%s" "$LOCAL_PATH") bytes"
# remove the updated image from /tmp
rm -f $LOCAL_PATH
-echo "Setting update intent in PFR CPLD"
+echo "Writing $upd_intent_val to update intent register in PFR RoT"
sleep 5 # delay for sync and to get the above echo messages
+
+# remove the file which used as lock
+rm -rf /tmp/fwupd_progress
+
# write to PFRCPLD about BMC update intent.
i2cset -y 4 0x38 0x13 $upd_intent_val
@@ -197,11 +228,13 @@ fi
BOOTADDR=$(fw_printenv bootcmd | awk '{print $2}')
TGT="/dev/mtd/image-a"
-case "$BOOTADDR" in
- 20080000) TGT="/dev/mtd/image-b"; BOOTADDR="22480000" ;;
- 22480000) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;;
- *) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;;
-esac
+if [ ! -e /usr/share/pfr ]; then
+ case "$BOOTADDR" in
+ 20080000) TGT="/dev/mtd/image-b"; BOOTADDR="22480000" ;;
+ 22480000) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;;
+ *) TGT="/dev/mtd/image-a"; BOOTADDR="20080000" ;;
+ esac
+fi
echo "Updating $(basename $TGT) (use bootm $BOOTADDR)"
flash_erase $TGT 0 0
if [ $? -ne 0 ]; then
diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb
index 5aab3db34..faa08a58c 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_git.bb
@@ -2,7 +2,7 @@ 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/host-error-monitor.git;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/host-error-monitor.git;protocol=ssh"
DEPENDS = "boost sdbusplus libgpiod libpeci"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
index 560efc72c..fcf6631ea 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "libmctp"
DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)"
SRC_URI = "git://github.com/openbmc/libmctp.git"
-SRCREV = "8081beba756d371cba40dee86b37bbc654020b17"
+SRCREV = "62d7236f6be8e830e753c94b6b9018004a7f8e27"
PV = "0.1+git${SRCPV}"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
index baab0e9eb..bfe6de7b2 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend
@@ -1,4 +1,4 @@
EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PFR_ENABLED=ON', '', d)}"
EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git"
-SRCREV = "09a8314bb754dccd4af2ef8d2d9e6e43f6da74ec"
+SRCREV = "822b0b40efe7695b56e1edb80f995d3c810d6d22"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb b/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb
index 7f6d406d4..939efa75f 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb
@@ -1,7 +1,7 @@
SUMMARY = "Intel IPMI Providers"
DESCRIPTION = "IPMI Provider Libraries"
-SRC_URI = "git://git@github.com/Intel-BMC/intel-ipmi-providers;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/intel-ipmi-providers;protocol=ssh"
SRCREV = "b2c6184269e3bdf601c38f716ac7ee73379af71b"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb
index 8b97f95e8..9401b2496 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_git.bb
@@ -2,10 +2,10 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
inherit cmake
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
PV = "0.1+git${SRCPV}"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
S = "${WORKDIR}/git/libpeci"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-sync.service b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-sync.service
new file mode 100644
index 000000000..852027209
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync/nv-sync.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Overlay sync to NV storage
+
+[Service]
+# Run rsync periodically to sync the overlay to NV storage
+ExecStart=bash -c 'while true; do rsync -a --delete /tmp/.overlay/ /tmp/.rwfs/.overlay; sleep 20; done'
+# On shutdown, archive the bash history so we don't lose it and run one last sync
+ExecStop=bash -c 'history -a; rsync -a --delete /tmp/.overlay/ /tmp/.rwfs/.overlay'
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb
new file mode 100644
index 000000000..0ee70e880
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-core/nv-sync/nv-sync_git.bb
@@ -0,0 +1,20 @@
+SUMMARY = "NV Overlay Sync"
+DESCRIPTION = "Script to periodically sync the overlay to NV storage"
+
+S = "${WORKDIR}"
+SRC_URI = "file://nv-sync.service \
+"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit systemd
+
+FILES_${PN} += "${systemd_system_unitdir}/nv-sync.service"
+
+do_install() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/nv-sync.service ${D}${systemd_system_unitdir}
+}
+
+SYSTEMD_SERVICE_${PN} += " nv-sync.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb
index 2b77a193c..4bf1c9548 100644
--- a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb
@@ -5,7 +5,7 @@ LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
inherit cmake systemd
-SRC_URI = "git://git@github.com/Intel-BMC/at-scale-debug;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/at-scale-debug;protocol=ssh"
DEPENDS = "boost sdbusplus libpeci"
diff --git a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb
index c6b1571ba..027161fc5 100644
--- a/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb
+++ b/meta-openbmc-mods/meta-common/recipes-devtools/mtd-util/mtd-util.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "OpenBMC mtd-util"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=b77c43ae4eaf67bd73fb6452b2f113a3"
-SRC_URI = "git://git@github.com/Intel-BMC/mtd-util;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/mtd-util;protocol=ssh"
PV = "1.0+git${SRCPV}"
SRCREV = "679c6bddaa1fc4fdd473eb84d4e9f97f78ab0f12"
diff --git a/meta-openbmc-mods/meta-common/recipes-devtools/template-recipe/template-recipe.bb b/meta-openbmc-mods/meta-common/recipes-devtools/template-recipe/template-recipe.bb
index 16b3662ca..50476715e 100644
--- a/meta-openbmc-mods/meta-common/recipes-devtools/template-recipe/template-recipe.bb
+++ b/meta-openbmc-mods/meta-common/recipes-devtools/template-recipe/template-recipe.bb
@@ -1,7 +1,7 @@
SUMMARY = "HelloWorld app with phosphor-logging usage example."
DESCRIPTION = "NOTE: Phosphor-logging has dependencies on systemd and sdbusplus."
-SRC_URI = "git://git@github.com/Intel-BMC/template-recipe;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/template-recipe;protocol=ssh"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
diff --git a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend
index 7e282804e..ef670451e 100644
--- a/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend
@@ -17,7 +17,7 @@ do_install_append() {
install -d ${D}${systemd_system_unitdir}/rsyslog.service.d
install -m 0644 ${WORKDIR}/rsyslog-override.conf \
${D}${systemd_system_unitdir}/rsyslog.service.d/rsyslog-override.conf
- rm ${D}${sysconfdir}/rsyslog.d/imjournal.conf
+ rm -f ${D}${sysconfdir}/rsyslog.d/imjournal.conf
}
SYSTEMD_SERVICE_${PN} += " rotate-event-logs.service rotate-event-logs.timer"
diff --git a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
index 3ad9e2c0b..b14b0ff0b 100644
--- a/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-graphics/libvncserver/libvncserver_%.bbappend
@@ -2,4 +2,4 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
# Use the latest to support obmc-ikvm properly
#SRC_URI = "git://github.com/LibVNC/libvncserver"
-SRCREV = "a9f95d843a331c019f07fd59bf84c0aca4f98220"
+SRCREV = "e00f736853289290197c290f7eb245f750e635ff"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
index 3f7776e06..9965ab11c 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fe
DEPENDS = "openssl-native libxml2-native "
-SRC_URI = "git://git@github.com/Intel-BMC/blocksign;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/blocksign;protocol=ssh"
SRCREV = "60d76db038a0d85851098b13451246abb0d876ed"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
index b32c4e939..4794487d6 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
@@ -8,8 +8,8 @@ S = "${WORKDIR}/git/intel-pfr-manager"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.PFR.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
index 1d1ea536c..c24368720 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
@@ -1,8 +1,8 @@
SUMMARY = "Power supply manager for Intel based platform"
DESCRIPTION = "Power supply manager which include PSU Cold Redundancy service"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
S = "${WORKDIR}/git/psu-manager/"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
index 9e1353208..97866ba4e 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
@@ -1,8 +1,8 @@
SUMMARY = "SMBIOS MDR version 1 service for Intel based platform"
DESCRIPTION = "SMBIOS MDR version 1 service for Intel based platfrom"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh;nobranch=1"
+SRCREV = "6aab8bcc8fd0550753c87265036b1b7c4c8a9f71"
S = "${WORKDIR}/git/services/smbios/"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
index f15a48214..e42e8fc6f 100644
--- a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
@@ -1,8 +1,8 @@
SUMMARY = "SMBIOS MDR version 2 service for Intel based platform"
DESCRIPTION = "SMBIOS MDR version 2 service for Intel based platfrom"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
S = "${WORKDIR}/git/services/smbios-mdrv2/"
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
index 1ebb67a27..7fbe44141 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0001-arm-dts-add-DTS-for-Intel-ast2600-platforms.patch
@@ -1,4 +1,4 @@
-From 3550c57e80ee30113060efa44d41c08fb29fdd25 Mon Sep 17 00:00:00 2001
+From 57363b496c6eb832b0c3407ee997fdee09f4007f Mon Sep 17 00:00:00 2001
From: Vernon Mauery <vernon.mauery@linux.intel.com>
Date: Tue, 19 Sep 2017 15:55:39 +0800
Subject: [PATCH] arm: dts: add DTS for Intel ast2600 platforms
@@ -9,16 +9,16 @@ Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Signed-off-by: Chen Yugang <yugang.chen@linux.intel.com>
---
- arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 495 +++++++++++++++++++++++++
- 1 file changed, 495 insertions(+)
+ arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts | 507 +++++++++++++++++++++++++
+ 1 file changed, 507 insertions(+)
create mode 100644 arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
new file mode 100644
-index 0000000..a1ea85a
+index 000000000000..1ad46e8bc69b
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-intel-ast2600.dts
-@@ -0,0 +1,495 @@
+@@ -0,0 +1,507 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
@@ -51,6 +51,13 @@ index 0000000..a1ea85a
+ compatible = "shared-dma-pool";
+ reusable;
+ };
++
++ video_engine_memory: jpegbuffer {
++ size = <0x02000000>; /* 32M */
++ alignment = <0x01000000>;
++ compatible = "shared-dma-pool";
++ reusable;
++ };
+ };
+
+ reserved-memory {
@@ -112,7 +119,7 @@ index 0000000..a1ea85a
+};
+
+&espi {
-+ status = "okay";
++ status = "disabled"; /* FIXME: Use H/W handshaking */
+};
+
+&peci0 {
@@ -511,6 +518,11 @@ index 0000000..a1ea85a
+ };
+};
+
++&video {
++ status = "okay";
++ memory-region = <&video_engine_memory>;
++};
++
+&vhub {
+ status = "okay";
+};
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch
index 0e32615d5..801fc2eae 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0080-i2c-aspeed-filter-garbage-interrupts-out.patch
@@ -1,4 +1,4 @@
-From 6825259fc0ac015c6544f6070ceaf9cc263c1853 Mon Sep 17 00:00:00 2001
+From b080287881fd76acd54b7971d1f0910907c4f673 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Fri, 8 Nov 2019 15:57:27 -0800
Subject: [PATCH] i2c: aspeed: filter garbage interrupts out
@@ -8,11 +8,11 @@ in datasheet so filter them out.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
- drivers/i2c/busses/i2c-aspeed.c | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
+ drivers/i2c/busses/i2c-aspeed.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
-index 62b803e15ce2..e7cba33c0c87 100644
+index 15a9e1b..916ff7f 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -87,7 +87,11 @@
@@ -39,15 +39,7 @@ index 62b803e15ce2..e7cba33c0c87 100644
/* 0x14 : I2CD Command/Status Register */
#define ASPEED_I2CD_SCL_LINE_STS BIT(18)
-@@ -1018,9 +1027,19 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
-
- spin_lock(&bus->lock);
- irq_received = readl(bus->base + ASPEED_I2C_INTR_STS_REG);
-+ if (!irq_received) {
-+ spin_unlock(&bus->lock);
-+ return IRQ_NONE;
-+ }
-+
+@@ -1032,6 +1041,11 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
/* Ack all interrupts except for Rx done */
writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE,
bus->base + ASPEED_I2C_INTR_STS_REG);
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch
deleted file mode 100644
index 22c4d191c..000000000
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ff0b985d3ad004398db3222a40607f1bef433f9b Mon Sep 17 00:00:00 2001
-From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
-Date: Tue, 19 Nov 2019 15:12:42 -0800
-Subject: [PATCH] clk: ast2600: enable BCLK for PCI/PCIe bus always
-
-BCLK for PCI/PCIe bus should be enabled always with having the
-CLK_IS_CRITICAL flag otherwise it will be disabled at kernel late
-initcall phase as an unused clock, and eventually it causes
-unexpected behavior on BMC features that are connected to the host
-through PCI/PCIe bus.
-
-Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
----
- drivers/clk/clk-ast2600.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c
-index 9191bc3e78ee..8201d65018b9 100644
---- a/drivers/clk/clk-ast2600.c
-+++ b/drivers/clk/clk-ast2600.c
-@@ -64,7 +64,7 @@ static const struct aspeed_gate_data aspeed_g6_gates[] = {
- [ASPEED_CLK_GATE_GCLK] = { 2, 7, "gclk-gate", NULL, 0 }, /* 2D engine */
- /* vclk parent - dclk/d1clk/hclk/mclk */
- [ASPEED_CLK_GATE_VCLK] = { 3, 6, "vclk-gate", NULL, 0 }, /* Video Capture */
-- [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", 0 }, /* PCIe/PCI */
-+ [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", CLK_IS_CRITICAL }, /* PCIe/PCI */
- /* From dpll */
- [ASPEED_CLK_GATE_DCLK] = { 5, -1, "dclk-gate", NULL, CLK_IS_CRITICAL }, /* DAC */
- [ASPEED_CLK_GATE_REF0CLK] = { 6, -1, "ref0clk-gate", "clkin", CLK_IS_CRITICAL },
---
-2.7.4
-
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch
index b0995992b..252b2203c 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch
@@ -1,4 +1,4 @@
-From 4594ddeadebe0c818c94671295308c51f00a8e7e Mon Sep 17 00:00:00 2001
+From f034e4129e5ad6b102be4cbe2add0fe46bfe413e Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 20 Nov 2019 13:06:58 -0800
Subject: [PATCH] ARM: dts: aspeed-g6: add USB virtual hub fixup
@@ -12,7 +12,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2 files changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi b/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi
-index 045ce66ca876..6ea66aaf9dd0 100644
+index 045ce66..6ea66aa 100644
--- a/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi
+++ b/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi
@@ -1112,6 +1112,11 @@
@@ -28,7 +28,7 @@ index 045ce66ca876..6ea66aaf9dd0 100644
function = "VB";
groups = "VB";
diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
-index 88bd02058585..b2549f2a619b 100644
+index 88bd020..b2549f2 100644
--- a/arch/arm/boot/dts/aspeed-g6.dtsi
+++ b/arch/arm/boot/dts/aspeed-g6.dtsi
@@ -253,6 +253,16 @@
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch
index 8093b2bc1..3f6f3ce91 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch
@@ -1,4 +1,4 @@
-From 7a9aa0e35180a14d352516a92166743a2b063533 Mon Sep 17 00:00:00 2001
+From eedb53957b507bda2b9f6025149d2052e0598f76 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 20 Nov 2019 12:49:46 -0800
Subject: [PATCH] usb: gadget: aspeed: add ast2600 compatible string
@@ -14,7 +14,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/udc/aspeed-vhub/core.c b/drivers/usb/gadget/udc/aspeed-vhub/core.c
-index 90b134d5dca9..905e1cfd3d51 100644
+index 90b134d..905e1cf 100644
--- a/drivers/usb/gadget/udc/aspeed-vhub/core.c
+++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c
@@ -407,6 +407,9 @@ static const struct of_device_id ast_vhub_dt_ids[] = {
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch
index d3a4a9fdc..81aefdf47 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0084-ARM-dts-aspeed-g6-add-GFX-node.patch
@@ -1,4 +1,4 @@
-From ad8984556c191b75404fc5608466ee95ccc3b501 Mon Sep 17 00:00:00 2001
+From 1a80650c970c8d5f7332249db5d26d2e553ef4c2 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 20 Nov 2019 15:01:06 -0800
Subject: [PATCH] ARM: dts: aspeed-g6: add GFX node
@@ -11,7 +11,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
-index b2549f2a619b..34281b14128a 100644
+index b2549f2..34281b1 100644
--- a/arch/arm/boot/dts/aspeed-g6.dtsi
+++ b/arch/arm/boot/dts/aspeed-g6.dtsi
@@ -311,6 +311,15 @@
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch
index b936886cf..856da7caf 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0085-drm-add-AST2600-GFX-support.patch
@@ -1,4 +1,4 @@
-From 0709e2bab2d763b75683a823c97f4016253ebe6b Mon Sep 17 00:00:00 2001
+From 4090d7ab2e7282ff5680c3e574e644964a8ae7d6 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 20 Nov 2019 14:58:24 -0800
Subject: [PATCH] drm: add AST2600 GFX support
@@ -13,7 +13,7 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
-index a10358bb61ec..eebd72eb1220 100644
+index a10358b..eebd72e 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
@@ -13,11 +13,15 @@ struct aspeed_gfx {
@@ -33,7 +33,7 @@ index a10358bb61ec..eebd72eb1220 100644
#define CRT_CTRL2 0x64 /* CRT Control II */
#define CRT_STATUS 0x68 /* CRT Status */
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
-index 15db9e426ec4..2c95c720f34a 100644
+index 15db9e4..2c95c72 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
@@ -59,8 +59,8 @@ static void aspeed_gfx_enable_controller(struct aspeed_gfx *priv)
@@ -57,7 +57,7 @@ index 15db9e426ec4..2c95c720f34a 100644
static void aspeed_gfx_crtc_mode_set_nofb(struct aspeed_gfx *priv)
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
-index eeb22eccd1fc..aa44e01ac245 100644
+index eeb22ec..aa44e01 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
@@ -112,8 +112,14 @@ static int aspeed_gfx_load(struct drm_device *drm)
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch
index 63b683826..8f1e14b86 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ADC-linux-driver-for-AST2600.patch
@@ -1,4 +1,4 @@
-From 14a4e77c801be8adbfc0726667a8051957e7a7dd Mon Sep 17 00:00:00 2001
+From 8ed59cc252af9a87d2d7b3e45a949030d91761b7 Mon Sep 17 00:00:00 2001
From: Chen Yugang <yugang.chen@linux.intel.com>
Date: Tue, 3 Dec 2019 13:41:37 +0800
Subject: [PATCH] ADC linux driver for AST2600
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ARM-dts-aspeed-g6-add-video-node.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ARM-dts-aspeed-g6-add-video-node.patch
new file mode 100644
index 000000000..06043dbb0
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0086-ARM-dts-aspeed-g6-add-video-node.patch
@@ -0,0 +1,36 @@
+From 14931c741e837871672bad0208591ea571b0a6ea Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Tue, 26 Nov 2019 16:37:36 -0800
+Subject: [PATCH] ARM: dts: aspeed-g6: add video node
+
+This commit adds video node.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
+index 4e8d25f..239c904 100644
+--- a/arch/arm/boot/dts/aspeed-g6.dtsi
++++ b/arch/arm/boot/dts/aspeed-g6.dtsi
+@@ -340,6 +340,16 @@
+ status = "disabled";
+ };
+
++ video: video@1e700000 {
++ compatible = "aspeed,ast2600-video-engine";
++ reg = <0x1e700000 0x1000>;
++ clocks = <&syscon ASPEED_CLK_GATE_VCLK>,
++ <&syscon ASPEED_CLK_GATE_ECLK>;
++ clock-names = "vclk", "eclk";
++ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
++ status = "disabled";
++ };
++
+ gpio0: gpio@1e780000 {
+ #gpio-cells = <2>;
+ gpio-controller;
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0087-media-aspeed-add-aspeed-ast2600-video-engine-compati.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0087-media-aspeed-add-aspeed-ast2600-video-engine-compati.patch
new file mode 100644
index 000000000..f8c44ea96
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0087-media-aspeed-add-aspeed-ast2600-video-engine-compati.patch
@@ -0,0 +1,29 @@
+From 9ca66177376464ce7c1bbe95c392c4509331ad74 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Tue, 26 Nov 2019 16:39:16 -0800
+Subject: [PATCH] media: aspeed: add aspeed,ast2600-video-engine compatible
+ string
+
+This commit adds "aspeed,ast2600-video-engine" compatible string
+to support AST2600 video engine H/W.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/media/platform/aspeed-video.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
+index 0473f31..5fa48d3 100644
+--- a/drivers/media/platform/aspeed-video.c
++++ b/drivers/media/platform/aspeed-video.c
+@@ -1717,6 +1717,7 @@ static int aspeed_video_remove(struct platform_device *pdev)
+ static const struct of_device_id aspeed_video_of_match[] = {
+ { .compatible = "aspeed,ast2400-video-engine" },
+ { .compatible = "aspeed,ast2500-video-engine" },
++ { .compatible = "aspeed,ast2600-video-engine" },
+ {}
+ };
+ MODULE_DEVICE_TABLE(of, aspeed_video_of_match);
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0088-clk-ast2600-enable-ESPICLK-always.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0088-clk-ast2600-enable-ESPICLK-always.patch
new file mode 100644
index 000000000..34df0882b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0088-clk-ast2600-enable-ESPICLK-always.patch
@@ -0,0 +1,30 @@
+From 37efef00064a228c3e723b0eece22d72f2632705 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Fri, 6 Dec 2019 13:51:37 -0800
+Subject: [PATCH] clk: ast2600: enable ESPICLK always
+
+To support continous eSPI H/W handshaking, this patch enables
+ESPICLK always so that there discontinuity of eSPI handshaking while
+boot BMC.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ drivers/clk/clk-ast2600.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c
+index 8201d65..21967bc 100644
+--- a/drivers/clk/clk-ast2600.c
++++ b/drivers/clk/clk-ast2600.c
+@@ -87,7 +87,7 @@ static const struct aspeed_gate_data aspeed_g6_gates[] = {
+ [ASPEED_CLK_GATE_EMMCCLK] = { 27, 16, "emmcclk-gate", NULL, 0 }, /* For card clk */
+ /* Reserved 28/29/30 */
+ [ASPEED_CLK_GATE_LCLK] = { 32, 32, "lclk-gate", NULL, 0 }, /* LPC */
+- [ASPEED_CLK_GATE_ESPICLK] = { 33, -1, "espiclk-gate", NULL, 0 }, /* eSPI */
++ [ASPEED_CLK_GATE_ESPICLK] = { 33, -1, "espiclk-gate", NULL, CLK_IS_CRITICAL }, /* eSPI */
+ [ASPEED_CLK_GATE_REF1CLK] = { 34, -1, "ref1clk-gate", "clkin", CLK_IS_CRITICAL },
+ /* Reserved 35 */
+ [ASPEED_CLK_GATE_SDCLK] = { 36, 56, "sdclk-gate", NULL, 0 }, /* SDIO/SD */
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
index 2ebad4093..7532aa8a4 100644
--- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend
@@ -63,12 +63,14 @@ SRC_URI += " \
file://0078-Fix-NCSI-driver-issue-caused-by-host-shutdown.patch \
file://0079-usb-gadget-aspeed-backport-aspeed-vhub-bug-fixes.patch \
file://0080-i2c-aspeed-filter-garbage-interrupts-out.patch \
- file://0081-clk-ast2600-enable-BCLK-for-PCI-PCIe-bus-always.patch \
file://0082-ARM-dts-aspeed-g6-add-USB-virtual-hub-fixup.patch \
file://0083-usb-gadget-aspeed-add-ast2600-compatible-string.patch \
file://0084-ARM-dts-aspeed-g6-add-GFX-node.patch \
file://0085-drm-add-AST2600-GFX-support.patch \
file://0086-ADC-linux-driver-for-AST2600.patch \
+ file://0086-ARM-dts-aspeed-g6-add-video-node.patch \
+ file://0087-media-aspeed-add-aspeed-ast2600-video-engine-compati.patch \
+ file://0088-clk-ast2600-enable-ESPICLK-always.patch \
"
SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://0005-128MB-flashmap-for-PFR.patch', '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0026-Add-StandbySpare-support-for-software-inventory.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0026-Add-StandbySpare-support-for-software-inventory.patch
new file mode 100644
index 000000000..cbf966a37
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0026-Add-StandbySpare-support-for-software-inventory.patch
@@ -0,0 +1,56 @@
+From ae9e4b2a166dc4f34b255ed5338abbfa8aa37778 Mon Sep 17 00:00:00 2001
+From: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+Date: Sat, 30 Nov 2019 18:20:13 +0530
+Subject: [PATCH] Add StandbySpare support for software inventory
+
+Add support to allow update for active / recovery
+regions of specified firmware. This update enables
+the backend modules to advertise whether the
+software object is active or recovery (StandbySpare)
+image.
+
+Change-Id: I0d46206463ba566bcaa710fb271aa4d795fa49cd
+Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+---
+ xyz/openbmc_project/Software/Activation.interface.yaml | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/xyz/openbmc_project/Software/Activation.interface.yaml b/xyz/openbmc_project/Software/Activation.interface.yaml
+index 37c9cb9..b71b8e7 100644
+--- a/xyz/openbmc_project/Software/Activation.interface.yaml
++++ b/xyz/openbmc_project/Software/Activation.interface.yaml
+@@ -28,12 +28,20 @@ enumerations:
+ - name: Activating
+ description: >
+ The Software.Version is in the process of being Activated.
++ - name: ActivatingAsStandbySpare
++ description: >
++ The Software.Version is in the process of being processed
++ as StandbySpare.
+ - name: Active
+ description: >
+ The Software.Version is currently Active.
+ - name: Failed
+ description: >
+ The Software.Version failed during or after Activation.
++ - name: StandbySpare
++ description: >
++ The Software.Version is part of a redundancy set and awaits
++ a failover or external action to activate.
+ - name: RequestedActivations
+ description: >
+ The possible RequestedActivation states of a Software.Version.
+@@ -44,6 +52,10 @@ enumerations:
+ - name: Active
+ description: >
+ The Software.Version has been requested for Activation.
++ - name: StandbySpare
++ description: >
++ The Software.Version has been requested to be enabled as
++ StandbySpare.
+ # TODO: Specify "EAGAIN" type error when requested is unable to be acted on
+ # due to current system state. Currently, sdbusplus does not support
+ # errors on properties.
+--
+2.7.4
+
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 f21845ce6..d9240f760 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,5 +1,5 @@
SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git"
-SRCREV = "4610bace070eb17c6e4ee015210dac44284c53a7"
+SRCREV = "1b02c38979ab4fa2649699a26266367b115eee7c"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -13,4 +13,5 @@ SRC_URI += "file://0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.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 \
+ file://0026-Add-StandbySpare-support-for-software-inventory.patch \
"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-Adding-StandBySpare-for-firmware-activation.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-Adding-StandBySpare-for-firmware-activation.patch
new file mode 100644
index 000000000..b63226cce
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0007-Adding-StandBySpare-for-firmware-activation.patch
@@ -0,0 +1,76 @@
+From c2ae3ac444f7a5e9674a82f47086874f947bcec6 Mon Sep 17 00:00:00 2001
+From: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+Date: Thu, 5 Dec 2019 12:38:21 +0530
+Subject: [PATCH] Adding StandBySpare for firmware activation
+
+Added new states 'StandBySpare', 'ActivatingAsStandbySpare' for
+firmware activation. If the uploaded firmware image is for
+backup/recovery, then it sets the "StandBySpare" value for
+Activations. When backup/recovery image is in activating state,
+then activations will be set to "ActivatingAsStandbySpare".
+
+Tested:
+Tested using redfish interface.
+Did the GET on "/redfish/v1/UpdateService/FirmwareInventory/<backup image>"
+Response:
+ ....
+ "Status": {
+ "Health": "OK",
+ "HealthRollup": "OK",
+ "State": "StandbySpare"
+ }
+.......
+
+Change-Id: I7f1608fac3196774a6d593b6128d58da3f5c88fc
+Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+---
+ activation.cpp | 22 ++++++++++++++++++++--
+ 1 file changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/activation.cpp b/activation.cpp
+index 2966b2f..a098784 100644
+--- a/activation.cpp
++++ b/activation.cpp
+@@ -80,12 +80,16 @@ auto Activation::activation(Activations value) -> Activations
+ {
+
+ if ((value != softwareServer::Activation::Activations::Active) &&
+- (value != softwareServer::Activation::Activations::Activating))
++ (value != softwareServer::Activation::Activations::Activating) &&
++ (value !=
++ softwareServer::Activation::Activations::ActivatingAsStandbySpare))
+ {
+ redundancyPriority.reset(nullptr);
+ }
+
+- if (value == softwareServer::Activation::Activations::Activating)
++ if (value == softwareServer::Activation::Activations::Activating ||
++ value ==
++ softwareServer::Activation::Activations::ActivatingAsStandbySpare)
+ {
+ #ifdef UBIFS_LAYOUT
+ if (rwVolumeCreated == false && roVolumeCreated == false)
+@@ -256,6 +260,20 @@ auto Activation::requestedActivation(RequestedActivations value)
+ softwareServer::Activation::Activations::Activating);
+ }
+ }
++ else if ((value ==
++ softwareServer::Activation::RequestedActivations::StandbySpare) &&
++ (softwareServer::Activation::requestedActivation() !=
++ softwareServer::Activation::RequestedActivations::StandbySpare))
++ {
++ if ((softwareServer::Activation::activation() ==
++ softwareServer::Activation::Activations::Ready) ||
++ (softwareServer::Activation::activation() ==
++ softwareServer::Activation::Activations::Failed))
++ {
++ Activation::activation(softwareServer::Activation::Activations::
++ ActivatingAsStandbySpare);
++ }
++ }
+ return softwareServer::Activation::requestedActivation(value);
+ }
+
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch
new file mode 100644
index 000000000..31373104f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/0008-PFR-image-HASH-verification.patch
@@ -0,0 +1,408 @@
+From ac6e0c217a1b136d82f93b691aff1acb40009f26 Mon Sep 17 00:00:00 2001
+From: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+Date: Thu, 5 Dec 2019 11:55:36 +0530
+Subject: [PATCH] PFR image HASH verification
+
+This adds HASH verification on PFR images uploaded for
+firmware updates
+
+Tested: tested firmware update with good and bad HASH images.
+
+Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+---
+ pfr_image_manager.cpp | 149 ++++++++++++++++++++++++++++++++----------
+ pfr_image_manager.hpp | 112 +++++++++++++++++++++++++++++--
+ 2 files changed, 221 insertions(+), 40 deletions(-)
+
+diff --git a/pfr_image_manager.cpp b/pfr_image_manager.cpp
+index 242a6ca..1a41cbe 100644
+--- a/pfr_image_manager.cpp
++++ b/pfr_image_manager.cpp
+@@ -5,6 +5,8 @@
+ #include "version.hpp"
+ #include "watch.hpp"
+
++#include <fcntl.h>
++#include <openssl/err.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
+@@ -15,9 +17,9 @@
+ #include <algorithm>
+ #include <cstring>
+ #include <elog-errors.hpp>
+-#include <filesystem>
+ #include <fstream>
+ #include <iomanip>
++#include <set>
+ #include <sstream>
+ #include <string>
+ #include <xyz/openbmc_project/Software/Image/error.hpp>
+@@ -33,12 +35,21 @@ using namespace sdbusplus::xyz::openbmc_project::Software::Image::Error;
+ namespace Software = phosphor::logging::xyz::openbmc_project::Software;
+
+ static constexpr const uint32_t pfmPos = 2054;
++static constexpr const uint32_t block0Magic = 0xB6EAFD19;
++static constexpr const uint32_t lengthBlk0Blk1 = 1024;
+
+-static int getPFRImgInfo(const std::filesystem::path imgPath, uint8_t& imgType,
+- std::string& version)
++int Manager::verifyPFRImage(const std::filesystem::path imgPath,
++ std::string& version, std::string& purposeString)
+ {
+- struct pfrImgBlock0 block0Data;
+- uint8_t verData[2];
++ uint8_t imgType = 0;
++ uint32_t imgMagic = 0;
++ uint8_t verData[2] = {0};
++ uint32_t hashLen = 0;
++ struct pfrImgBlock0 block0Data = {};
++
++ std::string imageName;
++
++ EVP_MD_CTX* ctx;
+
+ if (std::filesystem::exists(imgPath))
+ {
+@@ -55,17 +66,101 @@ static int getPFRImgInfo(const std::filesystem::path imgPath, uint8_t& imgType,
+
+ imgFile.read(reinterpret_cast<char*>(&block0Data),
+ sizeof(block0Data));
++
++ imgMagic = block0Data.tag;
++
++ if (imgMagic != block0Magic)
++ {
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "Image magic number match failed",
++ phosphor::logging::entry("IMAGEMAGIC=0x%x", imgMagic));
++ return -1;
++ }
++
+ imgType = block0Data.pcType[0];
++
++ phosphor::logging::log<phosphor::logging::level::INFO>(
++ "Image Type", phosphor::logging::entry(
++ "IMAGETYPE=0x%x", static_cast<int>(imgType)));
++
++ if (imgType == pfrBMCUpdateCap || imgType == pfrBMCPFM)
++ {
++ imageName = "BMC";
++ purposeString =
++ "xyz.openbmc_project.Software.Version.VersionPurpose.BMC";
++ }
++ else if (imgType == pfrPCHUpdateCap || imgType == pfrPCHPFM)
++ {
++ imageName = "BIOS";
++ purposeString =
++ "xyz.openbmc_project.Software.Version.VersionPurpose.Host";
++ }
++ else if (imgType == pfrCPLDUpdateCap)
++ {
++ imageName = "CPLD";
++ purposeString =
++ "xyz.openbmc_project.Software.Version.VersionPurpose.Other";
++ }
++ else
++ {
++ purposeString = "xyz.openbmc_project.Software.Version."
++ "VersionPurpose.Unknown";
++
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "Unknown image type");
++ return -1;
++ }
++
+ imgFile.seekg(pfmPos,
+ std::ios::beg); // Version is at 0x806 in the PFM
+ imgFile.read(reinterpret_cast<char*>(&verData), sizeof(verData));
+ imgFile.close();
+- version =
+- std::to_string(verData[0]) + "." + std::to_string(verData[1]);
++
++ auto size = std::filesystem::file_size(imgPath);
++
++ phosphor::logging::log<phosphor::logging::level::INFO>(
++ "Image Size", phosphor::logging::entry("IMAGESIZE=0x%x",
++ static_cast<int>(size)));
++
++ // Adds all digest algorithms to the internal table
++ OpenSSL_add_all_digests();
++
++ ctx = EVP_MD_CTX_create();
++ EVP_DigestInit(ctx, EVP_sha256());
++
++ // Hash the image file and update the digest
++ auto dataPtr = mapFile(imgPath, size);
++
++ EVP_DigestUpdate(ctx, ((uint8_t*)dataPtr() + lengthBlk0Blk1),
++ (size - lengthBlk0Blk1));
++
++ std::vector<uint8_t> digest(EVP_MD_size(EVP_sha256()));
++ std::vector<uint8_t> expectedDigest(block0Data.hash256,
++ &block0Data.hash256[0] + 32);
++
++ EVP_DigestFinal(ctx, digest.data(), &hashLen);
++ EVP_MD_CTX_destroy(ctx);
++
++ std::string redfishMsgID = "OpenBMC.0.1";
++
++ if (expectedDigest != digest)
++ {
++ redfishMsgID += ".GeneralFirmwareSecurityViolation";
++ sd_journal_send("MESSAGE=%s",
++ "Firmware image HASH verification failed",
++ "PRIORITY=%i", LOG_ERR, "REDFISH_MESSAGE_ID=%s",
++ redfishMsgID.c_str(), "REDFISH_MESSAGE_ARGS=%s",
++ "Image HASH check fail", NULL);
++ return -1;
++ }
++
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "PFR image",
+ phosphor::logging::entry("PCType=%d", block0Data.pcType[0]),
+ phosphor::logging::entry("VERSION=%s", version.c_str()));
++
++ version =
++ std::to_string(verData[0]) + "." + std::to_string(verData[1]);
+ }
+ catch (std::exception& e)
+ {
+@@ -79,20 +174,20 @@ static int getPFRImgInfo(const std::filesystem::path imgPath, uint8_t& imgType,
+
+ int Manager::processImage(const std::string& imgFilePath)
+ {
++
+ std::filesystem::path imgPath(imgFilePath);
+
+ if (!std::filesystem::exists(imgPath))
+ return -1;
+
+- uint8_t imgType;
+ int retry = 3;
+ std::string ver;
+ std::string purposeString;
+
+- if (0 != getPFRImgInfo(imgFilePath, imgType, ver))
++ if (0 != verifyPFRImage(imgFilePath, ver, purposeString))
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+- "Error reading uploaded image type and version");
++ "Error verifying uploaded image");
+ return -1;
+ }
+
+@@ -103,31 +198,6 @@ int Manager::processImage(const std::string& imgFilePath)
+ return -1;
+ }
+
+- if (imgType == pfrBMCUpdateCap)
+- {
+- purposeString =
+- "xyz.openbmc_project.Software.Version.VersionPurpose.BMC";
+- }
+- else if (imgType == pfrPCHUpdateCap)
+- {
+- purposeString =
+- "xyz.openbmc_project.Software.Version.VersionPurpose.Host";
+- }
+- else if (imgType == pfrCPLDUpdateCap)
+- {
+- purposeString =
+- "xyz.openbmc_project.Software.Version.VersionPurpose.Other";
+- }
+- else
+- {
+- purposeString =
+- "xyz.openbmc_project.Software.Version.VersionPurpose.Unknown";
+-
+- phosphor::logging::log<phosphor::logging::level::ERR>(
+- "Unknown image type");
+- return -1;
+- }
+-
+ sdbusplus::xyz::openbmc_project::Software::server::Version::VersionPurpose
+ purpose = Version::VersionPurpose::Unknown;
+ try
+@@ -169,6 +239,7 @@ int Manager::processImage(const std::string& imgFilePath)
+ std::filesystem::create_directory(imageDirPath);
+
+ std::filesystem::path newFileName = imageDirPath / "image-runtime";
++
+ std::filesystem::rename(imgFilePath, newFileName);
+
+ // Create Version object
+@@ -212,6 +283,14 @@ void Manager::erase(std::string entryId)
+ this->versions.erase(entryId);
+ }
+
++CustomMap Manager::mapFile(const std::filesystem::path& path, size_t size)
++{
++
++ CustomFd fd(open(path.c_str(), O_RDONLY));
++
++ return CustomMap(mmap(nullptr, size, PROT_READ, MAP_PRIVATE, fd(), 0),
++ size);
++}
+ } // namespace manager
+ } // namespace software
+ } // namespace phosphor
+diff --git a/pfr_image_manager.hpp b/pfr_image_manager.hpp
+index c6ee6a4..5b7b2c3 100644
+--- a/pfr_image_manager.hpp
++++ b/pfr_image_manager.hpp
+@@ -1,6 +1,13 @@
+ #pragma once
+ #include "version.hpp"
+
++#include <openssl/evp.h>
++#include <openssl/pem.h>
++#include <openssl/rsa.h>
++#include <sys/mman.h>
++#include <unistd.h>
++
++#include <filesystem>
+ #include <sdbusplus/server.hpp>
+
+ namespace phosphor
+@@ -10,7 +17,8 @@ namespace software
+ namespace manager
+ {
+
+-enum pfrImgPCType {
++enum pfrImgPCType
++{
+ pfrCPLDUpdateCap = 0x00,
+ pfrPCHPFM = 0x01,
+ pfrPCHUpdateCap = 0x02,
+@@ -19,15 +27,94 @@ enum pfrImgPCType {
+ };
+
+ /* PFR image block 0 - As defined in HAS */
+-struct pfrImgBlock0 {
+- uint8_t tag[4];
++struct pfrImgBlock0
++{
++ uint32_t tag;
+ uint8_t pcLength[4];
+ uint8_t pcType[4];
+ uint8_t reserved1[4];
+ uint8_t hash256[32];
+ uint8_t hash384[48];
+ uint8_t reserved2[32];
+-}__attribute__((packed));
++} __attribute__((packed));
++
++/** @struct CustomFd
++ *
++ * RAII wrapper for file descriptor.
++ */
++struct CustomFd
++{
++ public:
++ CustomFd() = delete;
++ CustomFd(const CustomFd&) = delete;
++ CustomFd& operator=(const CustomFd&) = delete;
++ CustomFd(CustomFd&&) = default;
++ CustomFd& operator=(CustomFd&&) = default;
++ /** @brief Saves File descriptor and uses it to do file operation
++ *
++ * @param[in] fd - File descriptor
++ */
++ CustomFd(int fd) : fd(fd)
++ {
++ }
++
++ ~CustomFd()
++ {
++ if (fd >= 0)
++ {
++ close(fd);
++ }
++ }
++
++ int operator()() const
++ {
++ return fd;
++ }
++
++ private:
++ /** @brief File descriptor */
++ int fd = -1;
++};
++
++/** @struct CustomMap
++ *
++ * RAII wrapper for mmap.
++ */
++struct CustomMap
++{
++ private:
++ /** @brief starting address of the map */
++ void* addr;
++
++ /** @brief length of the mapping */
++ size_t length;
++
++ public:
++ CustomMap() = delete;
++ CustomMap(const CustomMap&) = delete;
++ CustomMap& operator=(const CustomMap&) = delete;
++ CustomMap(CustomMap&&) = default;
++ CustomMap& operator=(CustomMap&&) = default;
++
++ /** @brief Saves starting address of the map and
++ * and length of the file.
++ * @param[in] addr - Starting address of the map
++ * @param[in] length - length of the map
++ */
++ CustomMap(void* addr, size_t length) : addr(addr), length(length)
++ {
++ }
++
++ ~CustomMap()
++ {
++ munmap(addr, length);
++ }
++
++ void* operator()() const
++ {
++ return addr;
++ }
++};
+
+ /** @class Manager
+ * @brief Contains a map of Version dbus objects.
+@@ -61,13 +148,28 @@ class Manager
+ void erase(std::string entryId);
+
+ private:
++ /**
++ * @brief Memory map the file
++ * @param[in] - file path
++ * @param[in] - file size
++ * @param[out] - Custom Mmap address
++ */
++ CustomMap mapFile(const std::filesystem::path& path, size_t size);
++
++ /**
++ * @brief Verify the PFR image and return version and purpose
++ * @param[in] - file path
++ * @param[out] - version
++ * @param[out] - purpose
++ */
++ int verifyPFRImage(const std::filesystem::path imgPath,
++ std::string& version, std::string& purposeString);
+ /** @brief Persistent map of Version dbus objects and their
+ * version id */
+ std::map<std::string, std::unique_ptr<Version>> versions;
+
+ /** @brief Persistent sdbusplus DBus bus connection. */
+ sdbusplus::bus::bus& bus;
+-
+ };
+
+ } // namespace manager
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/fwupd@.service b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/fwupd@.service
index d51fee312..64d9a47a6 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/fwupd@.service
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager/fwupd@.service
@@ -4,5 +4,5 @@ Description=Flash BMC with fwupd script : %I
[Service]
Type=oneshot
RemainAfterExit=no
-ExecStart=/usr/bin/fwupd.sh file:////tmp/images/%i/image-runtime
-SyslogIdentifier=fwupd \ No newline at end of file
+ExecStart=/usr/bin/fwupd.sh %i
+SyslogIdentifier=fwupd
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
index 90da32ac2..96ddfc3ca 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
@@ -9,6 +9,11 @@ SRC_URI += "file://0002-Redfish-firmware-activation.patch \
file://0004-Changed-the-condition-of-software-version-service-wa.patch \
file://0005-Modified-firmware-activation-to-launch-fwupd.sh-thro.patch \
file://0006-Modify-the-ID-of-software-image-updater-object-on-DB.patch \
+ file://0007-Adding-StandBySpare-for-firmware-activation.patch \
"
-SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'file://0007-PFR-images-support.patch', '', d)}"
+SRC_URI_PFR = "file://0007-PFR-images-support.patch \
+ file://0008-PFR-image-HASH-verification.patch \
+ "
+
+SRC_URI += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', SRC_URI_PFR, '', d)}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch
new file mode 100644
index 000000000..9e7cdf768
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0001-Firmware-update-support-for-StandBySpare.patch
@@ -0,0 +1,484 @@
+From ba9d7f8443716887bc101e300b06c570f7da8159 Mon Sep 17 00:00:00 2001
+From: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+Date: Thu, 5 Dec 2019 15:13:52 +0530
+Subject: [PATCH] Firmware update support for StandBySpare
+
+Firmware update support for StandBySpare. This will
+have support for adding 'HttpPushUriTargets' and
+'HttpPushUriTargetsBusy' attributes. These attributes enables
+'HttpPushUri' to distinguish between the firmware update targets.
+
+Tested:
+ - GET on "/redfish/v1/UpdateService", got below response
+.........
+ "HttpPushUriTargets": [],
+ "HttpPushUriTargetsBusy": false
+........
+
+ - PATCH on "/redfish/v1/UpdateService" and works fine.
+{
+ "HttpPushUriTargets": ["bmc_recovery"],
+ "HttpPushUriTargetsBusy": true
+}
+
+ - Did Firmware update and verified end to end functionality
+ for both bmc active and backup images.
+
+ - Successfully ran redfish validater with no new errors.
+
+Change-Id: I59f317ac001ebf56bbf30e7f43dbec5d69fa249a
+Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
+---
+ redfish-core/lib/update_service.hpp | 285 ++++++++++++++++++++++++++++++------
+ 1 file changed, 241 insertions(+), 44 deletions(-)
+
+diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
+index 57dcc07..c189d5a 100644
+--- a/redfish-core/lib/update_service.hpp
++++ b/redfish-core/lib/update_service.hpp
+@@ -30,6 +30,17 @@ static std::unique_ptr<sdbusplus::bus::match::match> fwUpdateMatcher;
+ static bool fwUpdateInProgress = false;
+ // Timer for software available
+ static std::unique_ptr<boost::asio::steady_timer> fwAvailableTimer;
++static constexpr const char *versionIntf =
++ "xyz.openbmc_project.Software.Version";
++static constexpr const char *activationIntf =
++ "xyz.openbmc_project.Software.Activation";
++static constexpr const char *reqActivationPropName = "RequestedActivation";
++static constexpr const char *reqActivationsActive =
++ "xyz.openbmc_project.Software.Activation.RequestedActivations.Active";
++static constexpr const char *reqActivationsStandBySpare =
++ "xyz.openbmc_project.Software.Activation.RequestedActivations.StandbySpare";
++static constexpr const char *activationsStandBySpare =
++ "xyz.openbmc_project.Software.Activation.Activations.StandbySpare";
+
+ static void cleanUp()
+ {
+@@ -37,27 +48,118 @@ static void cleanUp()
+ fwUpdateMatcher = nullptr;
+ }
+ static void activateImage(const std::string &objPath,
+- const std::string &service)
++ const std::string &service,
++ const std::vector<std::string> &imgUriTargets)
+ {
+ BMCWEB_LOG_DEBUG << "Activate image for " << objPath << " " << service;
++
++ // If targets is empty, it will apply to the active.
++ if (imgUriTargets.size() == 0)
++ {
++ crow::connections::systemBus->async_method_call(
++ [](const boost::system::error_code error_code) {
++ if (error_code)
++ {
++ BMCWEB_LOG_DEBUG << "RequestedActivation failed: ec = "
++ << error_code;
++ }
++ },
++ service, objPath, "org.freedesktop.DBus.Properties", "Set",
++ activationIntf, reqActivationPropName,
++ std::variant<std::string>(reqActivationsActive));
++ return;
++ }
++
++ // TODO: Now we support only one target becuase software-manager
++ // code support one activation per object. It will be enhanced
++ // to multiple targets for single image in future. For now,
++ // consider first target alone.
+ crow::connections::systemBus->async_method_call(
+- [](const boost::system::error_code error_code) {
+- if (error_code)
++ [objPath, service, imgTarget{imgUriTargets[0]}](
++ const boost::system::error_code ec,
++ const crow::openbmc_mapper::GetSubTreeType &subtree) {
++ if (ec || !subtree.size())
+ {
+- BMCWEB_LOG_DEBUG << "error_code = " << error_code;
+- BMCWEB_LOG_DEBUG << "error msg = " << error_code.message();
++ return;
++ }
++
++ for (const auto &[invObjPath, invDict] : subtree)
++ {
++ std::size_t idPos = invObjPath.rfind("/");
++ if ((idPos == std::string::npos) ||
++ ((idPos + 1) >= invObjPath.size()))
++ {
++ BMCWEB_LOG_DEBUG << "Can't parse firmware ID!!";
++ return;
++ }
++ std::string swId = invObjPath.substr(idPos + 1);
++
++ if (swId != imgTarget)
++ {
++ continue;
++ }
++
++ if (invDict.size() < 1)
++ {
++ continue;
++ }
++ BMCWEB_LOG_DEBUG << "Image target matched with object "
++ << invObjPath;
++ crow::connections::systemBus->async_method_call(
++ [objPath,
++ service](const boost::system::error_code error_code,
++ const std::variant<std::string> value) {
++ if (error_code)
++ {
++ BMCWEB_LOG_DEBUG
++ << "Error in querying activation value";
++ // not all fwtypes are updateable,
++ // this is ok
++ return;
++ }
++ std::string activationValue =
++ std::get<std::string>(value);
++ BMCWEB_LOG_DEBUG << "Activation Value: "
++ << activationValue;
++ std::string reqActivation = reqActivationsActive;
++ if (activationValue == activationsStandBySpare)
++ {
++ reqActivation = reqActivationsStandBySpare;
++ }
++ BMCWEB_LOG_DEBUG
++ << "Setting RequestedActivation value as "
++ << reqActivation << " for " << service << " "
++ << objPath;
++ crow::connections::systemBus->async_method_call(
++ [](const boost::system::error_code error_code) {
++ if (error_code)
++ {
++ BMCWEB_LOG_DEBUG
++ << "RequestedActivation failed: ec = "
++ << error_code;
++ }
++ return;
++ },
++ service, objPath, "org.freedesktop.DBus.Properties",
++ "Set", activationIntf, reqActivationPropName,
++ std::variant<std::string>(reqActivation));
++ },
++ invDict[0].first,
++ "/xyz/openbmc_project/software/" + imgTarget,
++ "org.freedesktop.DBus.Properties", "Get", activationIntf,
++ "Activation");
+ }
+ },
+- service, objPath, "org.freedesktop.DBus.Properties", "Set",
+- "xyz.openbmc_project.Software.Activation", "RequestedActivation",
+- std::variant<std::string>(
+- "xyz.openbmc_project.Software.Activation.RequestedActivations."
+- "Active"));
++ "xyz.openbmc_project.ObjectMapper",
++ "/xyz/openbmc_project/object_mapper",
++ "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/",
++ static_cast<int32_t>(0), std::array<const char *, 1>{versionIntf});
+ }
+
+ // Note that asyncResp can be either a valid pointer or nullptr. If nullptr
+ // then no asyncResp updates will occur
+ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
++ const std::vector<std::string> imgUriTargets,
+ sdbusplus::message::message &m)
+ {
+ std::vector<std::pair<
+@@ -69,27 +171,24 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
+
+ m.read(objPath, interfacesProperties);
+
+- BMCWEB_LOG_DEBUG << "obj path = " << objPath.str;
++ BMCWEB_LOG_DEBUG << "Software Interface Added. objPath = " << objPath.str;
+ for (auto &interface : interfacesProperties)
+ {
+- BMCWEB_LOG_DEBUG << "interface = " << interface.first;
+-
+- if (interface.first == "xyz.openbmc_project.Software.Activation")
++ if (interface.first == activationIntf)
+ {
+ // Found our interface, disable callbacks
+ fwUpdateMatcher = nullptr;
+-
+ // Retrieve service and activate
+ crow::connections::systemBus->async_method_call(
+- [objPath, asyncResp](
++ [objPath, asyncResp, imgTargets{imgUriTargets}](
+ const boost::system::error_code error_code,
+ const std::vector<std::pair<
+ std::string, std::vector<std::string>>> &objInfo) {
+ if (error_code)
+ {
+- BMCWEB_LOG_DEBUG << "error_code = " << error_code;
+- BMCWEB_LOG_DEBUG << "error msg = "
+- << error_code.message();
++ BMCWEB_LOG_DEBUG
++ << "GetSoftwareObject path failed: ec = "
++ << error_code;
+ if (asyncResp)
+ {
+ messages::internalError(asyncResp->res);
+@@ -113,8 +212,7 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
+ // xyz.openbmc_project.Software.Activation interface
+ // is added
+ fwAvailableTimer = nullptr;
+-
+- activateImage(objPath.str, objInfo[0].first);
++ activateImage(objPath.str, objInfo[0].first, imgTargets);
+ if (asyncResp)
+ {
+ redfish::messages::success(asyncResp->res);
+@@ -124,17 +222,16 @@ static void softwareInterfaceAdded(std::shared_ptr<AsyncResp> asyncResp,
+ "xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetObject", objPath.str,
+- std::array<const char *, 1>{
+- "xyz.openbmc_project.Software.Activation"});
++ std::array<const char *, 1>{activationIntf});
+ }
+ }
+ }
+
+ // Note that asyncResp can be either a valid pointer or nullptr. If nullptr
+ // then no asyncResp updates will occur
+-static void monitorForSoftwareAvailable(std::shared_ptr<AsyncResp> asyncResp,
+- const crow::Request &req,
+- int timeoutTimeSeconds = 5)
++static void monitorForSoftwareAvailable(
++ std::shared_ptr<AsyncResp> asyncResp, const crow::Request &req,
++ const std::vector<std::string> &imgUriTargets, int timeoutTimeSeconds = 5)
+ {
+ // Only allow one FW update at a time
+ if (fwUpdateInProgress != false)
+@@ -145,7 +242,6 @@ static void monitorForSoftwareAvailable(std::shared_ptr<AsyncResp> asyncResp,
+ }
+ return;
+ }
+-
+ fwAvailableTimer =
+ std::make_unique<boost::asio::steady_timer>(*req.ioService);
+
+@@ -174,10 +270,10 @@ static void monitorForSoftwareAvailable(std::shared_ptr<AsyncResp> asyncResp,
+ }
+ });
+
+- auto callback = [asyncResp](sdbusplus::message::message &m) {
+- BMCWEB_LOG_DEBUG << "Match fired";
+- softwareInterfaceAdded(asyncResp, m);
+- };
++ auto callback =
++ [asyncResp, imgTargets{imgUriTargets}](sdbusplus::message::message &m) {
++ softwareInterfaceAdded(asyncResp, imgTargets, m);
++ };
+
+ fwUpdateInProgress = true;
+
+@@ -286,9 +382,12 @@ class UpdateServiceActionsSimpleUpdate : public Node
+ std::string fwFile = imageURI.substr(separator + 1);
+ BMCWEB_LOG_DEBUG << "Server: " << tftpServer + " File: " << fwFile;
+
++ // We will pass empty targets and its handled in activation.
++ std::vector<std::string> httpUriTargets;
++
+ // Setup callback for when new software detected
+ // Give TFTP 2 minutes to complete
+- monitorForSoftwareAvailable(nullptr, req, 120);
++ monitorForSoftwareAvailable(nullptr, req, httpUriTargets, 120);
+
+ // TFTP can take up to 2 minutes depending on image size and
+ // connection speed. Return to caller as soon as the TFTP operation
+@@ -322,7 +421,8 @@ class UpdateServiceActionsSimpleUpdate : public Node
+ class UpdateService : public Node
+ {
+ public:
+- UpdateService(CrowApp &app) : Node(app, "/redfish/v1/UpdateService/")
++ UpdateService(CrowApp &app) :
++ Node(app, "/redfish/v1/UpdateService/"), httpPushUriTargetBusy(false)
+ {
+ entityPrivileges = {
+ {boost::beast::http::verb::get, {{"Login"}}},
+@@ -334,6 +434,9 @@ class UpdateService : public Node
+ }
+
+ private:
++ std::vector<std::string> httpPushUriTargets;
++ bool httpPushUriTargetBusy;
++
+ void doGet(crow::Response &res, const crow::Request &req,
+ const std::vector<std::string> &params) override
+ {
+@@ -346,6 +449,8 @@ class UpdateService : public Node
+ res.jsonValue["Description"] = "Service for Software Update";
+ res.jsonValue["Name"] = "Update Service";
+ res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService";
++ res.jsonValue["HttpPushUriTargets"] = httpPushUriTargets;
++ res.jsonValue["HttpPushUriTargetsBusy"] = httpPushUriTargetBusy;
+ // UpdateService cannot be disabled
+ res.jsonValue["ServiceEnabled"] = true;
+ res.jsonValue["FirmwareInventory"] = {
+@@ -405,9 +510,14 @@ class UpdateService : public Node
+ std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
+ std::optional<nlohmann::json> pushUriOptions;
+- if (!json_util::readJson(req, res, "HttpPushUriOptions",
+- pushUriOptions))
++ std::optional<std::vector<std::string>> imgTargets;
++ std::optional<bool> imgTargetBusy;
++
++ if (!json_util::readJson(req, res, "HttpPushUriOptions", pushUriOptions,
++ "HttpPushUriTargets", imgTargets,
++ "HttpPushUriTargetsBusy", imgTargetBusy))
+ {
++ BMCWEB_LOG_DEBUG << "UpdateService doPatch: Invalid request body";
+ return;
+ }
+
+@@ -464,7 +574,6 @@ class UpdateService : public Node
+ messages::internalError(asyncResp->res);
+ return;
+ }
+- messages::success(asyncResp->res);
+ },
+ "xyz.openbmc_project.Settings",
+ "/xyz/openbmc_project/software/apply_time",
+@@ -475,6 +584,98 @@ class UpdateService : public Node
+ }
+ }
+ }
++
++ if (imgTargetBusy)
++ {
++ if ((httpPushUriTargetBusy) && (*imgTargetBusy))
++ {
++ BMCWEB_LOG_DEBUG
++ << "Other client has reserved the HttpPushUriTargets "
++ "property for firmware updates.";
++ messages::resourceInUse(asyncResp->res);
++ return;
++ }
++
++ if (imgTargets)
++ {
++ if (!(*imgTargetBusy))
++ {
++ BMCWEB_LOG_DEBUG
++ << "UpdateService doPatch: httpPushUriTargetBusy "
++ "should be "
++ "true before setting httpPushUriTargets";
++ messages::invalidObject(asyncResp->res,
++ "HttpPushUriTargetsBusy");
++ return;
++ }
++ if ((*imgTargets).size() != 0)
++ {
++ // TODO: Now we support max one target becuase
++ // software-manager code support one activation per object.
++ // It will be enhanced to multiple targets for single image
++ // in future. For now, consider first target alone.
++ if ((*imgTargets).size() != 1)
++ {
++ messages::invalidObject(asyncResp->res,
++ "HttpPushUriTargets");
++ return;
++ }
++ crow::connections::systemBus->async_method_call(
++ [this, asyncResp, uriTargets{*imgTargets},
++ targetBusy{*imgTargetBusy}](
++ const boost::system::error_code ec,
++ const std::vector<std::string> swInvPaths) {
++ if (ec)
++ {
++ return;
++ }
++
++ bool swInvObjFound = false;
++ for (const std::string &path : swInvPaths)
++ {
++ std::size_t idPos = path.rfind("/");
++ if ((idPos == std::string::npos) ||
++ ((idPos + 1) >= path.size()))
++ {
++ messages::internalError(asyncResp->res);
++ BMCWEB_LOG_DEBUG
++ << "Can't parse firmware ID!!";
++ return;
++ }
++ std::string swId = path.substr(idPos + 1);
++
++ if (swId == uriTargets[0])
++ {
++ swInvObjFound = true;
++ break;
++ }
++ }
++ if (!swInvObjFound)
++ {
++ messages::invalidObject(asyncResp->res,
++ "HttpPushUriTargets");
++ return;
++ }
++ this->httpPushUriTargetBusy = targetBusy;
++ this->httpPushUriTargets = uriTargets;
++ },
++ "xyz.openbmc_project.ObjectMapper",
++ "/xyz/openbmc_project/object_mapper",
++ "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths",
++ "/", static_cast<int32_t>(0),
++ std::array<const char *, 1>{versionIntf});
++ }
++ else
++ {
++ httpPushUriTargetBusy = *imgTargetBusy;
++ httpPushUriTargets = *imgTargets;
++ }
++ }
++ else
++ {
++ httpPushUriTargetBusy = *imgTargetBusy;
++ }
++ }
+ }
+
+ void doPost(crow::Response &res, const crow::Request &req,
+@@ -485,7 +686,7 @@ class UpdateService : public Node
+ std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
+
+ // Setup callback for when new software detected
+- monitorForSoftwareAvailable(asyncResp, req);
++ monitorForSoftwareAvailable(asyncResp, req, httpPushUriTargets);
+
+ std::string filepath(
+ "/tmp/images/" +
+@@ -569,9 +770,7 @@ class SoftwareInventoryCollection : public Node
+ "xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/",
+- static_cast<int32_t>(0),
+- std::array<const char *, 1>{
+- "xyz.openbmc_project.Software.Version"});
++ static_cast<int32_t>(0), std::array<const char *, 1>{versionIntf});
+ }
+ };
+
+@@ -756,7 +955,7 @@ class SoftwareInventory : public Node
+ },
+ obj.second[0].first, obj.first,
+ "org.freedesktop.DBus.Properties", "GetAll",
+- "xyz.openbmc_project.Software.Version");
++ versionIntf);
+ }
+ if (!found)
+ {
+@@ -778,9 +977,7 @@ class SoftwareInventory : public Node
+ "xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTree", "/",
+- static_cast<int32_t>(0),
+- std::array<const char *, 1>{
+- "xyz.openbmc_project.Software.Version"});
++ static_cast<int32_t>(0), std::array<const char *, 1>{versionIntf});
+ }
+ };
+
+--
+2.7.4
+
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 93e684cd7..00eb38799 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 = "274dfe625f862e8ded2d4eb88dd856cf66bf54bf"
+SRCREV = "97d57aaa0b95a110c71016d190f95f853051126a"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -9,6 +9,9 @@ USERADD_PARAM_${PN} = "-r -s /usr/sbin/nologin -d /home/bmcweb -m -G shadow bmcw
GROUPADD_PARAM_${PN} = "web; redfish "
+SRC_URI += "file://0001-Firmware-update-support-for-StandBySpare.patch \
+ "
+
# Enable CPU Log and Raw PECI support
EXTRA_OECMAKE += "-DBMCWEB_ENABLE_REDFISH_CPU_LOG=ON"
EXTRA_OECMAKE += "-DBMCWEB_ENABLE_REDFISH_RAW_PECI=ON"
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 0d1a5abbb..bc8c72f13 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
@@ -1,7 +1,7 @@
-From 27b94aa1df83abad63cbba69525273194b14ab9c Mon Sep 17 00:00:00 2001
+From 1c8cb6b7c99ad85f470aa87095fcfb4de822ddb1 Mon Sep 17 00:00:00 2001
From: Cheng C Yang <cheng.c.yang@intel.com>
Date: Wed, 16 Oct 2019 14:24:20 +0800
-Subject: [PATCH] Move Set SOL config parameter to host-ipmid
+Subject: [PATCH 1/1] Move Set SOL config parameter to host-ipmid
Move Set SOL config parameter command from net-ipmid to host-ipmid,
so that BIOS in Intel platform can enable or disable SOL through KCS.
@@ -21,13 +21,14 @@ After reboot BMC, "Progress" property in dbus interface change back
to 0 and other properties will not reset to default value.
Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
+Signed-off-by: James Feist <james.feist@linux.intel.com>
---
host-ipmid-whitelist.conf | 1 +
- transporthandler.cpp | 322 ++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 323 insertions(+)
+ transporthandler.cpp | 294 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 295 insertions(+)
diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf
-index e8df7c7..f030ef4 100644
+index 5397115..c93f3b1 100644
--- a/host-ipmid-whitelist.conf
+++ b/host-ipmid-whitelist.conf
@@ -41,6 +41,7 @@
@@ -39,10 +40,10 @@ index e8df7c7..f030ef4 100644
0x2C:0x01 //<Group Extension>:<Get DCMI Capabilities>
0x2C:0x02 //<Group Extension>:<Get Power Reading>
diff --git a/transporthandler.cpp b/transporthandler.cpp
-index e88eb63..4a42e7b 100644
+index 61065ad..59e38ea 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
-@@ -1469,8 +1469,323 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
+@@ -1469,8 +1469,298 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly,
} // namespace transport
} // namespace ipmi
@@ -136,31 +137,6 @@ index e88eb63..4a42e7b 100644
+ return 0;
+}
+
-+void initializeSOLInProgress()
-+{
-+ ipmi::ChannelInfo chInfo;
-+ for (int chNum = 0; chNum < ipmi::maxIpmiChannels; chNum++)
-+ {
-+ if (!ipmi::isValidChannel(static_cast<uint8_t>(chNum)))
-+ {
-+ continue;
-+ }
-+ ipmi_ret_t compCode =
-+ ipmi::getChannelInfo(static_cast<uint8_t>(chNum), chInfo);
-+ if (compCode != IPMI_CC_OK ||
-+ chInfo.mediumType !=
-+ static_cast<uint8_t>(ipmi::EChannelMediumType::lan8032))
-+ {
-+ continue;
-+ }
-+ if (setSOLParameter("Progress", static_cast<uint8_t>(0), chNum) < 0)
-+ {
-+ phosphor::logging::log<phosphor::logging::level::ERR>(
-+ "Error initialize sol progress");
-+ }
-+ }
-+}
-+
+static const constexpr uint8_t encryptMask = 0x80;
+static const constexpr uint8_t encryptShift = 7;
+static const constexpr uint8_t authMask = 0x40;
@@ -366,7 +342,7 @@ index e88eb63..4a42e7b 100644
void register_netfn_transport_functions()
{
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
-@@ -1479,4 +1794,11 @@ void register_netfn_transport_functions()
+@@ -1479,4 +1769,8 @@ void register_netfn_transport_functions()
ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
ipmi::transport::cmdGetLanConfigParameters,
ipmi::Privilege::Operator, ipmi::transport::getLan);
@@ -374,10 +350,7 @@ index e88eb63..4a42e7b 100644
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
+ ipmi::transport::cmdSetSolConfigParameters,
+ ipmi::Privilege::Admin, setSOLConfParams);
-+
-+ // Initialize dbus property progress to 0 every time sol manager restart.
-+ initializeSOLInProgress();
}
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch
index 01a3e49b8..61ac5fede 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch
@@ -1,7 +1,7 @@
-From e8ad148601fc3b45fac9092fdd45c537433e662f Mon Sep 17 00:00:00 2001
+From b5400c4bc756a800fbeb4cc53117956fb59dc57d Mon Sep 17 00:00:00 2001
From: Cheng C Yang <cheng.c.yang@intel.com>
Date: Thu, 11 Jul 2019 00:32:58 +0800
-Subject: [PATCH] Move Get SOL config parameter to host-ipmid
+Subject: [PATCH 1/1] Move Get SOL config parameter to host-ipmid
Move Get SOL config parameter command from net-ipmid to host-ipmid.
@@ -22,16 +22,17 @@ Payload Channel : 1 (0x01)
Payload Port : 623
Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com>
+Signed-off-by: James Feist <james.feist@linux.intel.com>
---
host-ipmid-whitelist.conf | 1 +
- transporthandler.cpp | 191 ++++++++++++++++++++++++++++++++++++++++++++++
+ transporthandler.cpp | 191 ++++++++++++++++++++++++++++++++++++++
2 files changed, 192 insertions(+)
diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf
-index 44c2181..0fcac4e 100644
+index c93f3b1..730437d 100644
--- a/host-ipmid-whitelist.conf
+++ b/host-ipmid-whitelist.conf
-@@ -41,6 +41,7 @@
+@@ -42,6 +42,7 @@
0x0A:0x49 //<Storage>:<Set SEL Time>
0x0C:0x02 //<Transport>:<Get LAN Configuration Parameters>
0x0C:0x21 //<Transport>:<Set SOL Configuration Parameters>
@@ -40,10 +41,10 @@ index 44c2181..0fcac4e 100644
0x2C:0x01 //<Group Extension>:<Get DCMI Capabilities>
0x2C:0x02 //<Group Extension>:<Get Power Reading>
diff --git a/transporthandler.cpp b/transporthandler.cpp
-index 25062ae..9ba2868 100644
+index 59e38ea..b64953f 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
-@@ -1719,6 +1719,28 @@ static int getSOLParameter(const std::string& property, ipmi::Value& value,
+@@ -1559,6 +1559,28 @@ static int getSOLParameter(const std::string& property, ipmi::Value& value,
return 0;
}
@@ -69,10 +70,10 @@ index 25062ae..9ba2868 100644
+ return 0;
+}
+
- void initializeSOLInProgress()
- {
- ipmi::ChannelInfo chInfo;
-@@ -1913,6 +1935,171 @@ ipmi::RspType<> setSOLConfParams(ipmi::Context::ptr ctx, uint4_t chNum,
+ static const constexpr uint8_t encryptMask = 0x80;
+ static const constexpr uint8_t encryptShift = 7;
+ static const constexpr uint8_t authMask = 0x40;
+@@ -1761,6 +1783,171 @@ ipmi::RspType<> setSOLConfParams(ipmi::Context::ptr ctx, uint4_t chNum,
return ipmi::responseSuccess();
}
@@ -243,18 +244,16 @@ index 25062ae..9ba2868 100644
+
void register_netfn_transport_functions()
{
- // As this timer is only for transport handler
-@@ -1934,6 +2121,10 @@ void register_netfn_transport_functions()
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
+@@ -1773,4 +1960,8 @@ void register_netfn_transport_functions()
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
ipmi::transport::cmdSetSolConfigParameters,
ipmi::Privilege::Admin, setSOLConfParams);
-
++
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport,
+ ipmi::transport::cmdGetSolConfigParameters,
+ ipmi::Privilege::User, getSOLConfParams);
-+
- // Initialize dbus property progress to 0 every time sol manager restart.
- initializeSOLInProgress();
-
+ }
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Update-provisioning-mode-filter-logic.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Update-provisioning-mode-filter-logic.patch
index 57a31c991..5cd8b3ec4 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Update-provisioning-mode-filter-logic.patch
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Update-provisioning-mode-filter-logic.patch
@@ -1,7 +1,7 @@
-From 3279300bb9afd1f169b35b7830d7f054045ab35f Mon Sep 17 00:00:00 2001
+From dcfce847654bd7e2475ad74bedf569b6120701dd Mon Sep 17 00:00:00 2001
From: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Date: Tue, 18 Jun 2019 19:42:30 +0530
-Subject: [PATCH] Update provisioning mode filter logic
+Subject: [PATCH 1/1] Update provisioning mode filter logic
Updated provisioning mode filtering logic support. Based on the
RestrictionMode property, Host (system) interface commands will be
@@ -20,12 +20,13 @@ whitelist (Note: New whitelist conf is under review).
Change-Id: I7a14e827d70e2d8d6975e600a0fd00e2a790bc22
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
+Signed-off-by: James Feist <james.feist@linux.intel.com>
---
- whitelist-filter.cpp | 155 ++++++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 122 insertions(+), 33 deletions(-)
+ whitelist-filter.cpp | 191 ++++++++++++++++++++++++++++++-------------
+ 1 file changed, 136 insertions(+), 55 deletions(-)
diff --git a/whitelist-filter.cpp b/whitelist-filter.cpp
-index 9f1e7c8..2c56087 100644
+index 9f1e7c8..53461b4 100644
--- a/whitelist-filter.cpp
+++ b/whitelist-filter.cpp
@@ -25,6 +25,7 @@ namespace
@@ -36,7 +37,7 @@ index 9f1e7c8..2c56087 100644
public:
WhitelistFilter();
~WhitelistFilter() = default;
-@@ -35,17 +36,26 @@ class WhitelistFilter
+@@ -35,17 +36,24 @@ class WhitelistFilter
private:
void postInit();
@@ -53,8 +54,7 @@ index 9f1e7c8..2c56087 100644
+ RestrictionMode::Modes::ProvisionedHostWhitelist;
+ bool postCompleted = false;
std::shared_ptr<sdbusplus::asio::connection> bus;
- std::unique_ptr<settings::Objects> objects;
-+ std::unique_ptr<settings::Objects> postCompleteObj;
+- std::unique_ptr<settings::Objects> objects;
std::unique_ptr<sdbusplus::bus::match::match> modeChangeMatch;
+ std::unique_ptr<sdbusplus::bus::match::match> postCompleteMatch;
@@ -65,7 +65,7 @@ index 9f1e7c8..2c56087 100644
};
WhitelistFilter::WhitelistFilter()
-@@ -63,16 +73,22 @@ WhitelistFilter::WhitelistFilter()
+@@ -63,43 +71,83 @@ WhitelistFilter::WhitelistFilter()
post_work([this]() { postInit(); });
}
@@ -73,24 +73,40 @@ index 9f1e7c8..2c56087 100644
+void WhitelistFilter::cacheRestrictedAndPostCompleteMode()
{
using namespace sdbusplus::xyz::openbmc_project::Control::Security::server;
++
std::string restrictionModeSetting;
std::string restrictionModeService;
+ std::string systemOsStatusPath;
+ std::string systemOsStatusService;
try
{
- restrictionModeSetting = objects->map.at(restrictionModeIntf).at(0);
+- restrictionModeSetting = objects->map.at(restrictionModeIntf).at(0);
++ auto objects = settings::Objects(
++ *bus, std::vector<settings::Interface>({restrictionModeIntf}));
++ auto postCompleteObj = settings::Objects(
++ *bus, std::vector<settings::Interface>({systemOsStatusIntf}));
++
++ restrictionModeSetting = objects.map.at(restrictionModeIntf).at(0);
restrictionModeService =
- objects->service(restrictionModeSetting, restrictionModeIntf);
+- objects->service(restrictionModeSetting, restrictionModeIntf);
++ objects.service(restrictionModeSetting, restrictionModeIntf);
+
-+ systemOsStatusPath = postCompleteObj->map.at(systemOsStatusIntf).at(0);
++ systemOsStatusPath = postCompleteObj.map.at(systemOsStatusIntf).at(0);
+ systemOsStatusService =
-+ postCompleteObj->service(systemOsStatusPath, systemOsStatusIntf);
++ postCompleteObj.service(systemOsStatusPath, systemOsStatusIntf);
}
catch (const std::out_of_range& e)
{
-@@ -80,26 +96,50 @@ void WhitelistFilter::cacheRestrictedMode()
- "Could not look up restriction mode interface from cache");
+- log<level::ERR>(
+- "Could not look up restriction mode interface from cache");
++ log<level::INFO>(
++ "Could not initialize provisioning mode, defaulting to restricted");
++ return;
++ }
++ catch (const std::exception&)
++ {
++ log<level::INFO>(
++ "Could not initialize provisioning mode, defaulting to restricted");
return;
}
+
@@ -98,11 +114,11 @@ index 9f1e7c8..2c56087 100644
[this](boost::system::error_code ec, ipmi::Value v) {
if (ec)
{
- log<level::ERR>("Error in RestrictionMode Get");
- // Fail-safe to true.
+- log<level::ERR>("Error in RestrictionMode Get");
+- // Fail-safe to true.
- restrictedMode = true;
-+ restrictionMode =
-+ RestrictionMode::Modes::ProvisionedHostWhitelist;
++ log<level::INFO>("Could not initialize provisioning mode, "
++ "defaulting to restricted");
return;
}
auto mode = std::get<std::string>(v);
@@ -147,7 +163,7 @@ index 9f1e7c8..2c56087 100644
}
void WhitelistFilter::handleRestrictedModeChange(sdbusplus::message::message& m)
-@@ -112,23 +152,44 @@ void WhitelistFilter::handleRestrictedModeChange(sdbusplus::message::message& m)
+@@ -112,61 +160,94 @@ void WhitelistFilter::handleRestrictedModeChange(sdbusplus::message::message& m)
{
if (property.first == "RestrictionMode")
{
@@ -164,16 +180,24 @@ index 9f1e7c8..2c56087 100644
+ log<level::INFO>(
+ "Updated restriction mode",
+ entry("VALUE=%d", static_cast<int>(restrictionMode)));
-+ }
-+ }
-+}
+ }
+ }
+ }
+-
+-void WhitelistFilter::postInit()
+void WhitelistFilter::handlePostCompleteChange(sdbusplus::message::message& m)
-+{
+ {
+- objects = std::make_unique<settings::Objects>(
+- *bus, std::vector<settings::Interface>({restrictionModeIntf}));
+- if (!objects)
+ std::string intf;
+ std::vector<std::pair<std::string, ipmi::Value>> propertyList;
+ m.read(intf, propertyList);
+ for (const auto& property : propertyList)
-+ {
+ {
+- log<level::ERR>(
+- "Failed to create settings object; defaulting to restricted mode");
+- return;
+ if (property.first == "OperatingSystemState")
+ {
+ std::string value = std::get<std::string>(property.second);
@@ -187,47 +211,38 @@ index 9f1e7c8..2c56087 100644
+ }
+ log<level::INFO>(postCompleted ? "Updated to POST Complete"
+ : "Updated to !POST Complete");
- }
++ }
}
- }
-
- void WhitelistFilter::postInit()
- {
- objects = std::make_unique<settings::Objects>(
- *bus, std::vector<settings::Interface>({restrictionModeIntf}));
-- if (!objects)
-+ postCompleteObj = std::make_unique<settings::Objects>(
-+ *bus, std::vector<settings::Interface>({systemOsStatusIntf}));
-+ if (!objects || !postCompleteObj)
- {
- log<level::ERR>(
- "Failed to create settings object; defaulting to restricted mode");
-@@ -136,37 +197,65 @@ void WhitelistFilter::postInit()
- }
-
++}
++void WhitelistFilter::postInit()
++{
// Initialize restricted mode
- cacheRestrictedMode();
+ cacheRestrictedAndPostCompleteMode();
// Wait for changes on Restricted mode
- std::string filterStr;
-+ std::string filterStrModeChange;
-+ std::string filterStrPostComplete;
- try
- {
+- try
+- {
- filterStr = sdbusplus::bus::match::rules::propertiesChanged(
-+ filterStrModeChange = sdbusplus::bus::match::rules::propertiesChanged(
- objects->map.at(restrictionModeIntf).at(0), restrictionModeIntf);
-+ filterStrPostComplete = sdbusplus::bus::match::rules::propertiesChanged(
-+ postCompleteObj->map.at(systemOsStatusIntf).at(0),
-+ systemOsStatusIntf);
- }
- catch (const std::out_of_range& e)
- {
+- objects->map.at(restrictionModeIntf).at(0), restrictionModeIntf);
+- }
+- catch (const std::out_of_range& e)
+- {
- log<level::ERR>("Failed to determine restriction mode filter string");
-+ log<level::ERR>("Failed to determine restriction mode / POST complete "
-+ "filter string");
- return;
- }
+- return;
+- }
++ namespace rules = sdbusplus::bus::match::rules;
++ const std::string filterStrModeChange =
++ rules::type::signal() + rules::member("PropertiesChanged") +
++ rules::interface("org.freedesktop.DBus.Properties") +
++ rules::argN(0, restrictionModeIntf);
++
++ const std::string filterStrPostComplete =
++ rules::type::signal() + rules::member("PropertiesChanged") +
++ rules::interface("org.freedesktop.DBus.Properties") +
++ rules::argN(0, systemOsStatusIntf);
++
modeChangeMatch = std::make_unique<sdbusplus::bus::match::match>(
- *bus, filterStr, [this](sdbusplus::message::message& m) {
+ *bus, filterStrModeChange, [this](sdbusplus::message::message& m) {
@@ -252,16 +267,16 @@ index 9f1e7c8..2c56087 100644
- whitelist.cbegin(), whitelist.cend(),
- std::make_pair(request->ctx->netFn, request->ctx->cmd)))
+ if (!postCompleted)
++ {
++ // Allow all commands, till POST is not completed
++ return ipmi::ccSuccess;
++ }
++ switch (restrictionMode)
{
- log<level::ERR>("Net function not whitelisted",
- entry("NETFN=0x%X", int(request->ctx->netFn)),
- entry("CMD=0x%X", int(request->ctx->cmd)));
- return ipmi::ccInsufficientPrivilege;
-+ // Allow all commands, till POST is not completed
-+ return ipmi::ccSuccess;
-+ }
-+ switch (restrictionMode)
-+ {
+ case RestrictionMode::Modes::ProvisionedHostWhitelist:
+ {
+ if (!std::binary_search(
@@ -282,5 +297,5 @@ index 9f1e7c8..2c56087 100644
}
return ipmi::ccSuccess;
--
-2.7.4
+2.17.1
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
index 30a4dec25..1e45ee6c9 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/phosphor-ipmi-host.service
@@ -1,16 +1,5 @@
[Unit]
Description=Phosphor Inband IPMI
-# TODO openbmc/openbmc#2059 - The wants/after below should be based on providers
-Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot.service
-After=mapper-wait@-xyz-openbmc_project-control-host0-boot.service
-Wants=mapper-wait@-xyz-openbmc_project-control-host0-boot-one_time.service
-After=mapper-wait@-xyz-openbmc_project-control-host0-boot-one_time.service
-Wants=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
-After=mapper-wait@-xyz-openbmc_project-control-host0-power_restore_policy.service
-Wants=mapper-wait@-xyz-openbmc_project-control-security-restriction_mode.service
-After=mapper-wait@-xyz-openbmc_project-control-security-restriction_mode.service
-Wants=mapper-wait@-xyz-openbmc_project-state-os.service
-After=mapper-wait@-xyz-openbmc_project-state-os.service
[Service]
Restart=always
@@ -23,4 +12,4 @@ RuntimeDirectoryPreserve = yes
StateDirectory = ipmi
[Install]
-WantedBy={SYSTEMD_DEFAULT_TARGET}
+WantedBy=basic.target
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 9f3bf81ca..b488e6d8e 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 = "49a94b2f82fb1aa68d608f28c4863bb36661a3a4"
+SRCREV = "0f63e01ce6bb11920d78d999267558500ca9a272"
USERADD_PACKAGES = "${PN}"
# add a group called ipmi
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 6d8334865..635f2d3a4 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
@@ -2,8 +2,8 @@ SUMMARY = "Node Manager Proxy"
DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicating \
with Management Engine via IPMB"
-SRC_URI = "git://git@github.com/Intel-BMC/node-manager;protocol=ssh"
-SRCREV = "a0d3ec079f569c47af21d8cafe46e65f5784cd5b"
+SRC_URI = "git://github.com/Intel-BMC/node-manager;protocol=ssh"
+SRCREV = "13c62849bce28161fc58134c52920e0c494745f9"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb
index 177f5c98f..620a2ab51 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/multi-node-manager/multi-node-manager.bb
@@ -1,7 +1,7 @@
SUMMARY = "Multi node manager"
DESCRIPTION = "Daemon to handle chassis level shared resources on multi-node platform"
-SRC_URI = "git://git@github.com/Intel-BMC/multi-node-manager.git;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/multi-node-manager.git;protocol=ssh"
SRCREV = "34d959285a3ca12c4bfefa4040d82d571c78843b"
PV = "0.1+git${SRCPV}"
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 78b6dd2bd..d89b30380 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
@@ -8,9 +8,9 @@ S = "${WORKDIR}/git/phosphor-u-boot-env-mgr"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.U_Boot.Environment.Manager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init
index 9de00fd2f..0e38f3aeb 100755
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/preinit-mounts/preinit-mounts/init
@@ -45,14 +45,21 @@ fi
# list of things that need to be rw at boot
NV_OVERLAYS="/etc /var /home"
-# place to mount the real ubifs backing store
+# place to mount the overlay backing store
+OVERLAY_MNT=/tmp/.overlay
+OVERLAY_SIZE=16384
+# place to mount NV
RWFS_MNT=/tmp/.rwfs
+# NV overlay storage
+OVERLAY_SYNC=${RWFS_MNT}/.overlay
if grep -q "$RWFS_MNT" /proc/mounts; then
# quit - we have already run
exit 0
fi
-mkdir -p "$RWFS_MNT"
+mkdir -p "$OVERLAY_MNT"
+# TODO: remount the overlay with a size limit?
+# mount -t tmpfs -o rw,size=${OVERLAY_SIZE} oltmp ${OVERLAY_MNT}
mtd_by_name() {
local name="$1"
@@ -73,10 +80,10 @@ NV_MTD_NUM="$(mtdnum_by_name ${NV_MTD})"
nvrw() {
local p="$1"
# Clear the work dir doing overlay mount
- rm -rf "${RWFS_MNT}${p}.work"
- mkdir -p "${RWFS_MNT}${p}" "${RWFS_MNT}${p}.work"
- local mname=$(echo "rwnv${p}" | sed 's,/,,g')
- local opts="lowerdir=${p},upperdir=${RWFS_MNT}${p},workdir=${RWFS_MNT}${p}.work,sync"
+ rm -rf "${OVERLAY_MNT}${p}.work"
+ mkdir -p "${OVERLAY_MNT}${p}" "${OVERLAY_MNT}${p}.work"
+ local mname=$(echo "ol${p}" | sed 's,/,,g')
+ local opts="lowerdir=${p},upperdir=${OVERLAY_MNT}${p},workdir=${OVERLAY_MNT}${p}.work,sync"
mount -t overlay -o "$opts" "$mname" "$p"
}
@@ -84,19 +91,19 @@ targeted_clean() {
log "restore-defaults: targeted_clean"
# Do not delete FRU info, ssh/ssl certs, or machine-id
(
- cd "${RWFS_MNT}/etc"
+ cd "${OVERLAY_SYNC}/etc"
find . ! -regex '.*\(/ssl\|/dropbear\|/machine-id\(_bkup\)\?\|/fru\).*' -exec rm -rf {} +
)
# nothing should be in the workdir, but clear it just in case
- rm -rf "${RWFS_MNT}/etc.work"
+ rm -rf "${OVERLAY_SYNC}/etc.work"
# clean everything out of /home
- rm -rf "${RWFS_MNT}/home" "${RWFS_MNT}/home.work"
+ rm -rf "${OVERLAY_SYNC}/home" "${OVERLAY_SYNC}/home.work"
# clean everything out of /var
- rm -rf "${RWFS_MNT}/var" "${RWFS_MNT}/var.work"
+ rm -rf "${OVERLAY_SYNC}/var" "${OVERLAY_SYNC}/var.work"
- echo "Files remaining: $(find $RWFS_MNT/)"
+ echo "Files remaining: $(find $OVERLAY_SYNC/)"
sync
}
@@ -104,7 +111,7 @@ full_clean() {
log "restore-defaults: full_clean"
local OVL=''
for OVL in $NV_OVERLAYS; do
- rm -rf "${RWFS_MNT}${OVL}" "${RWFS_MNT}${OVL}.work"
+ rm -rf "${OVERLAY_SYNC}${OVL}" "${OVERLAY_SYNC}${OVL}.work"
done
sync
}
@@ -153,7 +160,8 @@ clear_ubenv() {
flash_erase /dev/mtd/u-boot-env 0 0
}
-# mount a UBIFS on the UBI volume
+# mount NV filesystem
+mkdir -p "$RWFS_MNT"
prepare_ubi_volume $NV_MTD_NUM
mount -t ubifs -o sync "/dev/ubi${NV_MTD_NUM}_0" "$RWFS_MNT"
if [ $? -ne 0 ]; then
@@ -178,21 +186,14 @@ elif [ $restore_op -eq 3 ]; then
fi
rm -f $RESTORE_FLAG
+# Restore the overlay saved in the sync
+rsync -a --delete "${OVERLAY_SYNC}/" "${OVERLAY_MNT}"
+log "Restored overlay from sync location"
+
for FS in $NV_OVERLAYS; do
nvrw "$FS"
done
-# at first boot, fix up /var/volatile/{log,tmp} to be RW (due to yocto nonsense)
-if [ -L /var/log ]; then
- # remove symlink /var/log -> volatile/log; make /var/log non-volatile
- rm /var/log
- mkdir -p /var/log
- # remove symlink /var/tmp -> volatile/tmp; symlink to /tmp/var
- rm /var/tmp
- ln -s /tmp/var /var/tmp
-fi
-mkdir -p /tmp/var
-
# work around bug where /etc/machine-id will be mounted with a temporary file
# if rootfs is read-only and the file is empty
MACHINE_ID=/etc/machine-id
@@ -205,9 +206,9 @@ if [ ! -s "$MACHINE_ID" ]; then
# work around - Bug: Overlay fs fails for machine-id due to
# origin mismatch. Clean it up, from overlay fs before re-creating
# the same.
- if [ -e "$RWFS_MNT$MACHINE_ID" ]; then
+ if [ -e "$OVERLAY_MNT$MACHINE_ID" ]; then
umount "/etc"
- rm -f "$RWFS_MNT$MACHINE_ID"
+ rm -f "$OVERLAY_MNT$MACHINE_ID"
nvrw "/etc"
# Restore the machine-id from backup, else generate it.
if [ -s "${MACHINE_ID}_bkup" ]; then
@@ -237,6 +238,6 @@ if ! grep -q sofs /proc/mounts; then
fi
fi
-log "Finished mounting non-volatile overlays"
+log "Finished mounting nv and overlays"
exec /lib/systemd/systemd
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 94f0f8729..0b5a8f395 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
@@ -8,9 +8,9 @@ S = "${WORKDIR}/git/prov-mode-mgr"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
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
index 84e3f6c2b..6e1df2f89 100644
--- 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
@@ -9,8 +9,8 @@ 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"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.SecurityManager.service"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/selftest/intel-self-test_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/selftest/intel-self-test_git.bb
index da1d74207..f655d22e4 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/selftest/intel-self-test_git.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/selftest/intel-self-test_git.bb
@@ -1,7 +1,7 @@
SUMMARY = "BMC Self Test service"
DESCRIPTION = "BMC Self Test service for subsystem diagnosis failure info"
-SRC_URI = "git://git@github.com/Intel-BMC/intel-self-test;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/intel-self-test;protocol=ssh"
PV = "1.0+git${SRCPV}"
SRCREV = "d039998ad2c55aeae4191af30e15bbd3032508c1"
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 7da1cdc4d..f0bec9feb 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 = "2424cb7c9752cbecc3d133a67cf1c20f8589f2c1"
+SRCREV = "9f9b38d89a751e70cdf61bfb3f78c05800201f95"
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 b8e3aa8e5..f8fe0682d 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,13 +1,13 @@
SUMMARY = "Settings"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
PV = "0.1+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
-SYSTEMD_SERVICE_${PN} = "settings.service"
+SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Settings.service"
DEPENDS = "boost \
nlohmann-json \
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 9b339d260..a6f5a433e 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
@@ -8,8 +8,8 @@ S = "${WORKDIR}/git/special-mode-mgr"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}"
inherit cmake systemd
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 47202253a..05f97d1a9 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
@@ -8,8 +8,8 @@ S = "${WORKDIR}/git/srvcfg-manager"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
inherit cmake systemd
SYSTEMD_SERVICE_${PN} = "srvcfg-manager.service"
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 1ef186e3a..433bc7ca5 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
@@ -1,13 +1,13 @@
SUMMARY = "Callback Manager"
DESCRIPTION = "D-Bus daemon that registers matches that trigger method calls"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground;protocol=ssh"
+SRC_URI = "git://github.com/Intel-BMC/provingground;protocol=ssh"
inherit cmake systemd
DEPENDS = "boost sdbusplus"
PV = "0.1+git${SRCPV}"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
S = "${WORKDIR}/git/callback-manager"
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 a2c271885..ca86bd525 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
@@ -1,8 +1,8 @@
SUMMARY = "Virtual Media Service"
DESCRIPTION = "Virtual Media Service"
-SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
-SRCREV = "e1dbcef575309efeb04d275565a6e9649f3b89dd"
+SRC_URI = "git://github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "eddf621897090ba346b1aaa81a4b8be12076ab60"
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 2da438914..e77d8fd65 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=intel2"
-SRCREV = "b26d415f38684f86e19e09a8073f9d4244adcb97"
+SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2"
+SRCREV = "f9935eccf5b9de75d6622b3d0a719ce0f8a425d0"