Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1282 - "CONFIG_STRIP_KERNEL_EXPORTS" breaks kernel compilation for Raspberry PI3 (arm64) #5680

Closed
openwrt-bot opened this issue Jan 18, 2018 · 2 comments
Labels
flyspray kernel pull request/issue with Linux kernel related changes

Comments

@openwrt-bot
Copy link

torte71:

Target: brcm2708_bcm2710 (rpi-3)
Affected openwrt revision: git-head (2604504)
(openwrt-17.01 is not affected)

Select:

Target: Broadcom BCM27xx

Subtarget: BCM2710 64 bit based boards

Global build settings ---> Strip unnecessary exports from the kernel image: Enabled

make -j 1 V=s

  • Build log
make -C /home/torte/openwrt/nfs/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-brcm2708_bcm2710/linux-4.9.76 HOSTCFLAGS="-O2 -I/home/torte/openwrt/nfs/openwrt/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="aarch64-openwrt-linux-musl-" ARCH="arm64" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Thu Jan 18 10:39:42 2018" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/torte/openwrt/nfs/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V='' cmd_syscalls= KERNELRELEASE=4.9.76 EXTRA_LDSFLAGS="-I/home/torte/openwrt/nfs/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-brcm2708_bcm2710 -include symtab.h" CC="aarch64-openwrt-linux-musl-gcc" modules make[5]: Entering directory '/home/torte/openwrt/nfs/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-brcm2708_bcm2710/linux-4.9.76' CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh LDS arch/arm64/kernel/vdso/vdso.lds cc1: fatal error: symtab.h: No such file or directory compilation terminated. scripts/Makefile.build:405: recipe for target 'arch/arm64/kernel/vdso/vdso.lds' failed make[6]: *** [arch/arm64/kernel/vdso/vdso.lds] Error 1 arch/arm64/Makefile:145: recipe for target 'vdso_prepare' failed make[5]: *** [vdso_prepare] Error 2
  • Details
    The option CONFIG_STRIP_KERNEL_EXPORTS adds "-include symtab.h" for all linker script invokations. See openwrt/include/kernel-defaults.mk:
ifdef CONFIG_STRIP_KERNEL_EXPORTS KERNEL_MAKEOPTS += \ EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h" endif

On recent kernels (4.9.x, arm64 build), linker scripts are used to generate "vdso.lds" at the "make modules" stage.
But the file "symtab.h" is generated later (at the install/image generation stage). See openwrt/include/kernel-build.mk:

$(LINUX_DIR)/.image: $(STAMP_CONFIGURED) $(if $(CONFIG_STRIP_KERNEL_EXPORTS),$(KERNEL_BUILD_DIR)/symtab.h) FORCE
$(Kernel/CompileImage)
$(Kernel/CollectDebug)
touch $$@

As a result, kernel compilation fails.

  • Sidenotes:
  • 32bit arm (brcm2708_bcm2708) is not affected, the vdso stuff is generated by normal .c files

  • On arm64 4.4 kernels, the vdso stuff is not compiled for reasons, that I don't know. Anyway, openwrt-17.01 is not affected

@openwrt-bot
Copy link
Author

Amineahd:

I opened PR#696 to fix this

@aparcar aparcar added the kernel pull request/issue with Linux kernel related changes label Feb 22, 2022
@aparcar
Copy link
Member

aparcar commented Dec 2, 2022

This issue is for a EOL release, please comment if this bug still affects you in currently supported releases.

@aparcar aparcar closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray kernel pull request/issue with Linux kernel related changes
Projects
None yet
Development

No branches or pull requests

2 participants