how to use alpine-sdk to build custom kernel source
Dear experts,
I am trying to build a linux 5.10.66 derived kernel source on Alpine Linux 3.16-aarch64 platform with alpine-sdk
and other packages. However, I got an error when making the vmlinux.o
:
$ ld -EL -maarch64elf -r -o vmlinux.o --whole-archive arch/arm64/kernel/head.o init/built-in.a usr/built-in.a arch/arm64/built-in.a kernel/builtin.a certs/built-in.a mm/built-in.a fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a block/built-in.a arch/arm64/lib/built-in.a lib/builtin.a arch/arm64/lib/lib.a lib/lib.a drivers/built-in.a sound/built-in.a net/built-in.a virt/built-in.a --no-whole-archive --start-group --end-group
ld: __patchable_function_entries has both ordered and unordered sections
My compiler is gcc version 11.2.1 20220219 (Alpine 11.2.1_git20220219)
and the loader is GNU ld (GNU Binutils) 2.38
.
I searched Internet and found someone said -nostdlib
option should be used, I tried but it doesn't work I also noticed this issue but not sure if it is my case and there is no workaround.
I am wondering if theres is any hints on this issue?
Regards, yf