系统相关
首页 > 系统相关> > 对Linux kernel代码格式重排后编译失败

对Linux kernel代码格式重排后编译失败

作者:互联网

作者: 付汉杰 hankf@xilinx.com hankf@amd.com
测试环境: Vivado/PetaLinux 2021.2, Linux 5.10.0,VCK190

为了便于修改Linux kernel代码,使用下面命令对Linux kernel代码进行格式重排。

find ./ -name "*.c" | xargs -i -t astyle -s --style=otbs {}
find ./ -name "*.h" | xargs -i -t astyle -s --style=otbs {}

但是后面编译出现下列错误。

AS      arch/arm64/kernel/vdso/sigreturn.o
/proj/hankf/v212/dapd-peta/kernel-source-patch/arch/arm64/include/asm/assembler.h: Assembler messages:
/proj/hankf/v212/dapd-peta/kernel-source-patch/arch/arm64/include/asm/assembler.h:39: Error: Missing parameter qualifier for `flags' in macro `restore_daif'
/proj/hankf/v212/dapd-peta/kernel-source-patch/arch/arm64/include/asm/assembler.h:454: Error: Missing parameter qualifier for `dest' in macro `copy_page'
/proj/hankf/v212/dapd-peta/kernel-source-patch/arch/arm64/include/asm/assembler.h:649: Error: Missing parameter qualifier for `regcount' in macro `frame_push'

于是恢复arch/arm64/include目录,再编译,没有错误。

标签:kernel,assembler,Linux,hankf,arm64,重排,include,arch
来源: https://www.cnblogs.com/hankfu/p/15980242.html