Build on Android
Android上build需要先Installing Debian on Android in Termux
在Android上构建时,需要先Installing Debian on Android in Termux
-
install termux
https://github.com/termux/termux-app/releases/tag/v0.118.0
-
install proot-distro
select debian distro
pkg install proot-distro
proot-distro install debian
proot-distro login debian
-
install packages
remember proot-distro login debian
first
apk update
apt install clang cmake libelf1 libelf-dev zlib1g-dev
之后的步骤和在ARM上build上相同
Build on ARM
-
同步 eunomia-bpf 到本地
git clone https://github.com/eunomia-bpf/eunomia-bpf.git
cd eunomia-bpf
git submodule update --init --recursive --remote
-
配置环境变量
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
-
安装依赖
apt update
apt install clang cmake libelf1 libelf-dev zlib1g-dev
-
修改wasm-runtime/CMakeLists.txt中的
WAMR_BUILD_TARGET(may not required)
change set (WAMR_BUILD_TARGET "X86_64")
to set (WAMR_BUILD_TARGET "AARCH64")
-
编译
make bpf-loader
make ecli
-
检查输出
root@localhost:~/eunomia-bpf# file ecli/build/bin/Release/ecli
ecli: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=eab42b79be75951e3a573aa7c61136239d35c868, for GNU/Linux 3.7.0, with debug_info, not stripped
Share on
Share on