summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-03-04 15:27:44 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-03-07 15:22:58 -0600
commit32906e3037190dfb3fdae1787b812ea5da35d0a6 (patch)
tree670d5413283b737730623982fbacfdabafc9aea3
parent0111a4871b9afcda022ce025fe1328223ae690fe (diff)
downloadtalos-openbmc-32906e3037190dfb3fdae1787b812ea5da35d0a6.tar.gz
talos-openbmc-32906e3037190dfb3fdae1787b812ea5da35d0a6.zip
Add clear-once service
Create a service unit to clear the openbmconce variable in the the u-boot environment with fw_setenv. Set the timeout to allow the flash to be written, even though we currently just update the ram shadow file. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/clear-once/clear-once.bb8
-rw-r--r--meta-phosphor/common/recipes-phosphor/clear-once/clear-once/clear-once.service15
2 files changed, 23 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/clear-once/clear-once.bb b/meta-phosphor/common/recipes-phosphor/clear-once/clear-once.bb
new file mode 100644
index 000000000..61e3c20cf
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/clear-once/clear-once.bb
@@ -0,0 +1,8 @@
+
+SUMMARY = "Clear boot-once variables"
+DESCRIPTION = "Clear u-boot variables used for one-time boot flow"
+
+RPROVIDES_${PN} += "clear-once"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
diff --git a/meta-phosphor/common/recipes-phosphor/clear-once/clear-once/clear-once.service b/meta-phosphor/common/recipes-phosphor/clear-once/clear-once/clear-once.service
new file mode 100644
index 000000000..a7641e661
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/clear-once/clear-once/clear-once.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Clear one time boot overrides
+
+ConditionFileNotEmpty=/etc/fw_env.config
+RequiresMountsFor=/run /sbin /etc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+
+# It took 7 seconds to erase and write flash, be conservative
+TimeoutStartSec=60
+Restart=no
+
+ExecStart=/sbin/fw_setenv openbmconce
OpenPOWER on IntegriCloud