oem: ibm: Add services to reset PHYP NVRAM
Create new services that delete the PHYP NVRAM files and re-create them
to be used by the bios factory reset method since it needs to clear all
host-related data as part of the reset.
Tested: Verified the PHYP NVRAM files were deleted and recreated:
root@p10bmc:~# ls -l /var/lib/pldm/PHYP-NVRAM*
-rw-r--r-- 1 root root 148897792 Aug 16 16:07
/var/lib/pldm/PHYP-NVRAM
root@p10bmc:~# systemctl start pldm-reset-phyp-nvram.service
Aug 16 18:55:53 p10bmc systemd[1]: Starting Reset PHYP-NVRAM file...
Aug 16 18:55:53 p10bmc systemd[1]: pldm-reset-phyp-nvram.service:
Deactivated successfully.
Aug 16 18:55:53 p10bmc systemd[1]: Finished Reset PHYP-NVRAM file.
Aug 16 18:55:53 p10bmc systemd[1]: Starting Create empty PHYP-NVRAM
file...
systemctl start Aug 16 18:55:54 p10bmc dd[622]: 145408+0 records in
Aug 16 18:55:54 p10bmc dd[622]: 145408+0 records out
Aug 16 18:55:54 p10bmc systemd[1]: pldm-create-phyp-nvram.service:
Deactivated successfully.
Aug 16 18:55:54 p10bmc systemd[1]: Finished Create empty PHYP-NVRAM
file.
root@p10bmc:~# ls -l /var/lib/pldm/PHYP-NVRAM*
-rw-r--r-- 1 root root 148897792 Aug 16 18:55
/var/lib/pldm/PHYP-NVRAM
Change-Id: Ice10ff48d32f89447ed66434fa9c3f56f9535a37
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/oem/ibm/service_files/meson.build b/oem/ibm/service_files/meson.build
index 2b3d856..fdc7b01 100644
--- a/oem/ibm/service_files/meson.build
+++ b/oem/ibm/service_files/meson.build
@@ -5,11 +5,25 @@
install_dir: systemd_system_unit_dir,
output: 'pldm-create-phyp-nvram.service',
)
- configure_file(
+configure_file(
copy: true,
input: 'pldm-create-phyp-nvram-cksum.service',
install: true,
install_dir: systemd_system_unit_dir,
output: 'pldm-create-phyp-nvram-cksum.service',
)
+configure_file(
+ copy: true,
+ input: 'pldm-reset-phyp-nvram.service',
+ install: true,
+ install_dir: systemd_system_unit_dir,
+ output: 'pldm-reset-phyp-nvram.service',
+)
+configure_file(
+ copy: true,
+ input: 'pldm-reset-phyp-nvram-cksum.service',
+ install: true,
+ install_dir: systemd_system_unit_dir,
+ output: 'pldm-reset-phyp-nvram-cksum.service',
+)