From b7380e0d758f31c83176566dee31f60c810d8b4a Mon Sep 17 00:00:00 2001 From: Adriana Kobylak Date: Wed, 18 Apr 2018 12:16:28 -0500 Subject: 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 --- .../flash/phosphor-software-manager/obmc-flash-bmc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'meta-phosphor') 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 26f99cc13..875a90fe2 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 -- cgit v1.2.3