commit | d7fbc1e319046bcc76eb793c5792612bafe0b676 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Sat Jun 06 07:46:40 2020 -0500 |
committer | Adriana Kobylak <anoo@linux.ibm.com> | Tue Jul 14 14:10:06 2020 +0000 |
tree | c577ace18a068fef661a660418d0f9a0ae247995 | |
parent | 341243513d6da6e9d3ddf886c0d22029fad748a9 [diff] |
mmc: Add mount services The iterm updater relies on the versions being mounted in the MEDIA_DIR in order to create the D-Bus objects when the BMC first starts up. Create two services: one to mount the emmc rootfs partitions so that the version D-Bus objects get created, and another one to unmount them after the item updater has run because there's no need to keep the mounts around, actually they shouldn't be mounted during a code update. The UBI layout does an unmount at the start of an update, but it's less risky to just unmount once the mount is no longer needed in case the update is done manually by starting the update service file or directly calling obmc-flash-bmc. These services get started automatically by adding a dependency to the item updater service: "WantedBy=xyz.openbmc_project.Software.BMC.Updater.service" The mount has a "Before" directive and the unmount has an "After" directive. This allows the item updater to have the mounts available for processing and they are unmounted once the processing is complete. Also add a dash "-" to ExecStart to ignore errors: https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= This is needed since the non-running filesystem may had been invalidated during a Delete operation. This directive still logs an error but does not put the service file in Failed state: Ex: Jul 11 16:36:07 rainier systemd[1]: Starting Mount BMC rofs volumes after a reboot... Jul 11 16:36:07 rainier sh[423]: mount: /media/rofs-b: wrong fs type, bad option, bad superblock on /dev/mmcblk0p5, missing codepage or helper program, or other error. Jul 11 16:36:07 rainier systemd[1]: obmc-flash-mmc-mount.service: Succeeded. Jul 11 16:36:07 rainier systemd[1]: Finished Mount BMC rofs volumes after a reboot. Jul 11 16:36:07 rainier systemd[1]: Started OpenBMC Software Update Manager. Jul 11 16:36:07 rainier systemd[1]: Starting Unmount BMC rofs volumes... Jul 11 16:36:08 rainier umount[427]: umount: /media/rofs-b: no mount point specified. Jul 11 16:36:08 rainier systemd[1]: obmc-flash-mmc-umount.service: Succeeded. Jul 11 16:36:08 rainier systemd[1]: Finished Unmount BMC rofs volumes. Tested: Verified the D-Bus version objects are created after BMC reboot, and the item updater service starts successfully after a Delete operation. Change-Id: Ic0c83391a2879b8508bf5aa9f18941590d96352d Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps:
meson build
ninja -C build
To clean the repository run rm -r build
.