commit | 828cf5a659d239c82d69b460545cfac9e71ec519 | [log] [tgz] |
---|---|---|
author | Saqib Khan <khansa@us.ibm.com> | Tue Sep 12 09:23:28 2017 -0500 |
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | Thu Sep 28 19:59:46 2017 +0000 |
tree | 8882b1d7003265ea5bc70dae7c6107b27a803f3c | |
parent | f1ea7c3e7b0fad511c7ab909bdd4c7da6c9cf3bb [diff] |
BMC: Update u-boot environment variables. - Create a service file that can update the u-boot variables (kernelname, root and ubiblock) to point to a different BMC version. - This service file will be called by the BMC ItemUpdater if a user sets BMC version priority to the lowest value. Change-Id: Ic83c7e7a1c36eefc6c0b1b12b2077f5a866db36c Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb index d4b4b4a..b54bd50 100644 --- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb +++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager.bb
@@ -74,6 +74,7 @@ obmc-flash-bmc-ubiro-remove@.service \ usr-local.mount \ obmc-flash-bmc-ubiremount.service \ + obmc-flash-bmc-updateubootvars@.service \ " # Name of the mtd device where the ubi volumes should be created
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 ddc0491..6725eaa 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
@@ -327,10 +327,10 @@ ubiremount) remount_ubi ;; - preupdate) + createenvbackup) backup_env_vars ;; - postupdate) + updateubootvars) version="$2" update_env_vars ;;
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service index 3606a10..c1fc709 100644 --- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service +++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service
@@ -5,9 +5,9 @@ [Service] Type=oneshot RemainAfterExit=no -ExecStartPre=/usr/bin/env obmc-flash-bmc preupdate +ExecStartPre=/usr/bin/env obmc-flash-bmc createenvbackup ExecStart=/usr/bin/env obmc-flash-bmc ubiro {RO_MTD} rofs-%i %i ExecStart=/usr/bin/env obmc-flash-bmc ubikernel {KERNEL_MTD} kernel-%i %i ExecStart=/usr/bin/env obmc-flash-bmc mtduboot u-boot %i -ExecStartPost=/usr/bin/env obmc-flash-bmc postupdate %i +ExecStartPost=/usr/bin/env obmc-flash-bmc updateubootvars %i SyslogIdentifier=obmc-flash-bmc
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-updateubootvars@.service b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-updateubootvars@.service new file mode 100644 index 0000000..bab0b02 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-updateubootvars@.service
@@ -0,0 +1,8 @@ +[Unit] +Description= Updates the u-boot variable to point BMC version to %I + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/usr/bin/env obmc-flash-bmc updateubootvars %i +SyslogIdentifier=obmc-flash-bmc