RBMC: Create active BMC target
As described in the redundant BMC design document
https://gerrit.openbmc.org/c/openbmc/docs/+/70233, a redundant BMC
system can have BMCs in the active or passive state.
To become active, the obmc-bmc-active.target target will be started.
Services that need to start then can be linked to it.
This commit introduces a new rbmc-state-management meson option and
installs the target if the option is enabled. It defaults to enabled
but will be disabled by default in the recipe.
A future commit will add more to the target. This commit is a first
step to help get all of the bitbake options in place.
Tested:
Target file is installed when option is enabled.
Change-Id: I173c8fc78f04c12c33d335f0ffe7e5d0161d64a1
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meson.options b/meson.options
index 0c86bcb..b076cb0 100644
--- a/meson.options
+++ b/meson.options
@@ -150,3 +150,8 @@
value : false,
description : 'Only allow chassis and host power on operations when BMC is Ready.'
)
+
+option('rbmc-state-management', type: 'feature',
+ value : 'enabled',
+ description : 'Enable redundant BMC state management'
+)
diff --git a/target_files/meson.build b/target_files/meson.build
index 9fcc2c5..979faad 100644
--- a/target_files/meson.build
+++ b/target_files/meson.build
@@ -40,6 +40,10 @@
'obmc-power-stop@.target',
]
+if get_option('rbmc-state-management').allowed()
+ unit_files += 'obmc-bmc-active.target'
+endif
+
fs = import('fs')
foreach u : unit_files
fs.copyfile(
diff --git a/target_files/obmc-bmc-active.target b/target_files/obmc-bmc-active.target
new file mode 100644
index 0000000..a0322e9
--- /dev/null
+++ b/target_files/obmc-bmc-active.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=Active BMC Target