Skip to content

Add armv7-unknown-linux-gnueabihf target#922

Draft
Myshkouski wants to merge 3 commits intoRightNow-AI:mainfrom
Myshkouski:build/armv7
Draft

Add armv7-unknown-linux-gnueabihf target#922
Myshkouski wants to merge 3 commits intoRightNow-AI:mainfrom
Myshkouski:build/armv7

Conversation

@Myshkouski
Copy link
Copy Markdown

Summary

This PR adds cross-compilation support for the armv7-unknown-linux-gnueabihf target to enable running OpenFang on 32-bit ARM devices (such as Raspberry Pi 2/3/4 running 32-bit ARM Linux distributions).

Changes

The armv7 target support has been implemented across the following files:

  1. Cross.toml - Added cross-compilation configuration for armv7:
[target.armv7-unknown-linux-gnueabihf]
pre-build = [
  "dpkg --add-architecture $CROSS_DEB_ARCH",
  "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH"
]
  1. .github/workflows/release.yml - Added armv7 to the CLI build matrix:
- target: armv7-unknown-linux-gnueabihf
  os: ubuntu-22.04
  archive: tar.gz
  1. Build process - Uses cross for cross-compilation (lines 176-183 in release.yml):
- name: Install cross (Linux aarch64/armv7)
  if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'armv7-unknown-linux-gnueabihf'
  run: cargo install cross --locked
  • name: Build CLI (cross)
    if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'armv7-unknown-linux-gnueabihf'
    run: cross build --release --target ${{ matrix.target }} --bin openfang

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • [*] No new unsafe code
  • [*] No secrets or API keys in diff

@Jengro777
Copy link
Copy Markdown

Quick feedback from the community:
https://github.com/librefang/librefang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants