安装Ubuntu18.04
安装Ubuntu请参考其他教程
安装vmware-tools
如果vmware版本过低,vmware-tools安装可能会出现各种问题。
建议直接用apt-get install安装vmware-tools
sudo apt-get update
sudo apt-get install open-vm-tools open-vm-tools-desktop
vmware-user
安装编译交叉器
首先在~目录下解压gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.zip
在/usr/local/目录下建立arm64目录,然后复制gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu目录中所有内容到arm64目录
cd /usr/local/
sudo mkdir arm64
cd arm64
cp ~/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/ . -R
修改.bashrc
在~/.bashrc文件结尾加入
export PATH=/usr/local/arm64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin:$PATH
保存退出后,在终端中执行
source .bashrc
测试交叉编译器
安装其他编译依赖软件
sudo apt-get install uuid uuid-dev zlib1g-dev liblz-dev liblzo2-2 liblzo2-dev lzop \
git-core curl u-boot-tools mtd-utils android-tools-fsutils openjdk-8-jdk device-tree-compiler \
gdisk m4 libz-dev git gnupg flex bison gperf libsdl1.2-dev libesd-java libwxgtk3.0-dev \
squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool \
libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev \
lib32ncurses5-dev lib32readline-dev gcc-multilib libswitch-perl libssl-dev unzip \
zip liblz4-tool repo git ssh make gcc libssl-dev liblz4-tool vim expect \
g++ patchelf chrpath gawk texinfo chrpath diffstat binfmt-support \
qemu-user-static live-build bison flex fakeroot cmake gcc-multilib g++-multilib \
unzip device-tree-compiler python-pip libncurses5-dev rsync subversion \
sed make binutils build-essential gcc g++ wget python libncurses5 bzr cvs git mercurial \
patch gzip bzip2 perl tar cpio unzip rsync file bc wget qemu-user-static live-build -y