build: Convert project to meson and C++20

Cleanedup all build warnings and updated the header to point to the
latest ipmid.

Change-Id: Ife89b51cda0137c8632fc24525efc131817e07b8
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3ba4350
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+# Meson
+/build*/
+/subprojects/*/
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 20789ae..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
-
-cmake_policy (SET CMP0054 NEW)
-
-option (YOCTO "Use YOCTO depedencies system" OFF)
-include (ExternalProject)
-set (CMAKE_CXX_STANDARD 17)
-set (CMAKE_CXX_STANDARD_REQUIRED ON)
-set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
-
-# Temporarily disable rtti
-#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
-
-project (fb-ipmi-oem CXX)
-
-add_definitions (-DBOOST_ERROR_CODE_HEADER_ONLY)
-add_definitions (-DBOOST_SYSTEM_NO_DEPRECATED)
-add_definitions (-DBOOST_ALL_NO_LIB)
-add_definitions (-DBOOST_NO_RTTI)
-add_definitions (-DBOOST_NO_TYPEID)
-add_definitions (-DBOOST_ASIO_DISABLE_THREADS)
-add_definitions (-DBOOST_COROUTINES_NO_DEPRECATION_WARNING)
-add_definitions (-Wno-psabi)
-
-if (NOT YOCTO)
-    include_directories (SYSTEM non-yocto)
-
-    configure_file (CMakeLists.txt.in 3rdparty/CMakeLists.txt)
-    execute_process (COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
-                     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3rdparty)
-    execute_process (COMMAND ${CMAKE_COMMAND} --build .
-                     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3rdparty)
-
-    set (CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/prefix ${CMAKE_PREFIX_PATH})
-    include_directories (${CMAKE_BINARY_DIR}/prefix/include)
-    link_directories (${CMAKE_BINARY_DIR}/prefix/lib)
-
-    include_directories (${CMAKE_BINARY_DIR}/sdbusplus-src)
-    link_directories (${CMAKE_BINARY_DIR}/sdbusplus-src/.libs)
-    include_directories (${CMAKE_BINARY_DIR}/phosphor-logging-src)
-    link_directories (${CMAKE_BINARY_DIR}/phosphor-logging-src/.libs)
-    include_directories (SYSTEM ${CMAKE_BINARY_DIR}/phosphor-ipmi-host/include)
-    include_directories (SYSTEM ${CMAKE_BINARY_DIR}/ipmid/user_channel)
-
-    include_directories (${CMAKE_BINARY_DIR}) # link_directories
-                                              # (${CMAKE_BINARY_DIR}/sdbusplus-
-                                              # src/.libs)
-endif ()
-
-if (YOCTO)
-    find_package (PkgConfig REQUIRED)
-    pkg_check_modules (LOGGING phosphor-logging REQUIRED)
-    include_directories (${LOGGING_INCLUDE_DIRS})
-    link_directories (${LOGGING_LIBRARY_DIRS})
-
-    pkg_check_modules (LIBIPMID libipmid REQUIRED)
-    include_directories (SYSTEM ${LIBIPMID_INCLUDE_DIRS})
-    link_directories (${LIBIPMID_LIBRARY_DIRS})
-
-endif ()
-
-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include)
-
-if(BIC)
-   add_definitions (-DBIC_ENABLED)
-endif()
-
-add_library (zfboemcmds
-             SHARED src/oemcommands.cpp src/appcommands.cpp
-             src/storagecommands.cpp src/usb-dbg.cpp
-             src/selcommands.cpp src/transportcommands.cpp
-             src/biccommands.cpp)
-
-if(HOST_INSTANCES)
-   add_definitions (-DINSTANCES="${HOST_INSTANCES}")
-else()
-   add_definitions (-DINSTANCES="0")
-endif()
-
-set_target_properties (zfboemcmds PROPERTIES VERSION "0.1.0")
-set_target_properties (zfboemcmds PROPERTIES SOVERSION "0")
-target_link_libraries (zfboemcmds sdbusplus)
-target_link_libraries (zfboemcmds ipmid)
-target_link_libraries (zfboemcmds -luserlayer)
-target_link_libraries (zfboemcmds -lchannellayer)
-target_link_libraries (zfboemcmds ${CMAKE_THREAD_LIBS_INIT})
-target_link_libraries (zfboemcmds phosphor_logging)
-
-set (PACKAGE_DIR /usr/share/lcd-debug/)
-set (CONFIG_FILES post_desc.json gpio_desc.json cri_sensors.json)
-
-install (TARGETS zfboemcmds DESTINATION lib/ipmid-providers)
-install (FILES ${CONFIG_FILES} DESTINATION ${PACKAGE_DIR})
-
-if(BIC)
-set (CONFIG_FILES_YV2 yosemitev2/gpio_desc.json yosemitev2/cri_sensors.json)
-install (FILES ${CONFIG_FILES_YV2} DESTINATION ${PACKAGE_DIR})
-endif()
diff --git a/CMakeLists.txt.in b/CMakeLists.txt.in
deleted file mode 100644
index 7ab2fc7..0000000
--- a/CMakeLists.txt.in
+++ /dev/null
@@ -1,29 +0,0 @@
-cmake_minimum_required (VERSION 3.5)
-
-include (ExternalProject)
-
-file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix)
-file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/prefix/include)
-
-externalproject_add (host-ipmid
-    PREFIX ${CMAKE_BINARY_DIR}/prefix
-    GIT_REPOSITORY https://github.com/openbmc/phosphor-host-ipmid
-    SOURCE_DIR ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src
-
-    CONFIGURE_COMMAND
-        cd ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src &&
-        meson build
-            --prefix=${CMAKE_BINARY_DIR}/prefix
-            --libdir=${CMAKE_BINARY_DIR}/prefix/lib
-
-    BUILD_COMMAND
-        cd ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src/build &&
-        meson compile
-
-    INSTALL_COMMAND
-        cd ${CMAKE_BINARY_DIR}/phosphor-host-ipmid-src/build &&
-        meson install
-
-    LOG_DOWNLOAD ON
-)
-
diff --git a/include/sensorutils.hpp b/include/sensorutils.hpp
index 6af1d63..e404a21 100644
--- a/include/sensorutils.hpp
+++ b/include/sensorutils.hpp
@@ -158,7 +158,7 @@
     return sensorType;
 }
 
-inline static uint8_t getSensorEventTypeFromPath(const std::string& path)
+inline static uint8_t getSensorEventTypeFromPath(const std::string&)
 {
     // TODO: Add support for additional reading types as needed
     return 0x1; // reading type = threshold
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..4fdf0db
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,78 @@
+project(
+  'fb-ipmi-oem',
+  'cpp',
+  version: '0.1',
+  meson_version: '>=0.57.0',
+  default_options: [
+    'werror=true',
+    'warning_level=3',
+    'cpp_std=c++20',
+  ])
+
+# Project Arguments
+cpp = meson.get_compiler('cpp')
+add_project_arguments(
+  cpp.get_supported_arguments([
+    '-DBOOST_ERROR_CODE_HEADER_ONLY',
+    '-DBOOST_SYSTEM_NO_DEPRECATED',
+    '-DBOOST_ALL_NO_LIB',
+    '-DBOOST_NO_RTTI',
+    '-DBOOST_NO_TYPEID',
+    '-DBOOST_ASIO_DISABLE_THREADS',
+    '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
+    '-Wno-psabi',
+    '-Wno-pedantic',
+  ]),
+  language : 'cpp')
+
+host_instances = '0'
+if get_option('host-instances') != ''
+  host_instances = get_option('host-instances')
+endif
+
+add_project_arguments(
+  cpp.get_supported_arguments([
+    '-DINSTANCES=' + host_instances,
+  ]),
+  language : 'cpp')
+
+if not get_option('bic').disabled()
+  add_project_arguments(
+    cpp.get_supported_arguments([
+        '-DBIC_ENABLED',
+    ]),
+    language : 'cpp')
+endif
+
+root_inc = include_directories('.', 'include')
+
+# Dependencies
+phosphor_logging_dep = dependency('phosphor-logging')
+sdbusplus_dep = dependency('sdbusplus', required : false, include_type: 'system')
+ipmid_dep = dependency('libipmid')
+channellayer_dep = cpp.find_library('channellayer', required: true)
+userlayer_dep = cpp.find_library('userlayer', required: true)
+
+zfboemcmds_pre = declare_dependency(
+  include_directories: root_inc,
+  dependencies: [
+    phosphor_logging_dep,
+    sdbusplus_dep,
+    ipmid_dep,
+    channellayer_dep,
+    userlayer_dep,
+  ])
+
+zfboemcmds_lib = shared_module(
+  'zfboemcmds',
+  'src/oemcommands.cpp',
+  'src/appcommands.cpp',
+  'src/storagecommands.cpp',
+  'src/usb-dbg.cpp',
+  'src/selcommands.cpp',
+  'src/transportcommands.cpp',
+  'src/biccommands.cpp',
+  implicit_include_directories: false,
+  dependencies: zfboemcmds_pre,
+  install: true,
+  install_dir: get_option('libdir') / 'ipmid-providers')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..edc2c52
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,6 @@
+option('tests', type: 'feature', description: 'Build tests')
+option('bic', type: 'feature', description: 'Enable bic handlers')
+option(
+  'host-instances',
+  type: 'string',
+  description: 'Host Instances')
diff --git a/src/appcommands.cpp b/src/appcommands.cpp
index e8571ce..ce5c13b 100644
--- a/src/appcommands.cpp
+++ b/src/appcommands.cpp
@@ -54,7 +54,7 @@
 void printGUID(uint8_t* guid, off_t offset)
 {
     std::cout << "Read GUID from offset : " << offset << " :\n";
-    for (int i = 0; i < GUID_SIZE; i++)
+    for (size_t i = 0; i < GUID_SIZE; i++)
     {
         int data = guid[i];
         std::cout << std::hex << data << " ";
@@ -112,9 +112,9 @@
 //----------------------------------------------------------------------
 // Get Self Test Results (IPMI/Section 20.4) (CMD_APP_GET_SELFTEST_RESULTS)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiAppGetSTResults(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                               ipmi_request_t request, ipmi_response_t response,
-                               ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiAppGetSTResults(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                               ipmi_response_t response,
+                               ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
 
@@ -130,9 +130,9 @@
 //----------------------------------------------------------------------
 // Manufacturing Test On (IPMI/Section 20.5) (CMD_APP_MFR_TEST_ON)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiAppMfrTestOn(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                            ipmi_request_t request, ipmi_response_t response,
-                            ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiAppMfrTestOn(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                            ipmi_response_t, ipmi_data_len_t data_len,
+                            ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     std::string mfrTest = "sled-cycle";
@@ -156,11 +156,9 @@
 //----------------------------------------------------------------------
 // Set Global Enables (CMD_APP_SET_GLOBAL_ENABLES)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiAppSetGlobalEnables(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                   ipmi_request_t request,
-                                   ipmi_response_t response,
-                                   ipmi_data_len_t data_len,
-                                   ipmi_context_t context)
+ipmi_ret_t ipmiAppSetGlobalEnables(ipmi_netfn_t, ipmi_cmd_t,
+                                   ipmi_request_t request, ipmi_response_t,
+                                   ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
 
@@ -173,11 +171,9 @@
 //----------------------------------------------------------------------
 // Get Global Enables (CMD_APP_GET_GLOBAL_ENABLES)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiAppGetGlobalEnables(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                   ipmi_request_t request,
+ipmi_ret_t ipmiAppGetGlobalEnables(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
                                    ipmi_response_t response,
-                                   ipmi_data_len_t data_len,
-                                   ipmi_context_t context)
+                                   ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
 
@@ -190,11 +186,9 @@
 //----------------------------------------------------------------------
 // Clear Message flags (IPMI/Section 22.3) (CMD_APP_CLEAR_MESSAGE_FLAGS)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiAppClearMsgFlags(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                ipmi_request_t request,
-                                ipmi_response_t response,
-                                ipmi_data_len_t data_len,
-                                ipmi_context_t context)
+ipmi_ret_t ipmiAppClearMsgFlags(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                                ipmi_response_t, ipmi_data_len_t data_len,
+                                ipmi_context_t)
 {
     // Do Nothing and just return success
     *data_len = 0;
@@ -221,9 +215,9 @@
 }
 
 #else
-ipmi_ret_t ipmiAppGetSysGUID(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                             ipmi_request_t request, ipmi_response_t response,
-                             ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiAppGetSysGUID(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                             ipmi_response_t response, ipmi_data_len_t data_len,
+                             ipmi_context_t)
 {
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
     if (getSystemGUID(res))
@@ -290,11 +284,9 @@
 //----------------------------------------------------------------------
 // Set Sys Info Params (IPMI/Sec 22.14a) (CMD_APP_SET_SYS_INFO_PARAMS)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiAppSetSysInfoParams(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                   ipmi_request_t request,
-                                   ipmi_response_t response,
-                                   ipmi_data_len_t data_len,
-                                   ipmi_context_t context)
+ipmi_ret_t ipmiAppSetSysInfoParams(ipmi_netfn_t, ipmi_cmd_t,
+                                   ipmi_request_t request, ipmi_response_t,
+                                   ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
 
@@ -364,17 +356,16 @@
 //----------------------------------------------------------------------
 // Get Sys Info Params (IPMI/Sec 22.14b) (CMD_APP_GET_SYS_INFO_PARAMS)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiAppGetSysInfoParams(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiAppGetSysInfoParams(ipmi_netfn_t, ipmi_cmd_t,
                                    ipmi_request_t request,
                                    ipmi_response_t response,
-                                   ipmi_data_len_t data_len,
-                                   ipmi_context_t context)
+                                   ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
 
     uint8_t param = req[1];
-    uint8_t len;
+    int len;
 
     *res++ = 1; // Parameter revision
     *data_len = 1;
diff --git a/src/biccommands.cpp b/src/biccommands.cpp
index b5a6355..a1be5a6 100644
--- a/src/biccommands.cpp
+++ b/src/biccommands.cpp
@@ -114,7 +114,7 @@
     }
 }
 
-static void registerBICFunctions(void)
+[[maybe_unused]] static void registerBICFunctions(void)
 {
 
     phosphor::logging::log<phosphor::logging::level::INFO>(
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index abcfc83..55fcbf1 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -269,7 +269,7 @@
 int strToBytes(std::string& str, uint8_t* data)
 {
     std::string sstr;
-    int i;
+    size_t i;
 
     for (i = 0; i < (str.length()) / 2; i++)
     {
@@ -424,11 +424,10 @@
 //----------------------------------------------------------------------
 // Get Debug Frame Info
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemDbgGetFrameInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiOemDbgGetFrameInfo(ipmi_netfn_t, ipmi_cmd_t,
                                   ipmi_request_t request,
                                   ipmi_response_t response,
-                                  ipmi_data_len_t data_len,
-                                  ipmi_context_t context)
+                                  ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
@@ -444,11 +443,10 @@
 //----------------------------------------------------------------------
 // Get Debug Updated Frames
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemDbgGetUpdFrames(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiOemDbgGetUpdFrames(ipmi_netfn_t, ipmi_cmd_t,
                                   ipmi_request_t request,
                                   ipmi_response_t response,
-                                  ipmi_data_len_t data_len,
-                                  ipmi_context_t context)
+                                  ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
@@ -468,11 +466,10 @@
 //----------------------------------------------------------------------
 // Get Debug POST Description
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemDbgGetPostDesc(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiOemDbgGetPostDesc(ipmi_netfn_t, ipmi_cmd_t,
                                  ipmi_request_t request,
                                  ipmi_response_t response,
-                                 ipmi_data_len_t data_len,
-                                 ipmi_context_t context)
+                                 ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
@@ -508,11 +505,10 @@
 //----------------------------------------------------------------------
 // Get Debug GPIO Description
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemDbgGetGpioDesc(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiOemDbgGetGpioDesc(ipmi_netfn_t, ipmi_cmd_t,
                                  ipmi_request_t request,
                                  ipmi_response_t response,
-                                 ipmi_data_len_t data_len,
-                                 ipmi_context_t context)
+                                 ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
@@ -549,11 +545,10 @@
 //----------------------------------------------------------------------
 // Get Debug Frame Data
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemDbgGetFrameData(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiOemDbgGetFrameData(ipmi_netfn_t, ipmi_cmd_t,
                                   ipmi_request_t request,
                                   ipmi_response_t response,
-                                  ipmi_data_len_t data_len,
-                                  ipmi_context_t context)
+                                  ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
@@ -565,8 +560,6 @@
 
     frame = req[3];
     page = req[4];
-    int fr = frame;
-    int pg = page;
 
     ret = plat_udbg_get_frame_data(frame, page, &next, &count, &res[7]);
     if (ret)
@@ -589,11 +582,10 @@
 //----------------------------------------------------------------------
 // Get Debug Control Panel
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemDbgGetCtrlPanel(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiOemDbgGetCtrlPanel(ipmi_netfn_t, ipmi_cmd_t,
                                   ipmi_request_t request,
                                   ipmi_response_t response,
-                                  ipmi_data_len_t data_len,
-                                  ipmi_context_t context)
+                                  ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
@@ -619,9 +611,9 @@
 //----------------------------------------------------------------------
 // Set Dimm Info (CMD_OEM_SET_DIMM_INFO)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemSetDimmInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                              ipmi_request_t request, ipmi_response_t response,
-                              ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemSetDimmInfo(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                              ipmi_response_t, ipmi_data_len_t data_len,
+                              ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
 
@@ -652,13 +644,10 @@
 //----------------------------------------------------------------------
 // Get Board ID (CMD_OEM_GET_BOARD_ID)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemGetBoardID(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                             ipmi_request_t request, ipmi_response_t response,
-                             ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemGetBoardID(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                             ipmi_response_t, ipmi_data_len_t data_len,
+                             ipmi_context_t)
 {
-    uint8_t* req = reinterpret_cast<uint8_t*>(request);
-    uint8_t* res = reinterpret_cast<uint8_t*>(response);
-
     /* TODO: Needs to implement this after GPIO implementation */
     *data_len = 0;
 
@@ -824,8 +813,12 @@
     {
         /* Return default boot order 0100090203ff */
         uint8_t defaultBoot[SIZE_BOOT_ORDER] = {
-            BOOT_MODE_UEFI,      bootMap["USB_DEV"], bootMap["NET_IPV6"],
-            bootMap["SATA_HDD"], bootMap["SATA_CD"], 0xff};
+            BOOT_MODE_UEFI,
+            static_cast<uint8_t>(bootMap["USB_DEV"]),
+            static_cast<uint8_t>(bootMap["NET_IPV6"]),
+            static_cast<uint8_t>(bootMap["SATA_HDD"]),
+            static_cast<uint8_t>(bootMap["SATA_CD"]),
+            0xff};
 
         memcpy(bootSeq, defaultBoot, SIZE_BOOT_ORDER);
         phosphor::logging::log<phosphor::logging::level::INFO>(
@@ -859,11 +852,9 @@
 }
 // Set Machine Config Info (CMD_OEM_SET_MACHINE_CONFIG_INFO)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemSetMachineCfgInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                    ipmi_request_t request,
-                                    ipmi_response_t response,
-                                    ipmi_data_len_t data_len,
-                                    ipmi_context_t context)
+ipmi_ret_t ipmiOemSetMachineCfgInfo(ipmi_netfn_t, ipmi_cmd_t,
+                                    ipmi_request_t request, ipmi_response_t,
+                                    ipmi_data_len_t data_len, ipmi_context_t)
 {
     machineConfigInfo_t* req = reinterpret_cast<machineConfigInfo_t*>(request);
     uint8_t len = *data_len;
@@ -943,9 +934,9 @@
 //----------------------------------------------------------------------
 // Set POST start (CMD_OEM_SET_POST_START)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemSetPostStart(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                               ipmi_request_t request, ipmi_response_t response,
-                               ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemSetPostStart(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                               ipmi_response_t, ipmi_data_len_t data_len,
+                               ipmi_context_t)
 {
     phosphor::logging::log<phosphor::logging::level::INFO>("POST Start Event");
 
@@ -957,9 +948,9 @@
 //----------------------------------------------------------------------
 // Set POST End (CMD_OEM_SET_POST_END)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemSetPostEnd(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                             ipmi_request_t request, ipmi_response_t response,
-                             ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemSetPostEnd(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                             ipmi_response_t, ipmi_data_len_t data_len,
+                             ipmi_context_t)
 {
     struct timespec ts;
 
@@ -990,9 +981,9 @@
 //
 // Response:
 // Byte 1 – Completion Code
-ipmi_ret_t ipmiOemSetPPINInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                              ipmi_request_t request, ipmi_response_t response,
-                              ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemSetPPINInfo(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                              ipmi_response_t, ipmi_data_len_t data_len,
+                              ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     std::string ppinStr;
@@ -1014,11 +1005,9 @@
 //----------------------------------------------------------------------
 // Set ADR Trigger (CMD_OEM_SET_ADR_TRIGGER)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemSetAdrTrigger(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                ipmi_request_t request,
-                                ipmi_response_t response,
-                                ipmi_data_len_t data_len,
-                                ipmi_context_t context)
+ipmi_ret_t ipmiOemSetAdrTrigger(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                                ipmi_response_t, ipmi_data_len_t data_len,
+                                ipmi_context_t)
 {
     /* Do nothing, return success */
     *data_len = 0;
@@ -1026,7 +1015,7 @@
 }
 
 // Helper function to set guid at offset in EEPROM
-static int setGUID(off_t offset, uint8_t* guid)
+[[maybe_unused]] static int setGUID(off_t offset, uint8_t* guid)
 {
     int fd = -1;
     ssize_t len;
@@ -1069,7 +1058,7 @@
 // Set System GUID (CMD_OEM_SET_SYSTEM_GUID)
 //----------------------------------------------------------------------
 #if BIC_ENABLED
-ipmi::RspType<> ipmiOemSetSystemGuid(ipmi::Context::ptr ctx, uint8_t cmdReq,
+ipmi::RspType<> ipmiOemSetSystemGuid(ipmi::Context::ptr ctx, uint8_t,
                                      std::vector<uint8_t> reqData)
 {
     std::vector<uint8_t> respData;
@@ -1080,8 +1069,6 @@
         return ipmi::responseReqDataLenInvalid();
     }
 
-    auto ptrReqData = reqData.insert(reqData.begin(), reqData.size());
-
     uint8_t bicAddr = (uint8_t)ctx->hostIdx << 2;
 
     if (sendBicCmd(ctx->netFn, ctx->cmd, bicAddr, reqData, respData))
@@ -1118,11 +1105,9 @@
 //----------------------------------------------------------------------
 // Set Bios Flash Info (CMD_OEM_SET_BIOS_FLASH_INFO)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemSetBiosFlashInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                   ipmi_request_t request,
-                                   ipmi_response_t response,
-                                   ipmi_data_len_t data_len,
-                                   ipmi_context_t context)
+ipmi_ret_t ipmiOemSetBiosFlashInfo(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
+                                   ipmi_response_t, ipmi_data_len_t data_len,
+                                   ipmi_context_t)
 {
     /* Do nothing, return success */
     *data_len = 0;
@@ -1132,9 +1117,9 @@
 //----------------------------------------------------------------------
 // Set PPR (CMD_OEM_SET_PPR)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemSetPpr(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                         ipmi_request_t request, ipmi_response_t response,
-                         ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemSetPpr(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                         ipmi_response_t, ipmi_data_len_t data_len,
+                         ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t pprCnt, pprAct, pprIndex;
@@ -1222,9 +1207,9 @@
 //----------------------------------------------------------------------
 // Get PPR (CMD_OEM_GET_PPR)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiOemGetPpr(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                         ipmi_request_t request, ipmi_response_t response,
-                         ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemGetPpr(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                         ipmi_response_t response, ipmi_data_len_t data_len,
+                         ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
@@ -1334,9 +1319,9 @@
 // Byte 5 – Processor frequency in MHz (MSB)
 // Byte 6..7 – Revision
 //
-ipmi_ret_t ipmiOemQSetProcInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                               ipmi_request_t request, ipmi_response_t response,
-                               ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemQSetProcInfo(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                               ipmi_response_t, ipmi_data_len_t data_len,
+                               ipmi_context_t)
 {
     qProcInfo_t* req = reinterpret_cast<qProcInfo_t*>(request);
     uint8_t numParam = sizeof(cpuInfoKey) / sizeof(uint8_t*);
@@ -1392,9 +1377,9 @@
 // Byte 5 – Processor frequency in MHz (MSB)
 // Byte 6..7 – Revision
 //
-ipmi_ret_t ipmiOemQGetProcInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                               ipmi_request_t request, ipmi_response_t response,
-                               ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemQGetProcInfo(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                               ipmi_response_t response,
+                               ipmi_data_len_t data_len, ipmi_context_t)
 {
     qProcInfo_t* req = reinterpret_cast<qProcInfo_t*>(request);
     uint8_t numParam = sizeof(cpuInfoKey) / sizeof(uint8_t*);
@@ -1486,9 +1471,9 @@
 // Byte 1 - Module Manufacturer ID, LSB
 // Byte 2 - Module Manufacturer ID, MSB
 //
-ipmi_ret_t ipmiOemQSetDimmInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                               ipmi_request_t request, ipmi_response_t response,
-                               ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemQSetDimmInfo(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                               ipmi_response_t, ipmi_data_len_t data_len,
+                               ipmi_context_t)
 {
     qDimmInfo_t* req = reinterpret_cast<qDimmInfo_t*>(request);
     uint8_t numParam = sizeof(dimmInfoKey) / sizeof(uint8_t*);
@@ -1579,9 +1564,9 @@
 // Byte 1 - Module Manufacturer ID, LSB
 // Byte 2 - Module Manufacturer ID, MSB
 //
-ipmi_ret_t ipmiOemQGetDimmInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                               ipmi_request_t request, ipmi_response_t response,
-                               ipmi_data_len_t data_len, ipmi_context_t context)
+ipmi_ret_t ipmiOemQGetDimmInfo(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
+                               ipmi_response_t response,
+                               ipmi_data_len_t data_len, ipmi_context_t)
 {
     qDimmInfo_t* req = reinterpret_cast<qDimmInfo_t*>(request);
     uint8_t numParam = sizeof(dimmInfoKey) / sizeof(uint8_t*);
@@ -1691,11 +1676,9 @@
 //  Param#7 (HDD WWN)
 //  Data 1...8: HDD World Wide Name, LSB
 //
-ipmi_ret_t ipmiOemQSetDriveInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                ipmi_request_t request,
-                                ipmi_response_t response,
-                                ipmi_data_len_t data_len,
-                                ipmi_context_t context)
+ipmi_ret_t ipmiOemQSetDriveInfo(ipmi_netfn_t, ipmi_cmd_t,
+                                ipmi_request_t request, ipmi_response_t,
+                                ipmi_data_len_t data_len, ipmi_context_t)
 {
     qDriveInfo_t* req = reinterpret_cast<qDriveInfo_t*>(request);
     uint8_t numParam = sizeof(driveInfoKey) / sizeof(uint8_t*);
@@ -1753,11 +1736,10 @@
 // Byte 2..N – Configuration parameter data (see Table_1415h Parameters of HDD
 // Information)
 //
-ipmi_ret_t ipmiOemQGetDriveInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiOemQGetDriveInfo(ipmi_netfn_t, ipmi_cmd_t,
                                 ipmi_request_t request,
                                 ipmi_response_t response,
-                                ipmi_data_len_t data_len,
-                                ipmi_context_t context)
+                                ipmi_data_len_t data_len, ipmi_context_t)
 {
     qDriveInfo_t* req = reinterpret_cast<qDriveInfo_t*>(request);
     uint8_t numParam = sizeof(driveInfoKey) / sizeof(uint8_t*);
diff --git a/src/selcommands.cpp b/src/selcommands.cpp
index aade561..ee4cfff 100644
--- a/src/selcommands.cpp
+++ b/src/selcommands.cpp
@@ -206,7 +206,7 @@
     "High Power I/O subsystem", "Unknown"};
 
 /* Default log message for unknown type */
-static void logDefault(uint8_t* data, std::string& errLog)
+static void logDefault(uint8_t*, std::string& errLog)
 {
     errLog = "Unknown";
 }
@@ -412,7 +412,7 @@
     }
 }
 
-static void logMemErr(uint8_t* dataPtr, std::string& errLog)
+[[maybe_unused]] static void logMemErr(uint8_t* dataPtr, std::string& errLog)
 {
     uint8_t snrType = dataPtr[0];
     uint8_t snrNum = dataPtr[1];
@@ -485,8 +485,8 @@
         {
 
             /* All Info Valid */
-            uint8_t chnNum = (data[2] & 0x1C) >> 2;
-            uint8_t dimmNum = data[2] & 0x3;
+            [[maybe_unused]] uint8_t chnNum = (data[2] & 0x1C) >> 2;
+            [[maybe_unused]] uint8_t dimmNum = data[2] & 0x3;
 
             /* TODO: If critical SEL logging is available, do it */
             if (snrType == 0x0C)
@@ -1194,7 +1194,8 @@
             }
         }
 
-        std::tm* ts = localtime((time_t*)(&(data->timeStamp)));
+        uint32_t timeStamp = data->timeStamp;
+        std::tm* ts = localtime(reinterpret_cast<time_t*>(&timeStamp));
         std::string timeStr = std::asctime(ts);
 
         parseStdSel(data, errLog);
@@ -1226,7 +1227,8 @@
         std::string oemDataStr;
         toHexStr(oemData, oemDataStr);
 
-        std::tm* ts = localtime((time_t*)(&(data->timeStamp)));
+        uint32_t timeStamp = data->timeStamp;
+        std::tm* ts = localtime(reinterpret_cast<time_t*>(&timeStamp));
         std::string timeStr = std::asctime(ts);
 
         errType = oemTSErr;
@@ -1484,7 +1486,7 @@
     return ipmi::responseSuccess(selTime.tv_sec);
 }
 
-ipmi::RspType<> ipmiStorageSetSELTime(uint32_t selTime)
+ipmi::RspType<> ipmiStorageSetSELTime(uint32_t)
 {
     // Set SEL Time is not supported
     return ipmi::responseInvalidCommand();
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index 6586fff..dc6c91b 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -196,7 +196,7 @@
 
     // hash the object paths to create unique device id's. increment on
     // collision
-    std::hash<std::string> hasher;
+    [[maybe_unused]] std::hash<std::string> hasher;
     for (const auto& fru : frus)
     {
         auto fruIface = fru.second.find("xyz.openbmc_project.FruDevice");
@@ -281,11 +281,10 @@
     return IPMI_CC_OK;
 }
 
-ipmi_ret_t ipmiStorageReadFRUData(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiStorageReadFRUData(ipmi_netfn_t, ipmi_cmd_t,
                                   ipmi_request_t request,
                                   ipmi_response_t response,
-                                  ipmi_data_len_t dataLen,
-                                  ipmi_context_t context)
+                                  ipmi_data_len_t dataLen, ipmi_context_t)
 {
     if (*dataLen != 4)
     {
@@ -333,11 +332,10 @@
     return IPMI_CC_OK;
 }
 
-ipmi_ret_t ipmiStorageWriteFRUData(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiStorageWriteFRUData(ipmi_netfn_t, ipmi_cmd_t,
                                    ipmi_request_t request,
                                    ipmi_response_t response,
-                                   ipmi_data_len_t dataLen,
-                                   ipmi_context_t context)
+                                   ipmi_data_len_t dataLen, ipmi_context_t)
 {
     if (*dataLen < 4 ||
         *dataLen >=
@@ -357,7 +355,7 @@
     {
         return status;
     }
-    int lastWriteAddr = req->fruInventoryOffset + writeLen;
+    size_t lastWriteAddr = req->fruInventoryOffset + writeLen;
     if (fruCache.size() < lastWriteAddr)
     {
         fruCache.resize(req->fruInventoryOffset + writeLen);
@@ -373,7 +371,7 @@
 
         FRUHeader* header = reinterpret_cast<FRUHeader*>(fruCache.data());
 
-        int lastRecordStart = std::max(
+        size_t lastRecordStart = std::max(
             header->internalOffset,
             std::max(header->chassisOffset,
                      std::max(header->boardOffset, header->productOffset)));
@@ -535,10 +533,8 @@
 }
 
 ipmi_ret_t ipmiStorageReserveSDR(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                 ipmi_request_t request,
-                                 ipmi_response_t response,
-                                 ipmi_data_len_t dataLen,
-                                 ipmi_context_t context)
+                                 ipmi_request_t, ipmi_response_t response,
+                                 ipmi_data_len_t dataLen, ipmi_context_t)
 {
     printCommand(+netfn, +cmd);
 
@@ -563,7 +559,7 @@
 
 ipmi_ret_t ipmiStorageGetSDR(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
                              ipmi_request_t request, ipmi_response_t response,
-                             ipmi_data_len_t dataLen, ipmi_context_t context)
+                             ipmi_data_len_t dataLen, ipmi_context_t)
 {
     printCommand(+netfn, +cmd);
 
@@ -608,8 +604,9 @@
         return IPMI_CC_INVALID_FIELD_REQUEST;
     }
 
-    uint16_t nextRecord =
-        lastRecord > (req->recordID + 1) ? req->recordID + 1 : 0XFFFF;
+    uint16_t nextRecord = lastRecord > static_cast<size_t>(req->recordID + 1)
+                              ? req->recordID + 1
+                              : 0XFFFF;
 
     auto responseClear = static_cast<uint8_t*>(response);
     std::fill(responseClear, responseClear + requestedSize, 0);
@@ -670,7 +667,7 @@
         return IPMI_CC_RESPONSE_ERROR;
     }
     uint8_t sensornumber = (req->recordID & 0xFF);
-    get_sdr::SensorDataFullRecord record = {0};
+    get_sdr::SensorDataFullRecord record = {};
 
     record.header.record_id_msb = req->recordID << 8;
     record.header.record_id_lsb = req->recordID & 0xFF;
@@ -885,11 +882,10 @@
         return -1;
 }
 
-ipmi_ret_t ipmiStorageGetFRUInvAreaInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiStorageGetFRUInvAreaInfo(ipmi_netfn_t, ipmi_cmd_t,
                                         ipmi_request_t request,
                                         ipmi_response_t response,
-                                        ipmi_data_len_t dataLen,
-                                        ipmi_context_t context)
+                                        ipmi_data_len_t dataLen, ipmi_context_t)
 {
     if (*dataLen != 1)
     {
diff --git a/src/transportcommands.cpp b/src/transportcommands.cpp
index fb11144..9aee32d 100644
--- a/src/transportcommands.cpp
+++ b/src/transportcommands.cpp
@@ -46,11 +46,10 @@
 //----------------------------------------------------------------------
 // Get SoL Config (IPMI/Section 26.3) (CMD_TRANSPORT_GET_SOL_CONFIG)
 //----------------------------------------------------------------------
-ipmi_ret_t ipmiTransGetSolConfig(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
+ipmi_ret_t ipmiTransGetSolConfig(ipmi_netfn_t, ipmi_cmd_t,
                                  ipmi_request_t request,
                                  ipmi_response_t response,
-                                 ipmi_data_len_t data_len,
-                                 ipmi_context_t context)
+                                 ipmi_data_len_t data_len, ipmi_context_t)
 {
     uint8_t* req = reinterpret_cast<uint8_t*>(request);
     uint8_t* res = reinterpret_cast<uint8_t*>(response);
diff --git a/src/usb-dbg.cpp b/src/usb-dbg.cpp
index 55ba20c..01c5455 100644
--- a/src/usb-dbg.cpp
+++ b/src/usb-dbg.cpp
@@ -132,7 +132,6 @@
     if (ret < 0)
         return ret;
 
-    int len = strlen(string);
     for (ptr = lbuf; *ptr != '\0'; ptr++)
     {
         if (isFull())
@@ -220,7 +219,7 @@
     if (page > pages || page < 1)
         return -1;
 
-    if (page_buf == NULL || page_buf_size < 0)
+    if (page_buf == NULL || page_buf_size == 0)
         return -1;
 
     ret = snprintf(page_buf, 17, "%-10s %02d/%02d", title, page, pages);
@@ -293,7 +292,7 @@
 int frame::parse(char* lbuf, size_t buf_size, const char* input, int indent)
 {
     uint8_t pos, esc;
-    int i;
+    size_t i;
     const char *in, *end;
 
     if (buf == NULL || input == NULL)
@@ -582,12 +581,12 @@
     return -1;
 }
 
-static int udbg_get_cri_sel(uint8_t frame, uint8_t page, uint8_t* next,
+static int udbg_get_cri_sel(uint8_t, uint8_t page, uint8_t* next,
                             uint8_t* count, uint8_t* buffer)
 {
     int len;
     int ret;
-    char line_buff[FRAME_PAGE_BUF_SIZE], *fptr;
+    char line_buff[FRAME_PAGE_BUF_SIZE];
     const char* ptr;
     FILE* fp;
     struct stat file_stat;
@@ -669,7 +668,7 @@
     return 0;
 }
 
-static int udbg_get_cri_sensor(uint8_t frame, uint8_t page, uint8_t* next,
+static int udbg_get_cri_sensor(uint8_t, uint8_t page, uint8_t* next,
                                uint8_t* count, uint8_t* buffer)
 {
     int ret;
@@ -910,12 +909,12 @@
     return 0;
 }
 
-static int udbg_get_info_page(uint8_t frame, uint8_t page, uint8_t* next,
+static int udbg_get_info_page(uint8_t, uint8_t page, uint8_t* next,
                               uint8_t* count, uint8_t* buffer)
 {
-    char line_buff[1000], *pres_dev = line_buff;
-    size_t pos = plat_get_fru_sel();
-    const char* delim = "\n";
+    char line_buff[1000];
+    [[maybe_unused]] char* pres_dev = line_buff;
+    [[maybe_unused]] size_t pos = plat_get_fru_sel();
     int ret;
     std::string serialName = "BOARD_SERIAL_NUMBER";
     std::string partName = "BOARD_PART_NUMBER";
@@ -1060,112 +1059,118 @@
     }
 }
 
-static uint8_t panel_boot_order(uint8_t item)
+static uint8_t panel_boot_order(uint8_t)
 {
+    /* To be implemented */
+#if 0
     int i;
     unsigned char buff[MAX_VALUE_LEN], pickup, len;
     size_t pos = plat_get_fru_sel();
+    if (pos != FRU_ALL && pal_get_boot_order(pos, buff, buff, &len) == 0)
+    {
+        if (item > 0 && item < SIZE_BOOT_ORDER)
+        {
+            pickup = buff[item];
+            while (item > 1)
+            {
+                buff[item] = buff[item - 1];
+                item--;
+            }
+            buff[item] = pickup;
+            buff[0] |= 0x80;
+            pal_set_boot_order(pos, buff, buff, &len);
 
-    /* To be implemented */
-    /*
-  if (pos != FRU_ALL && pal_get_boot_order(pos, buff, buff, &len) == 0)
-  {
-  if (item > 0 && item < SIZE_BOOT_ORDER)
-  {
-  pickup = buff[item];
-  while (item > 1)
-  {
-    buff[item] = buff[item -1];
-    item--;
-  }
-  buff[item] = pickup;
-  buff[0] |= 0x80;
-  pal_set_boot_order(pos, buff, buff, &len);
+            // refresh items
+            return panels[PANEL_BOOT_ORDER].select(0);
+        }
 
-  // refresh items
-  return panels[PANEL_BOOT_ORDER].select(0);
-  }
+        // '*': boot flags valid, BIOS has not yet read
+        snprintf(panels[PANEL_BOOT_ORDER].item_str[0], 32, "Boot Order%c",
+                 (buff[0] & 0x80) ? '*' : '\0');
 
-  // '*': boot flags valid, BIOS has not yet read
-  snprintf(panels[PANEL_BOOT_ORDER].item_str[0], 32,
-  "Boot Order%c", (buff[0] & 0x80)?'*':'\0');
+        for (i = 1; i < SIZE_BOOT_ORDER; i++)
+        {
+            switch (buff[i])
+            {
+                case 0x0:
+                    snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
+                             " USB device");
+                    break;
+                case 0x1:
+                    snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
+                             " Network v4");
+                    break;
+                case (0x1 | 0x8):
+                    snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
+                             " Network v6");
+                    break;
+                case 0x2:
+                    snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
+                             " SATA HDD");
+                    break;
+                case 0x3:
+                    snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
+                             " SATA-CDROM");
+                    break;
+                case 0x4:
+                    snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
+                             " Other");
+                    break;
+                default:
+                    panels[PANEL_BOOT_ORDER].item_str[i][0] = '\0';
+                    break;
+            }
+        }
 
-  for (i = 1; i < SIZE_BOOT_ORDER; i++)
-  {
-  switch (buff[i])
-  {
-    case 0x0:
-      snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
-        " USB device");
-      break;
-    case 0x1:
-      snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
-        " Network v4");
-      break;
-    case (0x1 | 0x8):
-      snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
-        " Network v6");
-      break;
-    case 0x2:
-      snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
-        " SATA HDD");
-      break;
-    case 0x3:
-      snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
-        " SATA-CDROM");
-      break;
-    case 0x4:
-      snprintf(panels[PANEL_BOOT_ORDER].item_str[i], 32,
-        " Other");
-      break;
-    default:
-      panels[PANEL_BOOT_ORDER].item_str[i][0] = '\0';
-      break;
-  }
-  }
+        // remove empty items
+        for (i--;
+             (strlen(panels[PANEL_BOOT_ORDER].item_str[i]) == 0) && (i > 0);
+             i--)
+            ;
 
-  // remove empty items
-  for (i--; (strlen(panels[PANEL_BOOT_ORDER].item_str[i]) == 0) && (i > 0); i--)
-  ;
-
-  panels[PANEL_BOOT_ORDER].item_num = i;
-  } else
-  {
-  panels[PANEL_BOOT_ORDER].item_num = 0;
-  }
-            */
+        panels[PANEL_BOOT_ORDER].item_num = i;
+    }
+    else
+    {
+        panels[PANEL_BOOT_ORDER].item_num = 0;
+    }
+#endif
     return PANEL_BOOT_ORDER;
 }
 
-static uint8_t panel_power_policy(uint8_t item)
+static uint8_t panel_power_policy(uint8_t)
 {
+/* To be cleaned */
+#if 0
     uint8_t buff[32] = {0};
     uint8_t res_len;
     size_t pos = plat_get_fru_sel();
     uint8_t policy;
-    //  uint8_t pwr_policy_item_map[3] = {POWER_CFG_ON, POWER_CFG_LPS,
-    //  POWER_CFG_OFF};
+    uint8_t pwr_policy_item_map[3] = {POWER_CFG_ON, POWER_CFG_LPS,
+                                      POWER_CFG_OFF};
 
-    /* To be cleaned */
-    /*
-  if (pos != FRU_ALL) {
-  if (item > 0 && item <= sizeof(pwr_policy_item_map)) {
-  policy = pwr_policy_item_map[item - 1];
-  pal_set_power_restore_policy(pos, &policy, NULL);
-  }
-  pal_get_chassis_status(pos, NULL, buff, &res_len);
-  policy = (((uint8_t)buff[0]) >> 5) & 0x7;
-  snprintf(panels[PANEL_POWER_POLICY].item_str[1], 32,
-    "%cPower On", policy == POWER_CFG_ON ? '*' : ' ');
-  snprintf(panels[PANEL_POWER_POLICY].item_str[2], 32,
-    "%cLast State", policy == POWER_CFG_LPS ? '*' : ' ');
-  snprintf(panels[PANEL_POWER_POLICY].item_str[3], 32,
-    "%cPower Off", policy == POWER_CFG_OFF ? '*' : ' ');
-  panels[PANEL_POWER_POLICY].item_num = 3;
-  } else {
-  panels[PANEL_POWER_POLICY].item_num = 0;
-  }
-    */
+    if (pos != FRU_ALL)
+    {
+        if (item > 0 && item <= sizeof(pwr_policy_item_map))
+        {
+            policy = pwr_policy_item_map[item - 1];
+            pal_set_power_restore_policy(pos, &policy, NULL);
+        }
+        pal_get_chassis_status(pos, NULL, buff, &res_len);
+        policy = (((uint8_t)buff[0]) >> 5) & 0x7;
+        snprintf(panels[PANEL_POWER_POLICY].item_str[1], 32, "%cPower On",
+                 policy == POWER_CFG_ON ? '*' : ' ');
+        snprintf(panels[PANEL_POWER_POLICY].item_str[2], 32, "%cLast State",
+                 policy == POWER_CFG_LPS ? '*' : ' ');
+        snprintf(panels[PANEL_POWER_POLICY].item_str[3], 32, "%cPower Off",
+                 policy == POWER_CFG_OFF ? '*' : ' ');
+        panels[PANEL_POWER_POLICY].item_num = 3;
+    }
+    else
+    {
+        panels[PANEL_POWER_POLICY].item_num = 0;
+    }
+#endif
     return PANEL_POWER_POLICY;
 }
 
diff --git a/subprojects/phosphor-logging.wrap b/subprojects/phosphor-logging.wrap
new file mode 100644
index 0000000..6876a6e
--- /dev/null
+++ b/subprojects/phosphor-logging.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://github.com/openbmc/phosphor-logging
+revision = HEAD
+
+[provide]
+phosphor-logging = phosphor_logging_dep
diff --git a/subprojects/sdbusplus.wrap b/subprojects/sdbusplus.wrap
new file mode 100644
index 0000000..42cfcee
--- /dev/null
+++ b/subprojects/sdbusplus.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://github.com/openbmc/sdbusplus
+revision = HEAD
+
+[provide]
+sdbusplus = sdbusplus_dep