diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2018-04-18 20:16:28 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-05-22 04:50:57 +0300 |
commit | b7380e0d758f31c83176566dee31f60c810d8b4a (patch) | |
tree | 6344a9bb9ad6f8e314131590f52d215251d0c3c2 /meta-phosphor/common/recipes-phosphor/flash | |
parent | e857ed00f5d4caf1b71e90ce7a8559a5a9095e3c (diff) | |
download | openbmc-b7380e0d758f31c83176566dee31f60c810d8b4a.tar.xz |
obmc-flash-bmc: Mount alt rwfs
Mount the rwfs of the alt-bmc chip if present when the BMC
boots up to be able to synchronize (backup files) from the
BMC rwfs to the alt one, for the case when a chip switch
occurs then the persistent data is available on the alt chip.
Create a persist/etc directory to backup the /etc files to
it since that's the overlay's upperdir for /etc.
Change-Id: Ibe287fa792c1e214ba35a43bc253da391728299a
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/flash')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc index 26f99cc130..875a90fe2d 100644 --- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc +++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc @@ -231,6 +231,17 @@ ubi_cleanup() { done } +mount_alt_rwfs() { + altNum="$(findmtdnum "alt-bmc")" + if [ ! -z "${altNum}" ]; then + altVarMount="/media/alt/var" + mkdir -p "${altVarMount}" + if mount ubi"${altNum}":rwfs "${altVarMount}" -t ubifs -o defaults; then + mkdir -p "${altVarMount}"/persist/etc + fi + fi +} + remount_ubi() { bmcmtd="$(findmtd "bmc")" altbmcmtd="$(findmtd "alt-bmc")" @@ -477,6 +488,7 @@ case "$1" in ;; ubiremount) remount_ubi + mount_alt_rwfs ;; createenvbackup) backup_env_vars |