| 9e88729e | 25-Dec-2025 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Initial commit
Added initial .clang-tidy configuration file with recommended C++ checks aligned with the OpenBMC-approved checklist. This setup enforces modern C++ best practices and hel
clang-tidy: Initial commit
Added initial .clang-tidy configuration file with recommended C++ checks aligned with the OpenBMC-approved checklist. This setup enforces modern C++ best practices and helps catch common issues early in development.
Change-Id: Ie081e065946629e90a57e35a3221970a4ce9a7fe Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| b7d33a16 | 25-Dec-2025 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: rename Mako templates to avoid format
Meson auto-generates a 'ninja clang-format' target when .clang-format exists, which reformats any file ending in .cpp or .hpp. Our Mako templates we
clang-tidy: rename Mako templates to avoid format
Meson auto-generates a 'ninja clang-format' target when .clang-format exists, which reformats any file ending in .cpp or .hpp. Our Mako templates were named foo.mako.cpp, causing them to be picked up by this target during clang-tidy enablement. Rename templates to foo.cpp.mako so Meson ignores them. No functional changes.
Change-Id: I40b3d635865d6cb9f969557fb647054936dd5479 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 2bc30901 | 28-Jul-2025 |
Zoey YJ Chung <zoey.yj.chung.wiwynn@gmail.com> |
Handle default values for array[enum] properties
Summary: - Add logic to process array[enum] default values in settings_manager.mako.hpp. - Ensures correct C++ enum initializer list is generated for
Handle default values for array[enum] properties
Summary: - Add logic to process array[enum] default values in settings_manager.mako.hpp. - Ensures correct C++ enum initializer list is generated for array[enum] properties.
Motivate: - Some properties, require array[enum] support to match YAML configuration.
Example YAML input: /xyz/openbmc_project/control/host{}/boot: - Interface: xyz.openbmc_project.Control.Boot.Source Properties: BootOrder: Default: [Source::Sources::Disk,Source::Sources::Network, Source::Sources::RemovableMedia]
Test Plan: - Build code : pass - Tested on YV4 system - Pass
Change-Id: I3380878ebea7febaf5b881c86b46d48d6df1150d Signed-off-by: Zoey YJ Chung <zoey.yj.chung.wiwynn@gmail.com>
show more ...
|
| 3c3319aa | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I6bab795f8424b290002f155fb1542441d130a61e Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 1960683b | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Id3aaded4d5c4d6b04e50cd22673f2c887f38185c Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Id3aaded4d5c4d6b04e50cd22673f2c887f38185c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 6c347cad | 18-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have b
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: I224b56210cc743f723bc7f1f83f5d94a53846d5a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| ccf712f6 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ie3c1ab2d1e34cc296e89df8ecc11e5893ad11c84 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| ef9bd935 | 04-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Fix local build of the settings_gen target
Currently local meson build fails with the following error: """ [343/700] Generating settings_manager_hpp with a custom command FAILED: settings_man
meson: Fix local build of the settings_gen target
Currently local meson build fails with the following error: """ [343/700] Generating settings_manager_hpp with a custom command FAILED: settings_manager.hpp <...>/env/bin/python3 ../settings.py -i ../settings_example.yaml <...> ModuleNotFoundError: No module named 'sdbusplus' """ This is happening because 'settings_manager.mako.hpp' from the 'settings_gen' target refers to python modules from the external 'sdbusplus' project. Therefore in case of a local build it is necessary to provide search path to the relevant sdbusplus subproject folder. Fix this with the help of 'PYTHONPATH' environment variable.
Tested: Both local meson build and Yocto build are finished successfully.
Change-Id: I8ec81edcdeb84c82a315937d3ed31be3dbaa1aa5 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
| 96dc05dc | 02-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Fix local cereal build
Currently local build is failing with a message: """ cereal| Exception: Failed to configure the CMake subproject: Could NOT find Boost (missing: Boost_INCLUDE_DIR seria
meson: Fix local cereal build
Currently local build is failing with a message: """ cereal| Exception: Failed to configure the CMake subproject: Could NOT find Boost (missing: Boost_INCLUDE_DIR serialization) Subproject subprojects/cereal is buildable: NO (disabling) """ Since cereal requires boost only for the sandbox build and this functionality is not needed, add option to skip building performance sandbox comparison to solve the issue.
Tested: "meson setup build" no longer fails with the cereal error.
Change-Id: Ie22c1b08b784aba244a50fd7fed9c5ef4eef5542 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
| 464db676 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Idd550bb3120c0a10ecca2901236db78a90149bdd Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 86642a8b | 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using t
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using the .txt extension for a build file has a few advantages, chief among them many tools and text editors expect a file with the .txt extension to be plain text files, not build scripts.
[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ic7f6febd16e9de16081397d13fa7b85a07a0fa5d
show more ...
|
| 3132eca7 | 12-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Ic398c854a3da29dd9eac8
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Ic398c854a3da29dd9eac865aa8d2b44159669bfa Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| e568fcad | 25-May-2023 |
Matt Spinler <spinler@us.ibm.com> |
Convert to lg2
Convert the remaining logging statements to lg2.
Change-Id: I45bc8ed76f9b71517a5a8119e89713278e31679d Signed-off-by: Matt Spinler <spinler@us.ibm.com> |
| fb1ad7cc | 24-May-2023 |
Matt Spinler <spinler@us.ibm.com> |
Convert version 1 files to version 2 on startup
When reading in persisted property values from their files, check the version number the file was saved in. If that version is less than the first ve
Convert version 1 files to version 2 on startup
When reading in persisted property values from their files, check the version number the file was saved in. If that version is less than the first version using name/value pairs, then rewrite the file using the latest version.
This is done so that it removes the possibility of the problem described in openbmc/phosphor-settingsd/#16 of occurring in the future, which is where if a new property is added it gets set to another property's value.
This also creates functions for the serializing and deserializing so the code to do it just needs to be in one place.
Note that if a version of code runs from when before NVP support was added, it can still read files saved with the new version so this change is backwards compatible.
Change-Id: Ib0be93de2151bc9435664179690b0eac2bb980ff Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| c2f84c7b | 24-May-2023 |
Matt Spinler <spinler@us.ibm.com> |
Use named values when serializing
As described by openbmc/phosphor-settingsd#16, the code has a problem when a new D-Bus property is added to a settings object that has a modified property, meaning
Use named values when serializing
As described by openbmc/phosphor-settingsd#16, the code has a problem when a new D-Bus property is added to a settings object that has a modified property, meaning it has been serialized to file. This is because the file doesn't say which property the value is meant for - the fields are only named value0, value1, etc. So if the new property is alphabetically before the original property, the code will read the value0 value into the new property though it was meant to be for the original one.
To fix this, start using cereal's Name/Value Pair (NVP) feature, with the field names named after the property, like: "QuiesceOnHwError": true
This requires the cereal version to bump from 1 to 2. When saving, the code will always write using version 2 using NVPs. When loading it will check the version in the file and if it was 1 it will read it using the original non-NVP method, otherwise it will use the NVP method.
Example generated load and save functions:
``` template<class Archive> void save(Archive& a, const Impl& setting, [[maybe_unused]] const std::uint32_t version) { a(cereal::make_nvp("AutoReboot", setting.autoReboot())); }
template<class Archive> void load(Archive& a, Impl& setting, const std::uint32_t version) { decltype(setting.autoReboot()) AutoReboot{};
if (version < CLASS_VERSION_WITH_NVP) { a(AutoReboot); } else { try { a(CEREAL_NVP(AutoReboot)); } catch (const cereal::Exception& e) { std::cerr << "Could not restore property AutoReboot on /xyz/openbmc_project/control/host0/auto_reboot, " << "setting to default value.\n"; AutoReboot = true; } }
setting.autoReboot(AutoReboot); } ```
This does require that the property names be unique across all interfaces on that object path. So far that isn't an issue for anything I've seen, and there is a check in the code that will cause a compile failure if that occurs. If necessary, support could be added for this but it didn't seem necessary as that is fairly unlikely.
Now if a new property is added to an object path with existing serialized data, the code can see that that field isn't in the file and will just initialize that property to the default value given in the YAML.
If the version of code before this commit is applied to a system after this code has already been run, it is still able to read in the values even though they have real names instead of the valueN ones since other than the name they are still in the same order and format.
Resolves openbmc/phosphor-settingsd#16
Change-Id: Ia8f4712d7098dd530895b1db4e4d0a7f88f4b9dc Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| ffdf8658 | 24-May-2023 |
Matt Spinler <spinler@us.ibm.com> |
Extract default property value calc into function
Make a function out of the python code that calculates the default value of a property so that it can be used in multiple places.
An upcoming commi
Extract default property value calc into function
Make a function out of the python code that calculates the default value of a property so that it can be used in multiple places.
An upcoming commit will also use it if it has problems restoring the property from its backing file.
Change-Id: I22b0f1130e7dce8c4b83e9111ad0d4895637404e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| 157063d0 | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ib2cacba5d88e188865ebb8888a998c8fcedc132c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| de7ccfb2 | 26-Apr-2023 |
Jagpal Singh Gill <paligill@gmail.com> |
meson: Remove autotools build files
Remove autotools build files as switching to meson.
Tested: meson build passes 'ninja -C build'
Change-Id: I4203c103b1355b78dec931c064da55e88f26e894 Signed-off-
meson: Remove autotools build files
Remove autotools build files as switching to meson.
Tested: meson build passes 'ninja -C build'
Change-Id: I4203c103b1355b78dec931c064da55e88f26e894 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| 4d28bcd3 | 24-Apr-2023 |
Jagpal Singh Gill <paligill@gmail.com> |
meson: Switch autoconf build to meson
Summary: - Add meson build flow. - Remove the options not being configured from yocto as configure args and add them as constants/define in settings_manager.h
meson: Switch autoconf build to meson
Summary: - Add meson build flow. - Remove the options not being configured from yocto as configure args and add them as constants/define in settings_manager.hpp
Tested: - autotools build passes. - meson build passes with "ninja -C build".
Change-Id: Iaa7704886cdcd5481a04bae77e02df2c6a53aee9 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| cfd49eb8 | 24-Apr-2023 |
Jagpal Singh Gill <paligill@gmail.com> |
meson: Address warnings for switching autoconf to meson
This commit addresses the compilation warnings when switching autoconf to meson.
Tested: Build passes with CIT and "ninja -C build".
Change-
meson: Address warnings for switching autoconf to meson
This commit addresses the compilation warnings when switching autoconf to meson.
Tested: Build passes with CIT and "ninja -C build".
Change-Id: Ieda04b856f4fd24de867c3eaee8b9c4a9b333aaf Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
| bbeb9bdd | 06-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
reformat and fix markdownlint issues
Reformat all the files with the latest settings from openbmc-build-scripts and fix any markdownlint issues.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
reformat and fix markdownlint issues
Reformat all the files with the latest settings from openbmc-build-scripts and fix any markdownlint issues.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I955a341441b24487b2e5552692b749fa21b37757
show more ...
|
| 7c6827c9 | 03-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
OWNERS: adjust maintainers
The maintainer has been unresponsive on this repository since at least June 16th, 2022. Adriana and I have done the majority of the contributions and reviews in the last
OWNERS: adjust maintainers
The maintainer has been unresponsive on this repository since at least June 16th, 2022. Adriana and I have done the majority of the contributions and reviews in the last 2 years. Vishwa has stopped working on the project.
Changes: - Add Adriana as 'owner'. - Add Patrick as 'owner'. - Remove Vishwa as 'reviewer'.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I39a25bbfbd25d9fee98c5747961899fb0f395a17
show more ...
|
| 7b7fd7e4 | 04-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
MAINTAINERS: remove file
The MAINTAINERS file is deprecated in favor of OWNERS.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7d1378a6416c4ba3a14d42945decf308b7287201
|
| 1fc221f8 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
OWNERS: switch 'matches' to 'matchers'
The original OWNERS template had a mistake which used 'matches' instead of the field supported by the Gerrit plugin 'matchers'. Update the OWNERS file to have
OWNERS: switch 'matches' to 'matchers'
The original OWNERS template had a mistake which used 'matches' instead of the field supported by the Gerrit plugin 'matchers'. Update the OWNERS file to have the correct field.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9d8882917de9fd9501453f01b3fe575be7bcab84
show more ...
|
| 7c4181cf | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I662faee19b7b289bc0a39665fc5ce9e19406f933
show more ...
|