summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaqib Khan <khansa@us.ibm.com>2017-08-18 11:14:17 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-08-22 21:13:56 +0000
commiteebcd5fe997f936dd5800ac5eb364e8495e6b9cb (patch)
treeef72b82ae627705f4fb33a8de253b1c48626680c
parent3d0723deee866ba87b03dc6509395eb21c616bf6 (diff)
downloadtalos-openbmc-eebcd5fe997f936dd5800ac5eb364e8495e6b9cb.tar.gz
talos-openbmc-eebcd5fe997f936dd5800ac5eb364e8495e6b9cb.zip
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 <khansa@us.ibm.com>
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios4
1 files changed, 4 insertions, 0 deletions
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}"
OpenPOWER on IntegriCloud