Skip to content

Commit 025c124

Browse files
committed
Add cross support for arm64
1 parent 5081888 commit 025c124

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Cross.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
[build]
22
xargo = false
33
default-target = "x86_64-unknown-linux-gnu"
4-
pre-build = ["apt-get update && apt-get install -y zlib1g-dev libelf-dev"]
4+
pre-build = ["apt-get update && apt-get install -y zlib1g-dev libelf-dev"]
5+
6+
[target.aarch64-unknown-linux-gnu]
7+
pre-build = [
8+
"dpkg --add-architecture $CROSS_DEB_ARCH",
9+
"apt-get update && apt-get --assume-yes install zlib1g-dev:$CROSS_DEB_ARCH libelf-dev:$CROSS_DEB_ARCH"
10+
]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ sudo ./bpftop
5454
## Building from source
5555

5656
1. Install and setup [cross](https://github.com/cross-rs/cross)
57-
2. Run `cross build --release`
57+
2. Run `cross build --release` for x86_64
58+
3. Run `cross build --target=aarch64-unknown-linux-gnu --release` for Arm64

0 commit comments

Comments
 (0)