obmc-phosphor-initfs: persist rwfs-purged on init

In obmc-init.sh, when /var/google/do-rwfs-purge triggers an RWFS wipe
(rm -rf $upper), also persist rwfs-purged directly into
$upper/var/google/rwfs-purged immediately (with sync) in addition to
/run/initramfs/rwfs-purged.

Previously, rwfs-purged was only copied into /var/google by
49-purge-rwfs.sh during the subsequent netboot. If that subsequent boot
does not run 49-purge-rwfs.sh or reboots before reaching it, the trip_id
in /run/initramfs/rwfs-purged (tmpfs) is lost and the next netboot
triggers a redundant second RWFS purge and hard reset cycle.

Tested:
- Verified obmc-init.sh persists $upper/var/google/rwfs-purged across
  reboots immediately after wiping $upper.

Google-Bug-Id: 502759705
Google-Bug-Id: 549688820
Change-Id: I0f5102f4aee31383434e06a9b00c9c74f72a90e4
Signed-off-by: Mohamed Elbadry <elbadrym@google.com>
1 file changed
tree: 127b042915de799cb1e7b1dbb184effd1a0b3a59
  1. classes/
  2. conf/
  3. dynamic-layers/
  4. recipes-benchmark/
  5. recipes-bsp/
  6. recipes-connectivity/
  7. recipes-core/
  8. recipes-devtools/
  9. recipes-extended/
  10. recipes-google/
  11. recipes-kernel/
  12. recipes-phosphor/
  13. recipes-support/
  14. recipes-tpm1/
  15. recipes-tpm2/
  16. recipes-x86/
  17. LICENSE
  18. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.