我正在尝试为我的设备编译 halium-boot,当我尝试运行命令 make halium-boot
时显示此错误:
/home/jonathan/Documentos/halium/kernel/xiaomi/msm8953/arch/arm64/kernel/signal.c: In function 'setup_return':/home/jonathan/Documentos/halium/kernel/xiaomi/msm8953/arch/arm64/include/asm/vdso.h:34:11: error: 'vdso_offset_sigtramp' undeclared (first use in this function)
(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \
^
/home/jonathan/Documentos/halium/kernel/xiaomi/msm8953/arch/arm64/kernel/signal.c:245:14: note: in expansion of macro 'VDSO_SYMBOL'
sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);
^
/home/jonathan/Documentos/halium/kernel/xiaomi/msm8953/arch/arm64/include/asm/vdso.h:34:11: note: each undeclared identifier is reported only once for each function it appears in
(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \
^
/home/jonathan/Documentos/halium/kernel/xiaomi/msm8953/arch/arm64/kernel/signal.c:245:14: note: in expansion of macro 'VDSO_SYMBOL'
sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);
当我查看生成的文件时,它们是空的。 我尝试使用 chmod 将 gen_vdso_offset.sh 的文件模式更改为 775,但这不起作用。
这是我的 gen 文件:
#!/bin/sh
#
# Match symbols in the DSO that look like VDSO_*; produce a header file
# of constant offsets into the shared object.
#
# Doing this inside the Makefile will break the $(filter-out) function,
# causing Kbuild to rebuild the vdso-offsets header file every time.
#
# Author: Will Deacon <will.deacon@arm.com
#
LC_ALL=C
sed -n -e 's/^00*/0/' -e \
's/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2\t0x\1/p'
我分叉了内核,这就是链接:Kernel arm64 folder
答案 0 :(得分:0)
对于遇到同样问题的人,我解决了更改 /arch/arm64/Makefile
代码的问题:
prepare: vdso_prepare
vdso_prepare: prepare0
$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso include/generated/vdso-offsets.h
这需要高于这个:
PHONY += vdso_install
vdso_install:
$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
通过此修复之前生成的 vdso-offset.h,并修复空文件问题。