在 x86 底下支援各種 arm 平台

前置準備

在各種 arm 平台底下編譯出來的檔案

安裝 linux (armhf) toolchain

安裝 linux (armel) toolchain

安裝 linux (arm64) toolchain

開始安裝套件

0. 進入 root 權限

armhf 平台

1. 輸入以下指令支援 armhf

dpkg --add-architecture armhf

2. 輸入以下指令查看支援的 arm 平台

dpkg --print-foreign-architectures

3. 更新套件與軟體

apt-get update
apt-get upgrade

4. 安裝以下套件

apt-get install libc6:armhf binfmt-support qemu qemu-user-static

5. 執行看看程式能不能跑囉!

./hello_armhf

armel 平台

1. 輸入以下指令支援 armel

dpkg --add-architecture armel

2. 輸入以下指令查看支援的 arm 平台

dpkg --print-foreign-architectures

3. 更新套件與軟體

apt-get update
apt-get upgrade

4. 安裝以下套件

apt-get install libc6:armel

5. 執行看看程式能不能跑囉!

./hello_armel

arm64(aarch64) 平台

1. 輸入以下指令支援 arm64

dpkg --add-architecture arm64

2. 輸入以下指令查看支援的 arm 平台

dpkg --print-foreign-architectures

3. 更新套件與軟體

apt-get update
apt-get upgrade

4. 安裝以下套件

apt-get install libc6:arm64

5. 執行看看程式能不能跑囉!

./hello_arm64
SHXJ
Latest posts by SHXJ (see all)

在〈在 x86 底下支援各種 arm 平台〉中有 1 則留言

發佈留言