From eebcd5fe997f936dd5800ac5eb364e8495e6b9cb Mon Sep 17 00:00:00 2001 From: Saqib Khan Date: Fri, 18 Aug 2017 11:14:17 -0500 Subject: Ignore ubipatch service if device not formatted as UBI - If the device is not formatted as UBI then an attempt to create a ubi volume for pnor patches will fail. - Added a check to return if device not formatted as UBI. Change-Id: I21ee263d63229fff09c69c602f40224f7723e5ad Signed-off-by: Saqib Khan --- .../recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios | 4 ++++ 1 file changed, 4 insertions(+) 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 befd08678..fdc7e3cd1 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 @@ -110,8 +110,12 @@ mount_ubi() { pnormtd="$(findmtd pnor)" pnor="${pnormtd#mtd}" ubidev="/dev/ubi${pnor}" + pnordev="/dev/mtd${pnor}" if [[ "${name}" == "pnor-patch" ]]; then + if [[ ! "$(hexdump -C -n 3 ${pnordev})" =~ "UBI" ]]; then + return 0 + fi mountdir="/usr/local/share/pnor" else mountdir="/media/${name}" -- cgit v1.2.1