Skip to content

Support for running OFRAK on arm64 Linux#562

Merged
rbs-jacob merged 29 commits into
masterfrom
feature/arm-platform-support
Apr 22, 2025
Merged

Support for running OFRAK on arm64 Linux#562
rbs-jacob merged 29 commits into
masterfrom
feature/arm-platform-support

Conversation

@alchzh
Copy link
Copy Markdown
Contributor

@alchzh alchzh commented Jan 7, 2025

Authored by @Jepson2k

One sentence summary of this PR (This should go in the CHANGELOG!)
OFRAK Docker image builds on arm64 platforms (M1, etc.).

Link to Related Issue(s)
#549

Please describe the changes in your request.
This PR ensures that OFRAK Docker images build on arm64 platforms, such as the M1. All of the ofrak_patch_maker tests (except SPARC, which are skipped) pass on both x86_64, aarch64 platforms with this change.

ofrak-capstone: 1.1.0rc1

  • Bump underlying capstone package to 5.0.3 to use pre-built aarch64 binaries

ofrak_core: 3.3.0rc3

  • Bumped version of lief to 0.16.1, orjson to 3.10.12 to take advantage of pre-built aarch64 binaries
  • Bumped version of angr to 9.2.133 for arm binaries

ofrak-patch-maker: 4.1.0rc0

  • Dockerstub works for x86_64, aarch64 platforms for all toolchains except SPARC

Anyone you think should look at this, specifically?
@rbs-jacob

@alchzh alchzh added this to the 3.3.0 Release milestone Jan 7, 2025
@alchzh alchzh requested a review from rbs-jacob January 7, 2025 20:21
@alchzh
Copy link
Copy Markdown
Contributor Author

alchzh commented Jan 7, 2025

test currently failing because the bumped angr version requires python >=3.10. I guess we can set a complex requirement for it

@rbs-jacob
Copy link
Copy Markdown
Member

test currently failing because the bumped angr version requires python >=3.10. I guess we can set a complex requirement for it

Is the bumped angr version the minimum version that will work?

Comment thread ofrak_core/Makefile Outdated
Comment thread ofrak_patch_maker/ofrak_patch_maker/toolchain/utils.py Outdated
@alchzh
Copy link
Copy Markdown
Contributor Author

alchzh commented Jan 17, 2025

Changed it so that toolchain.conf can be read from the /etc/ofrak/toolchain.conf, and the Dockerstub copies over the correct file based on the platform architecture

Left the current toolchain.conf in place to avoid breaking anyone's setup if they install a newer version. I want to update it to one without absolute paths in the future though so users can use executables that exist on their local PATH

@rbs-jacob rbs-jacob assigned whyitfor and unassigned alchzh Apr 10, 2025
Copy link
Copy Markdown
Member

@rbs-jacob rbs-jacob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More changes required before I'm comfortable merging this.

Comment thread ofrak_patch_maker/Dockerstub Outdated
Comment thread ofrak_core/pytest_ofrak/elf/assets/Makefile Outdated
Comment thread ofrak_core/pytest_ofrak/elf/fixtures.py Outdated
Comment thread ofrak_core/Dockerstub Outdated
Comment thread disassemblers/ofrak_angr/Makefile Outdated
Comment thread disassemblers/ofrak_angr/requirements.txt Outdated
Comment thread ofrak_patch_maker/ofrak_patch_maker/toolchain/utils.py
@whyitfor whyitfor requested a review from rbs-jacob April 15, 2025 23:01
@whyitfor whyitfor force-pushed the feature/arm-platform-support branch 2 times, most recently from 416a859 to 34be0b1 Compare April 16, 2025 01:29
@whyitfor whyitfor force-pushed the feature/arm-platform-support branch from 34be0b1 to 82a705b Compare April 16, 2025 02:35
Copy link
Copy Markdown
Member

@rbs-jacob rbs-jacob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two very small questions/comments. Then, this should be good to go!

Comment thread ofrak_core/pytest_ofrak/elf/assets/Makefile
Comment thread ofrak_patch_maker/Dockerstub Outdated
@rbs-jacob
Copy link
Copy Markdown
Member

@whyitfor Why did you end up breaking the toolchain config back out into two files in 31ae654 ?

@whyitfor
Copy link
Copy Markdown
Contributor

@whyitfor Why did you end up breaking the toolchain config back out into two files in 31ae654 ?

@rbs-jacob, as we discussed offline, there are enough subtle differences that it's better to keep these lists discrete.

@rbs-jacob rbs-jacob merged commit c77298e into master Apr 22, 2025
4 checks passed
@whyitfor whyitfor deleted the feature/arm-platform-support branch May 13, 2025 21:51
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.

Add multiarch binaries and aarch64 variants of toolchains for full ARM support

5 participants