From fb1950f0c3c27daac646d276ed24bcc4d5743c52 Mon Sep 17 00:00:00 2001 From: Michael Tritz Date: Mon, 13 Nov 2017 11:05:03 -0600 Subject: Block attempts to create a pnor-patch volume in field mode This patch improves the obmc-flash-bios script by blocking attempts to create and mount a pnor-patch volume when the system is in field mode. When this scenario is reached, the current behavior is to error out because the script tries to mount pnor-patch to /usr/local/share/pnor, which is inaccessible in field mode. This fix simply blocks these attempts to suppress the error message. Change-Id: I78b5171e66f194d7b8d2b1baa639ee29a1b11794 Signed-off-by: Michael Tritz --- .../recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta-openbmc-machines/meta-openpower') diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios index d92fad5d9..1c90e8b2f 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios @@ -112,6 +112,9 @@ mount_ubi() { pnordev="/dev/mtd${pnor}" if [[ "${name}" == "pnor-patch" ]]; then + if [[ "$(fw_printenv fieldmode 2>/dev/null)" == "fieldmode=true" ]]; then + return 0 + fi if [[ ! "$(hexdump -C -n 3 ${pnordev})" =~ "UBI" ]]; then return 0 fi -- cgit v1.2.1