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

2022-03-23 10:21:07 浏览数 (1)

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

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

代码语言:javascript复制
find ./ -name "*.c" | xargs -i -t astyle -s --style=otbs {}
find ./ -name "*.h" | xargs -i -t astyle -s --style=otbs {}

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

代码语言:javascript复制
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目录,再编译,没有错误。

0 人点赞