AMD APML modules, apml_sbtsi and apml_sbrmi registers to hwmon framework provding temperature and power metrics of the socket. They are extended by registering a misc_device, which provides ioctl interface to BMC admins.
28
stars
3
forks
source link
make command fails to cross compile for Unbuntu 22.04 on SMC #3
Do you know why I can make on Ubuntu 22.04 for Genoa and Milan M/B? Thanks.
root@test-Super-Server:/tmp/apml_modules# make
make -C /lib/modules/uname -r/build M=$PWD modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-35-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
CC [M] /tmp/apml_modules/sbrmi.o
/tmp/apml_modules/sbrmi.c:418:19: error: initialization of ‘void ()(struct i3c_device )’ from incompatible pointer type ‘int ()(struct i3c_device )’ [-Werror=incompatible-pointer-types]
418 | .remove = sbrmi_i3c_remove,
| ^~~~
/tmp/apml_modules/sbrmi.c:418:19: note: (near initialization for ‘sbrmi_i3c_driver.remove’)
In file included from ./include/linux/device.h:32,
from ./include/linux/i3c/device.h:12,
from /tmp/apml_modules/sbrmi.c:12:
/tmp/apml_modules/sbrmi.c: In function ‘sbrmi_i3c_driver_init’:
./include/linux/i3c/device.h:289:23: error: too few arguments to function ‘i3c_i2c_driver_register’
289 | i3c_i2c_driver_register, \
| ^~~~~~~
./include/linux/device/driver.h:264:16: note: in definition of macro ‘module_driver’
264 | return register(&(driver) , ##VA_ARGS__); \
| ^~~~~~
/tmp/apml_modules/sbrmi.c:422:1: note: in expansion of macro ‘module_i3c_i2c_driver’
422 | module_i3c_i2c_driver(sbrmi_i3c_driver, &sbrmi_driver)
| ^~~~~
In file included from /tmp/apml_modules/sbrmi.c:12:
./include/linux/i3c/device.h:241:19: note: declared here
241 | static inline int i3c_i2c_driver_register(struct i3c_driver *i3cdrv,
| ^~~~~~~
In file included from ./include/linux/device.h:32,
from ./include/linux/i3c/device.h:12,
from /tmp/apml_modules/sbrmi.c:12:
/tmp/apml_modules/sbrmi.c: In function ‘sbrmi_i3c_driver_exit’:
./include/linux/i3c/device.h:290:23: error: too few arguments to function ‘i3c_i2c_driver_unregister’
290 | i3c_i2c_driver_unregister)
| ^~~~~~~~~
./include/linux/device/driver.h:269:9: note: in definition of macro ‘module_driver’
269 | unregister(&(driver) , ##VA_ARGS); \
| ^~~~
/tmp/apml_modules/sbrmi.c:422:1: note: in expansion of macro ‘module_i3c_i2c_driver’
422 | module_i3c_i2c_driver(sbrmi_i3c_driver, &sbrmi_driver)
| ^~~~~
In file included from /tmp/apml_modules/sbrmi.c:12:
./include/linux/i3c/device.h:266:20: note: declared here
266 | static inline void i3c_i2c_driver_unregister(struct i3c_driver *i3cdrv,
| ^~~~~~~~~
In file included from ./include/linux/device.h:32,
from ./include/linux/i3c/device.h:12,
from /tmp/apml_modules/sbrmi.c:12:
/tmp/apml_modules/sbrmi.c: In function ‘sbrmi_i3c_driver_init’:
./include/linux/device/driver.h:265:1: error: control reaches end of non-void function [-Werror=return-type]
265 | } \
| ^
./include/linux/i3c/device.h:288:9: note: in expansion of macro ‘module_driver’
288 | module_driver(i3cdrv, \
| ^~~~~
/tmp/apml_modules/sbrmi.c:422:1: note: in expansion of macro ‘module_i3c_i2c_driver’
422 | module_i3c_i2c_driver(sbrmi_i3c_driver, &sbrmi_driver)
| ^~~~~
At top level:
/tmp/apml_modules/sbrmi.c:402:26: warning: ‘sbrmi_driver’ defined but not used [-Wunused-variable]
402 | static struct i2c_driver sbrmi_driver = {
| ^~~~
cc1: some warnings being treated as errors
make[2]: [scripts/Makefile.build:257: /tmp/apml_modules/sbrmi.o] Error 1
make[1]: [Makefile:1850: /tmp/apml_modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-35-generic'
make: *** [Makefile:13: default] Error 2
root@test-Super-Server:/tmp/apml_modules#
Dear Sirs,
Do you know why I can make on Ubuntu 22.04 for Genoa and Milan M/B? Thanks.
root@test-Super-Server:/tmp/apml_modules# make make -C /lib/modules/
uname -r
/build M=$PWD modules make[1]: Entering directory '/usr/src/linux-headers-5.19.0-35-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 CC [M] /tmp/apml_modules/sbrmi.o /tmp/apml_modules/sbrmi.c:418:19: error: initialization of ‘void ()(struct i3c_device )’ from incompatible pointer type ‘int ()(struct i3c_device )’ [-Werror=incompatible-pointer-types] 418 | .remove = sbrmi_i3c_remove, | ^~~~/tmp/apml_modules/sbrmi.c:418:19: note: (near initialization for ‘sbrmi_i3c_driver.remove’) In file included from ./include/linux/device.h:32, from ./include/linux/i3c/device.h:12, from /tmp/apml_modules/sbrmi.c:12: /tmp/apml_modules/sbrmi.c: In function ‘sbrmi_i3c_driver_init’: ./include/linux/i3c/device.h:289:23: error: too few arguments to function ‘i3c_i2c_driver_register’ 289 | i3c_i2c_driver_register, \ | ^~~~~~~ ./include/linux/device/driver.h:264:16: note: in definition of macro ‘module_driver’ 264 | return register(&(driver) , ##VA_ARGS__); \ | ^~~~~~ /tmp/apml_modules/sbrmi.c:422:1: note: in expansion of macro ‘module_i3c_i2c_driver’ 422 | module_i3c_i2c_driver(sbrmi_i3c_driver, &sbrmi_driver) | ^~~~~In file included from /tmp/apml_modules/sbrmi.c:12: ./include/linux/i3c/device.h:241:19: note: declared here 241 | static inline int i3c_i2c_driver_register(struct i3c_driver *i3cdrv, | ^~~~~~~ In file included from ./include/linux/device.h:32, from ./include/linux/i3c/device.h:12, from /tmp/apml_modules/sbrmi.c:12: /tmp/apml_modules/sbrmi.c: In function ‘sbrmi_i3c_driver_exit’: ./include/linux/i3c/device.h:290:23: error: too few arguments to function ‘i3c_i2c_driver_unregister’ 290 | i3c_i2c_driver_unregister) | ^~~~~~~~~ ./include/linux/device/driver.h:269:9: note: in definition of macro ‘module_driver’ 269 | unregister(&(driver) , ##VA_ARGS); \ | ^~~~ /tmp/apml_modules/sbrmi.c:422:1: note: in expansion of macro ‘module_i3c_i2c_driver’ 422 | module_i3c_i2c_driver(sbrmi_i3c_driver, &sbrmi_driver) | ^~~~~In file included from /tmp/apml_modules/sbrmi.c:12: ./include/linux/i3c/device.h:266:20: note: declared here 266 | static inline void i3c_i2c_driver_unregister(struct i3c_driver *i3cdrv, | ^~~~~~~~~ In file included from ./include/linux/device.h:32, from ./include/linux/i3c/device.h:12, from /tmp/apml_modules/sbrmi.c:12: /tmp/apml_modules/sbrmi.c: In function ‘sbrmi_i3c_driver_init’: ./include/linux/device/driver.h:265:1: error: control reaches end of non-void function [-Werror=return-type] 265 | } \ | ^ ./include/linux/i3c/device.h:288:9: note: in expansion of macro ‘module_driver’ 288 | module_driver(i3cdrv, \ | ^~~~~ /tmp/apml_modules/sbrmi.c:422:1: note: in expansion of macro ‘module_i3c_i2c_driver’ 422 | module_i3c_i2c_driver(sbrmi_i3c_driver, &sbrmi_driver) | ^~~~~At top level: /tmp/apml_modules/sbrmi.c:402:26: warning: ‘sbrmi_driver’ defined but not used [-Wunused-variable] 402 | static struct i2c_driver sbrmi_driver = { | ^~~~ cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:257: /tmp/apml_modules/sbrmi.o] Error 1 make[1]: [Makefile:1850: /tmp/apml_modules] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-35-generic' make: *** [Makefile:13: default] Error 2 root@test-Super-Server:/tmp/apml_modules#