in Synaptic, install
1. crossbuild-essential-arm64 : 64 bits
2. crossbuild-essential-armel : 32 bits, soft floating point
3. crossbuild-essential-armhf : 32 bits, hard floating
為了方便未來我們使用, 三個不同版本的工具,可在 ~/.bashrc 中新增底下設定:
alias makearmel='make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-'
alias makearmhf='make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-'
alias makearm64='make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-'
----------------------------------------------------------------------------------------------
以 qemu-arm 測試:
: arm-linux-gnueabihf-gcc hello.c -o hello_arm
: qemu-arm -L /usr/arm-linux-armhf hello_arm
*** 善用 man qemu-arm ***
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.