Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-ecc', |
| 3 | 'cpp', |
| 4 | version: '1.0', |
Patrick Williams | c31b23c | 2025-02-01 08:38:22 -0500 | [diff] [blame^] | 5 | default_options: ['cpp_std=c++23'], |
Patrick Williams | 9a31e9a | 2023-07-12 11:16:06 -0500 | [diff] [blame] | 6 | meson_version: '>=1.1.1', |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 7 | ) |
| 8 | |
| 9 | executable( |
| 10 | 'ecc_main', |
Patrick Williams | c31b23c | 2025-02-01 08:38:22 -0500 | [diff] [blame^] | 11 | ['ecc_main.cpp', 'ecc_manager.cpp'], |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 12 | dependencies: [ |
| 13 | dependency('sdbusplus'), |
| 14 | dependency('sdeventplus'), |
| 15 | dependency('phosphor-dbus-interfaces'), |
| 16 | dependency('phosphor-logging'), |
| 17 | ], |
| 18 | install: true, |
Patrick Williams | c31b23c | 2025-02-01 08:38:22 -0500 | [diff] [blame^] | 19 | install_dir: get_option('bindir'), |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 20 | ) |
| 21 | |
Patrick Williams | c31b23c | 2025-02-01 08:38:22 -0500 | [diff] [blame^] | 22 | install_data(sources: 'maxlog.conf', install_dir: '/etc/ecc') |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 23 | |
| 24 | conf_data = configuration_data() |
| 25 | conf_data.set('BUSNAME', '"xyz.openbmc_project.memory.ECC"') |
| 26 | conf_data.set('OBJROOT', '"/xyz/openbmc_project/metrics/memory/"') |
| 27 | conf_data.set('OBJPATH', '"/xyz/openbmc_project/metrics/memory/BmcECC"') |
| 28 | conf_data.set('sysfsRootPath', '"/sys/devices/system/edac/mc/mc0/"') |
Patrick Williams | c31b23c | 2025-02-01 08:38:22 -0500 | [diff] [blame^] | 29 | conf_data.set( |
| 30 | 'sysfsEDACReportPath', |
| 31 | '"/sys/module/edac_core/parameters/edac_report"', |
| 32 | ) |
| 33 | conf_data.set( |
| 34 | 'ECC_PHOSPHOR_LOGGING', |
| 35 | get_option('ecc-phosphor-logging').enabled(), |
| 36 | ) |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 37 | |
Patrick Williams | c31b23c | 2025-02-01 08:38:22 -0500 | [diff] [blame^] | 38 | configure_file(output: 'config.h', configuration: conf_data) |
Will Liang | a1d4202 | 2019-06-13 14:17:12 +0800 | [diff] [blame] | 39 | |
George Hung | 0841f8a | 2020-09-28 11:12:05 +0800 | [diff] [blame] | 40 | systemd = dependency('systemd') |
| 41 | conf_data = configuration_data() |
| 42 | conf_data.set('bindir', get_option('prefix') / get_option('bindir')) |
| 43 | configure_file( |
Patrick Williams | c31b23c | 2025-02-01 08:38:22 -0500 | [diff] [blame^] | 44 | input: 'phosphor-ecc.service.in', |
| 45 | output: 'phosphor-ecc.service', |
| 46 | configuration: conf_data, |
| 47 | install: true, |
| 48 | install_dir: systemd.get_variable('systemdsystemunitdir'), |
| 49 | ) |