Set environment variable for PDBG_DTB
Override the default PDBG library device tree by setting a device tree
using the PDBG_DTB environment variable.
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: I012f48cbc3261be95ca47ffd434aa7ebf7d1ed61
diff --git a/attn/attn_handler.service b/attn/attn_handler.service
index 1913fdf..44f4f6a 100644
--- a/attn/attn_handler.service
+++ b/attn/attn_handler.service
@@ -9,6 +9,7 @@
Conflicts=obmc-host-stop@0.target
[Service]
+@ENABLE_PHAL_TRUE@Environment="PDBG_DTB=/var/lib/phosphor-software-manager/pnor/rw/DEVTREE"
ExecStart=/usr/bin/openpower-hw-diags --daemon
Restart=on-failure
diff --git a/attn/meson.build b/attn/meson.build
index 3b085af..9397274 100644
--- a/attn/meson.build
+++ b/attn/meson.build
@@ -6,6 +6,13 @@
# dependency to link gpiod support
libgpiod = dependency('libgpiod', version : '>=1.4.1')
+# ENABLE_PHAL_TRUE used in attn_handler.service
+if (get_option('phal').enabled())
+ configuration_data().set('ENABLE_PHAL_TRUE', '')
+else
+ configuration_data().set('ENABLE_PHAL_TRUE', '#')
+endif
+
# install systemd unit file
configure_file(
input: 'attn_handler.service',