If I compile the bpf samples in the linux kernel I get following error:
/bin/sh: /home/USER/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.19.81/samples/bpf/../..//tools/build/fixdep: No such file or directory
But this directroy exists and contains
Missing or incompatible libraries.
The the output of
ldd /home/USER/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.19.81/samples/bpf/../..//tools/build/fixdep - it is likely that it will report unresolved library dependencies.
Yep. Something with
glibc. Just deletet whole OpenWrt build root, that's why I do not have the ldd output right now.
What I did:
- Compile kernel with
CONFIG_SAMPLES=y or modify kernel Makefile...
- Add under
Makefile under the
bpf directory is resetting the
LDFLAGS and stuff like this. I think this is very problematic. I will try to build it in an OpenWrt environment directly on the system.
Oh, in the
README is written
export ARCH=arm64 export CROSS_COMPILE="aarch64-linux-gnu-" make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang
How can I map this to OpenWrt?
I wouldn’t mind clang as a compiler option, but I think that’s “major surgery”
Just following this guide:
Let's see what happens.
Right now I have to recompile the toolchain again, due to some errors and the forum says this should work
Can somebody try my steps? I do not get, why I habe no
libelf in menuconfig and then compile your toolchain and everything.
Compile for x86_64.
Setup the environment.
make CC=x86_64-openwrt-linux-musl-gcc LD=x86_64-openwrt-linux-musl-ld
I think, this sould compile?