commit | ab3f55035d8dbe394055c5720edd1398e47d500c | [log] [tgz] |
---|---|---|
author | Andrew Jeffery <andrew@codeconstruct.com.au> | Thu Sep 21 10:40:33 2023 +0930 |
committer | Andrew Jeffery <andrew@aj.id.au> | Fri Sep 22 01:39:20 2023 +0000 |
tree | 58232ad0e384c56dc9c4f0c126472bcbc1721033 | |
parent | 110caf85a6b4d5f63c5af8b81dc739406d21dff6 [diff] |
meson: Add boost and sdbusplus wraps The wraps make it possible to build the project without installing the dependencies to the system. Both dependencies are only required for the `raw-peci` application. There are some difficulties building the application when the dependencies are resolved via the subproject wraps. The libpeci compiler flags are carried through to the subprojects even though they are added via `add_project_arguments()`. They identify a bunch of concerns in both sdbusplus and boost, for example: ``` In file included from ../subprojects/boost_1_82_0/boost/asio/detail/epoll_reactor.hpp:30: ../subprojects/boost_1_82_0/boost/asio/detail/socket_types.hpp: At global scope: ../subprojects/boost_1_82_0/boost/asio/detail/socket_types.hpp:419:40: warning: signed conversion from ‘unsigned int’ to ‘int’ changes value from ‘2769289216’ to ‘-1525678080’ [-Wsign-conversion] 419 | const int custom_socket_option_level = 0xA5100000; | ^~~~~~~~~~ In file included from ../subprojects/boost_1_82_0/boost/asio/detail/epoll_reactor.hpp:292: ../subprojects/boost_1_82_0/boost/asio/detail/impl/epoll_reactor.ipp: In member function ‘virtual void boost::asio::detail::epoll_reactor::run(long int, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&)’: ../subprojects/boost_1_82_0/boost/asio/detail/impl/epoll_reactor.ipp:500:26: warning: conversion from ‘long int’ to ‘int’ may change value [-Wconversion] 500 | timeout = (usec < 0) ? -1 : ((usec - 1) / 1000 + 1); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` and ``` In file included from ../subprojects/sdbusplus/include/sdbusplus/server.hpp:17, from ../subprojects/sdbusplus/include/sdbusplus/asio/object_server.hpp:13: ../subprojects/sdbusplus/include/sdbusplus/server/transaction.hpp: In constructor ‘sdbusplus::server::transaction::details::Transaction::Transaction()’: ../subprojects/sdbusplus/include/sdbusplus/server/transaction.hpp:25:35: warning: conversion from ‘time_t’ {aka ‘long int’} to ‘int’ may change value [-Wconversion] 25 | Transaction() : time(std::time(nullptr)), thread(std::this_thread::get_id()) | ~~~~~~~~~^~~~~~~~~ ``` This is compounded by the project defaulting to `werror=true`. There are two options to move past the issues: 1. Configure the project with a global `-Dwerror=false` 2. Prevent the build of `raw-peci` with `-Draw-peci=disabled` Change-Id: Ifc0b99a64b89de6472bbd68e98569774d651f482 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
libpeci is a library that provides various APIs to interface with the IOCTLs provided by the PECI driver in the OpenBMC kernel. Currently available here:
https://github.com/openbmc/linux/blob/dev-5.4/include/uapi/linux/peci-ioctl.h
This repo also includes a peci_cmds command-line utility with functions that map to the libpeci APIs. It can be used to test PECI functionality across the library, driver, and hardware.
This repo also includes dbus_raw_peci which provides a raw-peci daemon that exposes a raw PECI interface that is accessible over D-Bus. It can be used when an application needs to send a raw PECI command without loading the full PECI library.