在Ubuntu(x64)系统下安装64bit的交叉编译工具aarch64-linux-gnu-gcc_Alex-L的博客-优快云博客
apt-cache search aarch64
https://askubuntu.com/questions/1061979/cross-compile-for-armhf-and-install-a-static-library
sudo apt-get install gcc-8-aarch64-linux-gnu
aarch64-linux-gnu-gcc -v
Ubuntu 嵌入式 Arm-aarch64 开发环境搭建_tpmamba的博客-优快云博客
sudo apt install g++-aarch64-linux-gnu
aarch64-linux-gnu-g++ -v
sudo apt-get install gcc gcc-aarch64-linux-gnu
sudo apt-get install automake autoconf libtool make
sudo apt-get install libncurses5-dev libncursesw5-dev
sudo apt-get install device-tree-compiler
sudo apt-get install zlib1g-dev
apt-get update
apt-get install binutils-multiarch
dpkg --add-architecture armhf
# Manually add correct armhf repositories to /etc/apt/sources.list
vim /etc/apt/sources.list
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial main restricted
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security main restricted
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security multiverse
apt-get update
apt-get install libudev-dev:armhf
问题解决方法:aarch64-linux-gnu/bin/ld: cannot find -lssl_u014248033的博客-优快云博客
git clone https://github.com/openssl/openssl.git
cd openssl
git checkout OpenSSL_1_0_2-stable
./config --prefix=/usr/aarch64-linux-gnu/lib/ --cross-compile-prefix=aarch64-linux-gnu- no-asm shared
sed -i "s/-m64//g" Makefile
make
sudo make install
https://ubuntu.forumming.com/question/9939/cross-compile-for-armhf-and-install-a-static-library