commit | b824b2f4ad6f47e636fde029e7b4173c203ddce9 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Thu May 14 14:57:53 2020 -0500 |
committer | Adriana Kobylak <anoo@linux.ibm.com> | Thu Jun 04 15:17:10 2020 +0000 |
tree | 6d153d8a4647681a3b8f1c26ebd0d5d5d0b1a130 | |
parent | 29a0d90b373c1697bb5da620b5a091ee862e3ea6 [diff] |
activation: Make activation flow common The activation flow has a lot of duplicate code such as checking the digital signatures and creating associations, with a few differences depending on the choice of bmc layout configuration. This makes the code hard to maintain since changes and additions to the activation flow need to be done on more than one place, and also the function becomes bigger and harder to follow. This would be made worse when additional layout supports are added such as eMMC code update support. Make the flow common and move the specific code to its subdirectory. This requires create a new function to handle the end of the update so that we support implementations that are async (need to wait for systemd service files to finish). Still need an if/else statement to differentiate the implementations that are synchronous like the static layout and the async ones like the ubi layout since the async ones have the flash write function return immediately and can call the flash write success later on, for the sync ones need to set the activation value to Active after calling flash write success: Async (ubi): activation(Activating) flashWrite() return Activating onFlashWriteSuccess() activation(Active) Synchronous (static): activation(Activating) flashWrite() onFlashWriteSuccess() activation(Active) return Active By making the code common, the static layout gains some additional features which may not be of consequence due to the short duration of the update, but does not hurt and allow us to remove the if/else blocks: - Progress interface - Blocks transition interface - Updatable association before reboot is done The static layout will also subscribe to systemd signals even though they're not used, but again this is to keep the code as common as possible. Tested: Verified code update worked and expected d-bus interfaces and values were set during ubi and static update. Change-Id: I20a0b752fe3905cca5b6220c88f65eb64d155d75 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: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To clean the repository run `./bootstrap.sh clean`.