Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Linux aarch64 #420

Open
JohnnyOhall opened this issue Jul 24, 2024 · 3 comments
Open

Support for Linux aarch64 #420

JohnnyOhall opened this issue Jul 24, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@JohnnyOhall
Copy link

Description

Would it be possible for create a release version that would work on Linux aarch64 devices?

Acceptance Criteria

additional release that includes *.tar.gz or *.AppImage file for aarch64 arcitecture (Such as Raspberry Pi's etc)

@JohnnyOhall JohnnyOhall added the enhancement New feature or request label Jul 24, 2024
@NghiaTranUIT
Copy link
Member

Can you show me how to support aarch64 arch? I built from my Intel PC, so it might not included in the AppImage

@JohnnyOhall
Copy link
Author

I personally have not done this before but here are some steps I found:

To support aarch64 architecture, you need to build your application for the aarch64 target. Here is a step-by-step guide to cross-compile your application for aarch64 on an Intel PC and package it into an AppImage.

Steps to Cross-Compile for aarch64 and Create an AppImage:

  1. Install Cross-Compilation Tools: Install the necessary tools for cross-compiling to aarch64.
    sudo apt update sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu 
  2. Set Up Cross-Compilation Environment: Configure your build system (e.g., CMake, Makefile) to use the aarch64 cross-compiler. For CMake, you can create a toolchain file aarch64-toolchain.cmake:
    # aarch64-toolchain.cmake set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR aarch64) set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) 
  3. Build the Application: Use the toolchain file to build your application for aarch64.
    mkdir build-aarch64 cd build-aarch64 cmake -DCMAKE_TOOLCHAIN_FILE=../aarch64-toolchain.cmake .. make 
  4. Create the AppImage: Use linuxdeploy and linuxdeploy-plugin-appimage to create the AppImage.
    wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage chmod +x linuxdeploy*.AppImage ./linuxdeploy-x86_64.AppImage --appdir AppDir --executable path/to/your/aarch64/executable ./linuxdeploy-plugin-appimage-x86_64.AppImage --appdir AppDir 

@NghiaTranUIT
Copy link
Member

Thanks, I will try to support this arch on the next release 👍

@NghiaTranUIT NghiaTranUIT self-assigned this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants