最近有个客户在64位 OrangePi Zero Plus2 运行 PyArmor 总是出问题, libtomcrypt 校验 rsa_verify_hash 失败。反复修改了多次还没有搞定,最后决定装个64位的环境自己先跑一下。
-
安装 QEMU
下载最新源码,编译安装。安装的时候选择需要的target-list,选择aarch64-softmmu即可,如果全部编译,会很慢。wget https://download.qemu.org/qemu-3.1.0.tar.xz
tar xJf qemu-3.1.0.tar.xz
cd qemu-3.1.0
./configure --target-list=aarch64-softmmu --enable-virtfs --enable-kvm --prefix=/home/jondy/workspace/qemu/
make && make install -
安装交叉编译工具
https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
tar xJf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz -
编译内核
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.90.tar.xz
tar xJf linux-4.20.tar.xz
cd linux-4.20
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make
最终生成image:arch/arm64/boot/Image
这个编译太费事了,直接下载个好了
wget http://people.linaro.org/~alex.bennee/images/aarch64-linux-3.15rc2-buildroot.img
qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel aarch64-linux-3.15rc2-buildroot.img --append "console=ttyAMA0"
- 共享文件夹
增加启动选项
-fsdev local,security_model=passthrough,id=fsdev0,path=/tmp/share -device virtio-9p- pci,fsdev=fsdev0,mount_tag=host_folder
在虚拟机上面
mount -t 9p -o trans=virtio -oversion=9p2000.L host_folder /mnt
报错: 9pnet_virtio: no channels available
没有找到解决方案
退出虚拟机QEMU
c-a x
显示帮助
c-a h