summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/common/recipes-phosphor
diff options
context:
space:
mode:
authorSaqib Khan <khansa@us.ibm.com>2017-09-10 00:44:16 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-09-13 21:36:07 +0000
commit2743cb33c9bb93d049bde1dbf06ff70f3297ad18 (patch)
tree82f87dd46b67da94f3bf070b1af32fabb208044b /meta-openbmc-machines/meta-openpower/common/recipes-phosphor
parentd5eefc6686e7649cb720190b384db7f9c784e5fb (diff)
downloadtalos-openbmc-2743cb33c9bb93d049bde1dbf06ff70f3297ad18.tar.gz
talos-openbmc-2743cb33c9bb93d049bde1dbf06ff70f3297ad18.zip
Clear PNOR patch location while updating symlinks
- If the user has activated a new image, then clear all PNOR patches under /usr/local/share/pnor/ before the new HOST version powers on (i.e. during symlink updates). Resolves openbmc/openbmc#2273 Change-Id: I3ce3709a6813beaac812f3d1c00b065bad04d2fe Signed-off-by: Saqib Khan <khansa@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/common/recipes-phosphor')
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios2
1 files changed, 2 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 fdc7e3cd1..f82e6fb28 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
@@ -213,6 +213,7 @@ update_symlinks() {
PNOR_PRSV_ACTIVE_PATH="/var/lib/phosphor-software-manager/pnor/prsv"
PNOR_PRSV="/media/pnor-prsv"
PERSISTENCE_PATH="/var/lib/obmc/openpower-pnor-code-mgmt/"
+ PNOR_PATCH_LOCATION="/usr/local/share/pnor/"
# Get a list of all active PNOR versions
data="$(ls -d ${PNOR_RO_PREFIX}*)"
@@ -248,6 +249,7 @@ update_symlinks() {
# lowest priority, then remove the symlink and create new ones.
if [[ $(readlink -f "${PNOR_RO_ACTIVE_PATH}") != ${PNOR_RO_PREFIX}${currentVersion} ]]; then
rm -f ${PNOR_RO_ACTIVE_PATH}
+ rm -rf ${PNOR_PATCH_LOCATION}*
ln -sfv ${PNOR_RO_PREFIX}${currentVersion} ${PNOR_RO_ACTIVE_PATH}
fi
OpenPOWER on IntegriCloud