https://download.csdn.net/download/xhamigua/84243938
之所以用虚拟机搭一个环境 主要是服务器共用人太多 环境污染严重,当前的依赖已经混乱。
现在做一个通用的环境 可以随时打包带走了。
这里使用的是qemu虚拟机 因为qemu能模拟arm嘛。 win下linux均可 看个人喜好,镜像采用ubuntu-20.04.5-live-server-arm64.iso arm下没有桌面版啊!不过桌面版肯定卡呱呱了。
没什么好说 贴我调试的脚本代码吧。
efi.fd其实就是网上下载的QEMU_EFI.fd
安装aarch64
::安装aarch64
START qemu-system-aarch64.exe ^
-cpu cortex-a76 ^
-m 8192 ^
-smp 8,cores=8,threads=1,sockets=1 ^
-M virt -bios efi.fd ^
-net nic,model=pcnet ^
-device nec-usb-xhci ^
-device usb-kbd ^
-device usb-mouse ^
-device VGA ^
-drive if=none,file=ubuntu-20.04.5-live-server-arm64.iso,id=cdrom,media=cdrom ^
-device virtio-scsi-device ^
-device scsi-cd,drive=cdrom ^
-drive if=none,file=ubuntu.qcow,id=hd0 ^
-device virtio-blk-device,drive=hd0
系统安装完成后 启动脚本
START qemu-system-aarch64.exe ^
-cpu cortex-a76 ^
-m 8192 ^
-smp 8,cores=8,threads=1,sockets=1 ^
-M virt -bios efi.fd ^
-nic user,hostfwd=tcp:0.0.0.0:22-:22 ^
-device virtio-scsi-device ^
-drive if=none,file=ubuntu.qcow,id=hd0 ^
-device virtio-blk-device,drive=hd0 ^
-nographic
重点笔记:hostfwd=tcp:0.0.0.0:22-:22即为配置本地nat接入。
这样开完机就可以用winscp 127.0.0.1:22来连接了,g++远程调试也是127.0.0.1:22
其他和普通amd64同理。 arm版完毕打包方便。