CONFIG_BTF_DEBUG_INFO
support by using externel BTF file in BTFhubForAndroid instead.For this goal,I did some changes on libbpf-bootstrap,and have done some embedded features.Wish this can help you sth.Best regards. For amd64 aarch machine to directly using libbpf-bootstrap framwork to write ebpf programs both kernel and user space.And you don't need to have
CONFIG_BTF_DEBUG_INFO
support by using externel BTF file in BTFhubForAndroid instead.For this goal,I did some changes on libbpf-bootstrap,and have done some embedded features.Wish this can help you sth.Best regards.upstream:
deps
https://github.com/JiaHuann/libbpf-bootstrap-android
cd libbpf-bootstrap-android
sudo apt install gcc-aarch64-linux-gnu llvm clang
wget https://dl.google.com/android/repository/android-ndk-r25c-linux.zip?hl=zh-cn android-ndk-r25c-linux.zip
unzip android-ndk-r25c-linux
set NDK env to $PATH
vim ~/.bashrc
export your android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin to PATH
compile and push to phone
cd examples/c && make
adb devices adb remount # may fail, you can leave with issure. adb push examples/c/btf_file/* example/c/your_executable_file /data/local/tmp adb shell #into android kernel shell
- in android shell
```shell
cd /data/local/tmp && chmod +x your_excutable_file
./run
Congratulations!