简体   繁体   中英

Failed to build arm64 kernel to halium

I'm trying to compile the halium-boot for my device, and when i try to run the command make halium-boot show this error:

/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);

When I look the generated file they are empty. I tried to change the file mode of gen_vdso_offset.sh to 775 with chmod, but that's not worked.

This is my gen file:

#!/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'

I forked the kernel, and thats the link: Kernel arm64 folder

To someone who face the same problem, i resolved changing the /arch/arm64/Makefile this code:

prepare: vdso_prepare
vdso_prepare: prepare0
    $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso include/generated/vdso-offsets.h

This need to be above this:

PHONY += vdso_install
vdso_install:
    $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@

With this fix the vdso-offset.h is generated before, and fix the empty file problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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