diff options
author | Milton D. Miller II <miltonm@us.ibm.com> | 2016-03-04 15:27:44 -0600 |
---|---|---|
committer | Milton D. Miller II <miltonm@us.ibm.com> | 2016-03-07 15:22:58 -0600 |
commit | 32906e3037190dfb3fdae1787b812ea5da35d0a6 (patch) | |
tree | 670d5413283b737730623982fbacfdabafc9aea3 /meta-phosphor/common/recipes-phosphor | |
parent | 0111a4871b9afcda022ce025fe1328223ae690fe (diff) | |
download | talos-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>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/clear-once/clear-once.bb | 8 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/clear-once/clear-once/clear-once.service | 15 |
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 |