Fix meson build
Since the previous patch did not enable LOOKUP_GPIO_BASE and
incorrectly defined the object path, etc., the buttons process
failed to start, this commit fixes these problems
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I0285795370d751db2d0fe738cae5645df3d7c955
diff --git a/meson.build b/meson.build
index 362fb10..cd23767 100644
--- a/meson.build
+++ b/meson.build
@@ -10,18 +10,18 @@
)
conf_data = configuration_data()
-conf_data.set_quoted('POWER_DBUS_OBJECT_NAME', 'xyz/openbmc_project/Chassis/Buttons/Power')
-conf_data.set_quoted('RESET_DBUS_OBJECT_NAME', 'xyz/openbmc_project/Chassis/Buttons/Reset')
-conf_data.set_quoted('ID_DBUS_OBJECT_NAME', 'xyz/openbmc_project/Chassis/Buttons/ID')
-conf_data.set_quoted('HS_DBUS_OBJECT_NAME', 'xyz/openbmc_project/Chassis/Buttons/HostSelector')
-conf_data.set_quoted('GPIO_BASE_LABEL_NAME', '/com/inspur/cpld/motherboard/acfail')
-conf_data.set_quoted('BUTTON_PATH', '1e780000.gpio')
-conf_data.set_quoted('CHASSIS_STATE_OBJECT_NAME', 'xyz/openbmc_project/state/chassis')
-conf_data.set_quoted('CHASSISSYSTEM_STATE_OBJECT_NAME', 'xyz/openbmc_project/state/chassis_system')
-conf_data.set_quoted('HOST_STATE_OBJECT_NAME', 'xyz/openbmc_project/state/host')
+conf_data.set_quoted('POWER_DBUS_OBJECT_NAME', '/xyz/openbmc_project/Chassis/Buttons/Power0')
+conf_data.set_quoted('RESET_DBUS_OBJECT_NAME', '/xyz/openbmc_project/Chassis/Buttons/Reset0')
+conf_data.set_quoted('ID_DBUS_OBJECT_NAME', '/xyz/openbmc_project/Chassis/Buttons/ID0')
+conf_data.set_quoted('HS_DBUS_OBJECT_NAME', '/xyz/openbmc_project/Chassis/Buttons/HostSelector')
+conf_data.set_quoted('GPIO_BASE_LABEL_NAME', '1e780000.gpio')
+conf_data.set_quoted('CHASSIS_STATE_OBJECT_NAME', '/xyz/openbmc_project/state/chassis')
+conf_data.set_quoted('CHASSISSYSTEM_STATE_OBJECT_NAME', '/xyz/openbmc_project/state/chassis_system')
+conf_data.set_quoted('HOST_STATE_OBJECT_NAME', '/xyz/openbmc_project/state/host')
conf_data.set_quoted('ID_LED_GROUP', get_option('id-led-group'))
conf_data.set('LONG_PRESS_TIME_MS', get_option('long-press-time-ms'))
+conf_data.set('LOOKUP_GPIO_BASE', get_option('lookup-gpio-base').enabled())
configure_file(output: 'config.h',
configuration: conf_data
diff --git a/meson_options.txt b/meson_options.txt
index f6d3445..683a4f5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,3 +11,10 @@
value: 3000,
description : 'Time to long press the button'
)
+
+option(
+ 'lookup-gpio-base',
+ type : 'feature',
+ value: 'enabled',
+ description : 'Look up the GPIO base value in /sys/class/gpio. Otherwise use a base of 0.'
+)