Open Kostr opened 2 years ago
Hi, Thanks for the patch. SInce we have rearchitected the code. Can you rebase this patch, using the latest version of the APML library.
Hi @nchatrad !
I can't build esmi_oob_library
because of the missing file <linux/amd-apml.h>
:
https://github.com/amd/esmi_oob_library/blob/00cc0fb0265af1d240a0aff5ed96f90a73ff8c51/include/esmi_oob/apml.h#L47
Is it merged upstream? I don't see it in the https://github.com/torvalds/linux/tree/master/include/linux
This file is present in the https://github.com/amd/apml_modules repo. But this repo looks like a some alternative to the upstream versions of RMI & TSI drivers: https://github.com/torvalds/linux/blob/master/drivers/hwmon/sbrmi.c https://github.com/torvalds/linux/blob/master/drivers/hwmon/sbtsi_temp.c
Shouldn't the amd-apml.h
header be committed to the Linux kernel?
Hi Kostr, As you can see https://github.com/amd/apml_modules repo is evolving with support for new features and platforms. Our plan is to maintain apml_modules as out of tree modules, until a point where we think it is time to be submitted upstream.
@nchatrad I'll try to investigate how to create a Yocto recipe that depends on these out-of-tree modules. But can you also maintain some branch that is in sync with the upstream kernel code?
./esmi_oob_library/include/esmi_oob/apml.h:47:10: fatal error: linux/amd-apml.h: No such file or directory
#include <linux/amd-apml.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
I have the same question, and I can't compile it...
Hi @yiangyang This file is present in the https://github.com/amd/apml_modules repo. Which is marked as a dependency for the APML library to function.
@nchatrad After adding apml_modules recipe and forcing to set Kernel config "CONFIG_MODULES=y" , build is failing with below error.
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/apml_sbtsi.c:434:18: error: initialization of 'int ()(struct i2c_client )' from incompatible pointer type 'int ()(struct i2c_client , const struct i2c_device_id )' [-Werror=incompatible-pointer-types]
| 434 | .probe = sbtsi_i2c_probe,
| | ^~~~~~~
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/apml_sbtsi.c:434:18: note: (near initialization for 'sbtsi_driver.probe')
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/sbrmi.c:663:18: error: initialization of 'int ()(struct i2c_client )' from incompatible pointer type 'int ()(struct i2c_client , const struct i2c_device_id )' [-Werror=incompatible-pointer-types]
| 663 | .probe = sbrmi_i2c_probe,
| | ^~~~~~~
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/sbrmi.c:663:18: note: (near initialization for 'sbrmi_driver.probe')
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/apml_alertl.c: In function 'get_apml_dev_byphandle':
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/apml_alertl.c:146:32: error: 'i3c_bus_type' undeclared (first use in this function); did you mean 'i2c_bus_type'?
| 146 | dev = bus_find_device(&i3c_bus_type, NULL, d_node, sbrmi_match_i3c);
| | ^~~~
| | i2c_bus_type
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/apml_alertl.c:146:32: note: each undeclared identifier is reported only once for each function it appears in
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/apml_alertl.c: In function 'apml_alertl_probe':
| /mnt/work/ojayanth/review/openbmc/build/sp5/tmp/work/sp5-openbmc-linux-gnueabi/apml-modules/1.0/git/apml_alertl.c:205:24: error: implicit declaration of function 'of_get_gpio' [-Werror=implicit-function-declaration]
| 205 | gpio_alert_l = of_get_gpio(dev->of_node, 0);
| | ^~~
| cc1: some warnings being treated as errors
| cc1: some warnings being treated as errors
@ojayanth We have pushed the required patches to https://github.com/amd/apml_modules, to address the issue mentioned in above comment. Please use the latest APML kernel modules for compilation.
I'm trying to integrate
esmi_oob_library
to the OpenBMC (48915: meta-amd: Add APML recipe | https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/48915)Unfortunately it is not possible with the current version of
CMakeLists.txt
if we don't override cmakedo_install
task. The build fails with the following error:It looks like install paths needs some correction. The path prefix should be
/usr
, but not/usr/esmi_oob
.Also it would be good to have an option for examples compilation. By them I mean:
esmi_oob_ex
esmi_oob_tool
esmi_oob_cpuid_tool