JiaHuann / libbpf-bootstrap-android

Do something to fit android aarch64 to develop ebpf programs using libbpf-bootstrap framework
BSD 3-Clause "New" or "Revised" License
32 stars 4 forks source link

layout: post title: libbpf-bootstrap-android date: 2023-9-14 16:18 category: Framework author: JiaHuann tags: [Android, ebpf-framework, cross-compile] summary: 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.

Libbpf-bootstrap for android

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:

prerare

usage

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!

feature

RoadMap: