内核编译报错: warning: the frame size of 1072 bytes is larger than 1024 bytes

如果编译的是 android 系统:

(1)make menuconfig
(2)kernel hacking
(3)Comlipe-time checks and complier options
(4)修改warn for stack frames larger than 的数值,将其修改为4096(最好不要大过这个数值)
(5)重新编译内核模块则不会出现如上的告警信息

如果编译的是 linux 系统

(1)make menuconfig
(2)kernel hacking
(3)修改warn for stack frames larger than 的数值,将其修改为2048

探究

继续深入探究到底是哪一个配置文件中的哪一个参数所指定的这个值呢?
是/kernel/lib/Kconfig.debug 中定义的一个 FRAME_WARN
直接修改 config 文件中的变量也可以实现,如:
CONFIG_FRAME_WARN=2048

猜你喜欢

转载自blog.csdn.net/weixin_43069863/article/details/126933577