Skip to content

Commit

Permalink
Add cross support for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
jfernandez committed Mar 23, 2024
1 parent 5081888 commit df94bb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Cross.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[build]
xargo = false
default-target = "x86_64-unknown-linux-gnu"
pre-build = ["apt-get update && apt-get install -y zlib1g-dev libelf-dev"]
pre-build = ["apt-get update && apt-get install -y zlib1g-dev libelf-dev"]

[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install zlib1g-dev:$CROSS_DEB_ARCH libelf-dev:$CROSS_DEB_ARCH"
]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bpftop
# bpftop

<img src="bpftop-logo.png" width="75" height="75">

Expand Down Expand Up @@ -54,4 +54,5 @@ sudo ./bpftop
## Building from source

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

0 comments on commit df94bb5

Please sign in to comment.