繁体   English   中英

无法将 arm64 kernel 构建为 halium

[英]Failed to build arm64 kernel to halium

我正在尝试为我的设备编译 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,这就是链接: Kernel arm64 文件夹

对于面临同样问题的人,我解决了更改/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,并修复了空文件问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM